---
slug: developer-api-cli
title: Command line
category: capability
status: published
tags: [cli, command line, terminal, npm, tycoon cli, shell, 命令行, 终端, 脚本]
aliases: []
lastEditAt: 2026-08-09
---
Everything below is also one command away. The CLI is a thin client over the
same endpoints — same key, same scopes, same limits — for the cases where a
shell is faster than writing a request.

```bash
npm install -g @tycoon/cli
tycoon login                      # paste a key; stored 0600, verified before saving
tycoon task create "Turn the attached brief into a launch plan" \
  --file ./q3-brief.pdf --title "Launch plan" --wait
```

| Command | What it does |
| --- | --- |
| `tycoon login` / `logout` / `whoami` | Manage the stored key (`TYCOON_API_KEY` overrides it and writes nothing to disk) |
| `tycoon task create <prompt>` | `--file` (repeatable), `--title`, `--budget`, `--workspace`, `--guidance`, `--wait`, `--json` |
| `tycoon task get <id>` | Status, result, usage |
| `tycoon task list` | `--status`, `--limit` |
| `tycoon task watch <id>` | Follow to a terminal status — `--interval`, `--timeout` |
| `tycoon task say <id> <message>` | Add input while the work is open |
| `tycoon upload <path>` | Upload a file, print its asset id |

`--file` runs the three-step upload for you. Progress goes to stderr and
payloads to stdout, so `--json | jq` works while a human still sees progress.
`--wait` exits non-zero when the Task failed, so a script cannot mistake a
failure for success.

## Next steps

- [Create and read Tasks](/docs/create-read-tasks)
- [Webhooks](/docs/webhooks)
- [Idempotency and errors](/docs/reliability-errors)
