# Cutie CLI

`cutie` is the command line for Cutie: your tasks, team chat, check-ins and meeting decisions in the terminal. It is built for people and for AI coding agents such as Claude Code: every command has stable `--json` output and clear exit codes. It talks to the same MCP server as Claude (`https://cutie.tools/mcp`), so it sees only what you can see in Cutie.

- Install: `npm install -g cutie-cli` (Node.js 18 or newer, no dependencies)
- Sign in: `cutie login`
- HTML version of this page: https://cutie.tools/docs/cli
- MCP server and tool reference: https://cutie.tools/docs/mcp.md

## Quick start

```
npm install -g cutie-cli
cutie login                 # opens the browser, sign in to Cutie, choose access
cutie tasks                 # my open tasks
cutie task <id>             # one task with description and comments
cutie done <id> -m "Fixed in abc123"
```

## Sign-in

- `cutie login` opens Cutie in your browser (OAuth 2.1 with PKCE and a local `127.0.0.1` redirect). Choose **Read and write** or **Read only** (`cutie login --read-only` asks only for read). The access token lasts 1 hour and refreshes automatically for 30 days of use. On a machine without a browser: `cutie login --no-browser` prints the link.
- `cutie login --token` reads a personal token (`cmcp_…`, from Cutie → Atölye → Claude) from stdin: `pbpaste | cutie login --token`.
- `CUTIE_TOKEN=cmcp_…` in the environment overrides the saved sign-in (CI, scripts, containers).
- Saved sign-ins live in `~/.config/cutie/credentials.json` (file mode 0600; `XDG_CONFIG_HOME` and `CUTIE_CONFIG_DIR` move it), one per server.
- `cutie whoami` shows the person, workspace and access. `cutie logout` revokes the sign-in and forgets it. A personal token keeps working until you revoke it in Cutie.
- Several companies: a sign-in belongs to the company you were in when you approved it. Switch company in Cutie, then `cutie login` again.
- Another server: `--base https://test.example` or `CUTIE_URL`.

## Commands

### Tasks

- `cutie tasks`: my open tasks. `--all` everyone's, `--project <name>`, `--status open|closed|all`, `--due today|tomorrow|week|overdue|YYYY-MM-DD` (due on or before), `--query <words>`, `--limit`, `--cursor`.
- `cutie task <id>`: one task with description, custom fields, files, link and latest comments.
- `cutie add "<title>"`: create a task, assigned to you. `--project`, `--assignee <name|none>`, `--due YYYY-MM-DD`, `--desc <text|->`, `--priority 1-4`, `--template <name>`.
- `cutie start <id>`: set to doing.
- `cutie done <id> [-m "<comment>"]`: comment (optional), then set to done.
- `cutie status <id> <status> [-m]`: backlog, todo, doing, review, done or canceled.
- `cutie comment <id> "<text>"`: comment on a task; `-` reads the text from stdin. "@Full Name" notifies.
- `cutie assign <id> <me|name|none>`: change the assignee.
- `cutie log <duration> <id>`: log time (`45m`, `1h30m`, `1.5h`, `1:30`). `--note`, `--day`.
- `cutie projects`: projects you can see.

### Chat

- `cutie rooms`: rooms, channels and DMs, most recent first.
- `cutie read <room>`: recent messages. The room is an id (`x:abc123`), `general`, or a room name. `--thread <message id>` shows one thread.
- `cutie post <room> "<text>"`: post as you; `--thread <id>` replies in a thread.
- `cutie dm <person> "<text>"`: direct message a teammate.
- `cutie mentions [--unread]`: mentions, new DMs and replies to your threads.
- `cutie search "<words>"`: tasks and messages.

### Meetings and team

- `cutie meetings [--query]`: meetings whose decisions were shared.
- `cutie decisions [--since YYYY-MM-DD] [--query]`: team decisions from meetings.
- `cutie standup [--team] [--day]`: the day's check-ins, who has not written, open blockers.
- `cutie checkin --yesterday "…" --today "…" --blockers none`: write or update your check-in.
- `cutie incident [list|declare|update]`: `cutie incident declare "Checkout down" --sev 1 --team Payments`, `cutie incident update <room> --status resolved --note "Rolled back"`.

### For AI agents

- `cutie context [--limit]`: a short Markdown brief (my open tasks with ids, due dates and priority, unread mentions, recent decisions) to give an LLM at the start of a session.
- `cutie tools`: every MCP tool the server offers you, marked read or write. New server tools show up here without a CLI update.
- `cutie call <tool> --arg key=value …` or `cutie call <tool> --json '{…}'`: call any tool and print its JSON result. `--arg` values are typed by the tool's schema.
- `cutie claude setup`: adds the Cutie MCP server to Claude Code (`claude mcp add --transport http --scope user cutie https://cutie.tools/mcp`) and installs a Claude Code skill at `~/.claude/skills/cutie/SKILL.md` that teaches Claude the task workflow below. It asks before replacing an existing skill (`--force` replaces, `--print` only shows it).

### Other

- `cutie login`, `cutie logout`, `cutie whoami`: see Sign-in.
- `cutie completion zsh|bash`: shell completion. zsh: `cutie completion zsh > "${fpath[1]}/_cutie"`. bash: `source <(cutie completion bash)`.
- `cutie help <command>` or `cutie <command> --help`: options and examples.

## Output and exit codes

- `--json`: the tool's structured result on stdout, pretty-printed JSON. Errors go to stderr as `{"error": "…", "code": 3}`.
- `--quiet` (`-q`): nothing on stdout; list commands and `add` print bare ids, one per line.
- Colors only when stdout is a terminal; `NO_COLOR=1` or `--no-color` turns them off. Tables fit the terminal width.
- Items carry a `url` that opens them in Cutie.

| Exit code | Meaning |
|---|---|
| 0 | ok |
| 1 | other error (network, server) |
| 2 | usage: unknown command or option, missing or invalid argument |
| 3 | not signed in, or the sign-in or token was rejected: run `cutie login` |
| 4 | not found, not visible to you, or not allowed (read-only sign-in, admin only) |
| 5 | rate limited: 60 calls and 30 writes per minute per sign-in; wait the seconds in the message |

## Recipe: an AI agent works a Cutie task

```
cutie context                               # what is on my plate
cutie task <id> --json                      # full task
cutie start <id>
# … edit code, run tests, commit …
cutie comment <id> "Changed X in src/y.ts; tests pass; PR https://…"
cutie done <id> -m "Shipped in abc123"
```

Long text from a script: `printf '%s' "$SUMMARY" | cutie comment <id> -`.

In CI: `CUTIE_TOKEN=${{ secrets.CUTIE_TOKEN }} cutie done "$TASK_ID" -m "Deployed $GITHUB_SHA"`.

## Security

- The CLI acts as you, with the access you approved. Write commands show up in task history and chat under your name.
- Tokens are stored only in your config folder (0600) and sent only to the Cutie server you signed in to.
- An admin can turn off Claude and MCP connections for the whole company; the CLI stops working at once.
