Skip to main content
The Anything CLI lets you create apps, send prompts, publish, and manage everything from your terminal. It’s the same Anything agent you use in the browser, driven by commands instead of clicks. It’s built for scripting and for AI coding agents, so every command can speak structured JSON.
The CLI is rolling out to select accounts. If you don’t have access yet, email hello@anything.com.

Install

Requires Node.js 24 or later. The command is anything.

Authenticate

Log in through your browser, or use an API key for scripts and CI. Create an API key from the Anything API Keys section in Settings in the dashboard.
You can also set the key as an environment variable, which is the better fit for CI and agents:
Check your state anytime, or log out:

Quick start

Or do the whole thing in one command:
ship creates the app, runs the agent, and publishes, all in one shot. The prompt is a positional argument, so you don’t need --prompt. To iterate on an existing app instead of creating one, pass --project:
After ship finishes, check anything projects messages <id> before telling anyone the app is live. ship can return ok: true, published: true while the agent actually paused on a clarifying question or replied with a plan only, in which case the published URL serves an empty template. If the last assistant turn is a question or a plan, answer it (or send "proceed") with anything projects generate <id> --prompt "...", then publish again.

Commands

Run anything <command> --help for the full, current flag list on any command. The tables below cover the common paths.

Projects

create and generate accept the prompt over a pipe too, so echo "Add dark mode" | anything projects generate <id> works.

Publishing

Logs

Secrets

By default, secrets add writes to all environments (development, preview, and production), so a key your published app needs actually reaches it. Pass --env development, --env preview, or --env production to target one. If you only set a secret in development, the live app won’t see it.
The value can also come from stdin: cat key.txt | anything projects secrets add <id> --name OPENAI_API_KEY.

Databases

Domains

Deployments

Members

Roles are owner, admin, editor, and viewer.

Assets

Account and context

Utility

Output modes

Every command takes these flags. They’re what make the CLI scriptable. --non-interactive turns on automatically when the CLI detects an agent or CI environment (CLAUDECODE, CODEX, CI, or OPENCLAW set). When --json and --quiet are combined, --json wins.

The JSON envelope

On success, --json prints to stdout:
On failure, the shape is the same but with an error:
Streaming commands (ship, create, generate, and publish) emit one JSON object per line (NDJSON) to stdout. The terminal line is tagged "type": "result" and carries the same command field as the one-shot envelope, so a stream reader can attribute the result without tracking which command it ran. Even on failure the result stays a single line, parseable by a line-by-line reader:
Both success and error JSON go to stdout, so anything ... --json | jq works whether the command succeeds or fails. Human-readable error text goes to stderr.

Exit codes

Scripts can branch on the exit code instead of parsing output:

Chaining commands

Use --quiet to pass an ID or URL straight into the next command:
Check the exit code before using a value captured from --quiet. On failure, --quiet prints the JSON error envelope to stdout, so PROJECT_ID="$(... --quiet)" would capture a JSON blob instead of an ID. Branch on $? (or the exit codes above) before passing the captured value to the next command.

Async generation

By default, create and generate wait for the agent to finish. The wait is heartbeat-based: as long as the server keeps making progress, the CLI keeps waiting, so longer builds don’t get cut off (real builds routinely run past five minutes). It gives up only after a stall with no progress, or after a hard 30-minute cap. Real builds typically take 10 to 40 minutes (publish adds roughly 1.5 to 2 minutes, and pull can take 8 to 14 minutes), so a long-running build is normal, not hung. Pass --no-wait to return right away instead, then poll:
Status values: CREATED and BUILDING mean it’s still working; VALID means done; INVALID and INVALID_PROMPT mean it failed.
VALID also covers a chat-only or plan-only turn that made zero file changes, so a VALID status alone doesn’t guarantee the agent built anything. Before publishing, confirm the last assistant turn with anything projects messages <id>; if it’s a question or a plan, answer it and generate again.

When the wait runs long

If the wait does time out, it’s not a failure. The build keeps running on the server. create, generate, and ship emit a resumable still_building result that carries the project ID and a hint telling you how to pick back up:
So even on a slow build you never lose the project ID. Poll projects status until it reads VALID, then publish. A genuine INVALID or INVALID_PROMPT build (or a generation_failed) still fails terminally, as you’d expect.

Recovering from a failed publish

A first publish can fail on a build error in the generated code. The failed-deploy result embeds the build output so you can recover without leaving the terminal:
  • Build error: read buildLogs from the failed result (or anything deployments logs <deployment-id>), send the error back as a fix prompt with anything projects generate <id> --prompt "...", then publish again.
  • Transient infra error (for example a conflict on a first-ever deploy): retry the publish as-is.
  • INVALID or INVALID_PROMPT: rephrase the prompt and generate again before publishing.

Using with AI coding agents

The CLI ships a skill file that AI coding agents (Claude Code, Codex, Cursor, OpenClaw) can read to drive Anything for you. Print it with:
For the full machine-readable command tree, use anything introspect.
For agent and CI workflows, pass --json on every command, use --no-wait with projects status polling, and branch on the exit code. The CLI auto-enables --non-interactive in those environments, so commands fail fast instead of hanging on a prompt.

Updating

The CLI checks for a newer version in the background and tells you when one is out. To update:
It detects how you installed the CLI (npm, pnpm, yarn, or bun) and runs the matching command. Pass a version to pin or downgrade: anything update 0.1.3. The update notice shows up in non-interactive runs too (agents, CI, anything reading the CLI over a pipe), printed as a single plain line to stderr. It never touches stdout, so it won’t break a --json consumer.

Agent

How the agent builds

Controls

The builder interface

Publish

Take your app live

Credits

How credits work