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

# CLI reference (ait)

> The zero-dependency CLI agents use to drive Automate It headlessly

`ait` is a single-file, zero-dependency CLI (Node 18+ or Bun) that speaks Automate It's MCP server — everything a remote MCP client can do, headlessly. Every command goes through MCP; there is no separate REST path.

## Install

```sh theme={null}
npm install -g automate-it   # provides the global `ait` command
```

Runtimes that read AgentSkills folders (OpenClaw, Hermes) can instead install the whole skill folder — `SKILL.md` plus the same CLI — see the [connect guides](/connect/openclaw).

## Configure

```bash theme={null}
export AUTOMATE_IT_API_KEY="ak_..."           # required
export AUTOMATE_IT_WORKSPACE="<workspace-id>" # optional; auto-resolved if the key sees one workspace
export AUTOMATE_IT_API_URL="https://api.automate.it.com"  # optional; this is the default
```

Every workspace command also accepts `--workspace <id>`. Errors print `{"error": "..."}` to stderr and exit 1.

## Commands

### Tasks — the review-gate loop

| Command                                                                                                                                                   | Does                                                                                                     |
| --------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
| `task create --title <t> [--instructions <text>] [--output-types x,linkedin,…] [--no-review] [--claim] [--skills <names or ids>] [--assign <userId\|me>]` | Create a task. `--claim` = claimed and assigned to you; `--assign` hands it to a member                  |
| `task submit --title <t> --body <text> [--type <contentType>] [--media '<json>']`                                                                         | One-shot: create **with** finished content, straight into review                                         |
| `task list [--status <s>] [--mine]`                                                                                                                       | Statuses: `todo working review approved publishing published deleted failed`; `--mine` = assigned to you |
| `task get <taskId>`                                                                                                                                       | Full detail, including reviewer `comments`                                                               |
| `task links <taskId>`                                                                                                                                     | Published post URLs                                                                                      |
| `task claim-next`                                                                                                                                         | Atomically claim the oldest unassigned `todo` task                                                       |
| `task claim <taskId>`                                                                                                                                     | Claim a specific task (assigns it to you)                                                                |
| `task add-content <taskId> --type <ct> [--body <text>] [--media '<json>'] [--sort-order <n>]`                                                             | Append a content item                                                                                    |
| `task update-content <taskId> <contentItemId> [--body] [--title]`                                                                                         | Revise in place                                                                                          |
| `task delete-content <taskId> <contentItemId>` / `task clear-content <taskId>`                                                                            | Remove one / all content items                                                                           |
| `task complete <taskId>`                                                                                                                                  | Finish work (→ review, or auto-approve)                                                                  |
| `task comment <taskId> --comment <text>`                                                                                                                  | Leave a note for the reviewer                                                                            |
| `task next-review`, `task approve <id>`, `task reject <id> [--comment]`, `task publish <id>`, `task delete <id>`                                          | Reviewer/admin operations                                                                                |

### Skills, files, automations

| Command                                     | Does                                                                               |
| ------------------------------------------- | ---------------------------------------------------------------------------------- |
| `skills list` / `skills get <skillId>`      | Workspace voice & formatting rules + bundled file ids                              |
| `files list [--search] [--mime-type]`       | Browse workspace files                                                             |
| `files download-url <fileId>`               | Presigned URL — fetch the bytes yourself                                           |
| `upload-url --filename <f> --mime-type <m>` | Presigned upload URL for media                                                     |
| `automation create/list/get/update/delete`  | Standing briefs that spawn tasks on a schedule                                     |
| `automation run <automationId>`             | Trigger now; returns the spawned task (`alreadyRunning: true` if one is in flight) |

### Everything else

```sh theme={null}
ait tools                          # every MCP tool the platform exposes
ait call <tool> --args '<json>'    # call any of them directly; workspaceId auto-injected
ait workspaces                     # workspaces the key can reach
ait whoami                         # the user you act as
```

The `call` passthrough means new platform tools work with zero CLI changes — the named commands are just ergonomic wrappers over the common ones.
