> ## Documentation Index
> Fetch the complete documentation index at: https://docs.every.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Every CLI

> The agent-agnostic command line for Every — install once, sign in once, and manage your business from any shell, coding agent, or CI job

## Overview

The **Every CLI** (`@everyai/cli`) gives you and your coding agents command-line access to your Every workspace — people, companies, invoices, proposals, deals, pipeline, payments, and more. Install it once, sign in once, and the same `every` command works everywhere a shell runs: Claude Code, Codex, Cursor, a plain terminal, or a CI job.

Under the hood the CLI is a client of Every's [MCP server](https://docs.every.ai/integrations/connect-ai-tools.md), so it discovers the current tool surface automatically. Keep the CLI current for new client-side behavior such as approval handling.

> [!NOTE]
>
> If you'd rather use Every *inside* one assistant, you can add the MCP server to it directly — see [Connect to Claude & ChatGPT](https://docs.every.ai/integrations/connect-ai-tools.md). The CLI is the portable alternative: one install and one login cover every agent and machine context, including CI, where per-assistant MCP config isn't practical.

## Install and sign in

Requires [Node.js](https://nodejs.org) 18 or newer.

**1. Install globally**

```bash theme={"system"}
npm install -g @everyai/cli
```

This installs two identical commands: `every` (primary) and `everyai` (alias).

**2. Sign in**

```bash theme={"system"}
every login
```

Opens your browser to authenticate with your Every account (OAuth 2.0 + PKCE). Tokens are stored in your operating system's keychain and refreshed automatically — you won't need to sign in again for a long time.

**3. Confirm who you are**

```bash theme={"system"}
every whoami
```

Shows the signed-in user, the **organization** your commands act on, the environment, and how many tools are available. Always worth checking before a write, so you know exactly which workspace it lands in.

> [!NOTE]
>
> **Headless / CI:** set the `EVERY_TOKEN` environment variable to a valid access token to skip the browser flow entirely. `every login` requires an interactive terminal and exits with code `3` without one, so it never hangs a script. `every signup` (below) does not need a terminal.

## Sign up for Every from the CLI

New to Every? `every signup` creates your account, or signs you in if you already have one, in one browser step. A coding agent can run it for you: it needs no interactive terminal and never waits for Enter. Requires CLI 0.8.0 or newer.

**1. Authorize in the browser**

```bash theme={"system"}
every signup
```

The CLI prints an authorization URL, tries to open your browser, and waits up to 5 minutes (`--timeout <seconds>` to change it). Sign in or create your account on Every's own page. The CLI never sees your password or any code.

**2. Confirm your business name**

If the account is new, the CLI reports `needs_profile` with suggested values for your organization name, description and public links, inferred from your mailbox and the web. Suggestions are unverified: confirm or change them.

```bash theme={"system"}
every signup complete --org-name "Acme Studio" --description "Brand design for startups" --link https://acme.studio --yes
```

Only `--org-name` is required. The account is ready as soon as this returns; Business DNA and other setup continue in the background.

**3. Check status any time**

```bash theme={"system"}
every signup status
```

Returns `ready` for an account that is good to go.

Until signup is finished, other tools return `error.code: "signup_incomplete"` and the CLI names the command that finishes it. If the browser step is denied or times out, the command exits `3`; run `every signup` again. `every login --create-account` still works as an alias for `every signup`.

> [!TIP]
>
> **For agents:** run `every signup --json`. Stdout is NDJSON: an `authorization_required` event with the `url`, a `waiting_for_authorization` event with `browser_opened`, then the usual envelope. Give the person the URL only if `browser_opened` is false. Ask once to confirm the organization name (and, optionally, description and links), then run `every signup complete ... --yes --json`. Never ask for passwords, codes or tokens.

## Output contract

Every command supports `--json`. In JSON mode, stdout is **exactly one JSON document** and nothing else, so it's safe to pipe and parse:

```jsonc theme={"system"}
// success
{ "ok": true,  "data": { /* ... */ },                    "env": "production", "schema_version": 1 }
// failure
{ "ok": false, "error": { "message": "...", "code": "..." }, "env": "production", "schema_version": 1 }
```

Branch on the process **exit code** rather than scraping text:

| Code | Meaning | What to do |
| - | - | - |
| `0` | Success | Read `data` |
| `1` | Tool or generic error | Read `error.message` before retrying |
| `2` | Usage error | Fix the command or arguments |
| `3` | Auth required or expired | Run `every signup` (any context), or `every login` at a terminal |
| `4` | Permission / confirmation needed | Add the required local safety flag, or approve a pending sensitive action in Every and retry identically |
| `5` | Rate limited | Back off and retry |
| `6` | Not found | Re-list and verify the ID |
| `7` | Network / timeout | Check connectivity and retry |

The `env` field on every JSON response tells you whether the command targeted `production`, `staging`, or a `custom` server — a quick way to confirm blast radius.

## Safety model

The CLI classifies every tool and gates it locally, then Every applies its server-side approval policy:

* **Reads** run freely.
* **Writes** (create/update) require `--yes`.
* **Destructive or external-impact actions** — sending invoices/proposals, deletes, voids, recording payments — require **both** `--yes` and `--allow-destructive`.
* **`--read-only`** (or the `EVERY_READ_ONLY=1` environment variable) blocks anything that isn't a read, for safe automation.

For ordinary writes, Every may return an exact action-and-target confirmation. In an interactive terminal, CLI 0.6.3 or newer can confirm the trusted phrase and retry once after your local consent.

Higher-impact actions also create a request in [**Every → Settings → Approvals**](https://app.every.ai/settings/approvals). The CLI never automatically retries a human-approved action: after approving, rerun the identical command with the same arguments and flags within 10 minutes.

In a non-interactive context, a missing flag fails fast with exit code `4` and names the exact flag needed — it never silently prompts and hangs.

```bash theme={"system"}
# See how a specific tool is classified and what it requires
every policy explain send_invoice --json
```

> [!WARNING]
>
> Only add `--yes` when the human explicitly asked for the change, and only add `--allow-destructive` when they explicitly asked for the send/delete/payment. These flags confirm local intent; they do not replace a server-required approval.

> [card] [How MCP approvals work](https://docs.every.ai/reference/approvals.md)
>
> Review the exact retry, expiry, and single-use rules

## Commands

```bash Discovery theme={"system"}
every docs                         # full command tree + conventions, offline
every tools list                   # all available tools with safety classification
every tools list --filter invoice  # filter by substring
every tools describe list_invoices # schema + policy + guidance for one tool
```

```bash Run any tool theme={"system"}
# Inline arguments (repeatable); values are parsed as JSON when possible
every tool call list_invoices --arg payment_status=overdue --arg limit=100 --json

# Or pass a JSON object as a file, or on stdin with -
every tool call create_invoice --args invoice.json --yes --json
```

```bash Curated aliases theme={"system"}
every invoice list --status overdue --json
every invoice create --client "Acme Consulting" --amount 100 --yes --json
every invoice send <invoice_id> --yes --allow-destructive --json
every deal list --stage opportunity --json
every deal move <deal_id> won --yes --json
every contact list --search "acme" --json
```

```bash Auth & identity theme={"system"}
every signup                       # create an account, or sign in, in one browser step
every signup status                # is signup finished?
every login                        # browser sign-in (interactive terminal)
every whoami                       # user, org, environment, tool count
every auth status                  # local session state (no network)
every org                          # the organization commands act on
every logout
```

`every invoice create` resolves the client by name — if the name is ambiguous it returns exit code `6` with the candidate list (each `client_id` and name) so a retry with `--client-id` is mechanical.

## For AI agents

If you're a coding agent driving this CLI, four rules make you reliable:

> [!TIP]
>
> 1. **Always pass `--json`** and read the envelope (`ok`, `data`/`error.code`, `env`, `schema_version`).
> 2. **Branch on exit codes**, not on stderr text — exit `3` means run `every signup` (or ask the user to run `every login` at a terminal).
> 3. **Never guess an ID.** List or search first, then act with the exact ID returned in `[id: ...]`.
> 4. **Only add `--yes` / `--allow-destructive` when the human explicitly asked** for that write or send.

Every ships a skill that encodes these rules plus Every's domain workflows. Install it so your agent follows them automatically — see [Agent skill (use-every)](https://docs.every.ai/cli/agent-skill.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.