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

npm install -g @anythingai/cli
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.
# Browser-based login
anything auth login

# Or pass an API key directly
anything auth login --api-key anything_xxx
You can also set the key as an environment variable, which is the better fit for CI and agents:
export ANYTHING_API_KEY=anything_xxx
Check your state anytime, or log out:
anything auth status
anything auth logout

Quick start

# See your account and orgs
anything user
anything orgs list

# Create an app
anything projects create --prompt "Build a todo app with dark mode" --org <org-id>

# Send a follow-up prompt
anything projects generate <project-id> --prompt "Add a filter for completed tasks"

# Publish it
anything projects publish <project-id>
Or do the whole thing in one command:
anything ship "Build a markdown viewer for blog posts"
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:
anything ship --project <project-id> "Add a settings page"
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

CommandWhat it does
anything projects create --prompt "..."Create a new app and start generation
anything projects generate <id> --prompt "..."Send a follow-up prompt
anything projects get <id>View app info: platform (web or mobile), build status, deployment, and URLs
anything projects list --org <org-id>List apps you can access
anything projects messages <id>Read the agent’s messages
anything projects status <id>Check generation status
anything projects logs <id>Read development logs (supports tailing)
anything projects files list <id>List generated files
anything projects files get <id> app/page.tsxRead one file
anything projects rename <id> --name "..."Rename an app
anything projects duplicate <id>Duplicate an app
anything projects delete <id> --yesDelete an app (recoverable for 30 days)
anything projects restore <id>Restore a deleted app within its 30-day grace period
anything projects set <id>Set the active project for later commands
anything projects unsetClear the active project
create and generate accept the prompt over a pipe too, so echo "Add dark mode" | anything projects generate <id> works.

Publishing

CommandWhat it does
anything projects publish <id>Publish to production (waits for the deploy)
anything projects publish <id> --no-waitPublish without waiting
anything projects publish status <id> <deploy-id>Check a publish deployment
anything projects unpublish <id> --yesTake an app offline
anything projects submit <id> --store app-storeSubmit to the App Store
anything projects submit <id> --store play-storeSubmit to Google Play
anything projects submit status <id> <submission-id>Check a submission

Logs

anything projects logs <id>                  # recent dev logs
anything projects logs <id> --follow         # stream (alias: --tail)
anything projects logs <id> --level error    # filter by info, warn, or error
anything projects logs <id> --search "fetch" # filter by substring

Secrets

CommandWhat it does
anything projects secrets add <id> --name KEY --value "..."Add a secret
anything projects secrets list <id>List secrets
anything projects secrets remove <id> <secret-id> --yesRemove a secret
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

CommandWhat it does
anything databases list --org <org-id>List databases
anything databases get <id>Inspect a database
anything databases create --project <id>Create a database for a project
anything databases query <id> "SELECT ..."Run a read-only SQL query
anything databases connect <id>Print the connection string (--mask to redact the password)
anything databases reset <id> --yesReset a database (destructive)
anything databases delete <id> --yesDelete a database

Domains

CommandWhat it does
anything domains list <org-id>List domains for an org
anything domains add app.example.com --project <id>Add a custom domain
anything domains remove <domain-id> --yesRemove a domain
anything domains verify <domain-id>Check DNS configuration

Deployments

CommandWhat it does
anything deployments list <id>List a project’s deployments
anything deployments get <deploy-id>View deployment details
anything deployments logs <deploy-id>View build logs
anything deployments rollback <id> --yesRoll back to the previous deployment

Members

CommandWhat it does
anything members list --org <org-id>List members and pending invites
anything members invite user@email.com --org <org-id> --role editorInvite a member
anything members remove user@email.com --org <org-id> --yesRemove a member
anything members role user@email.com admin --org <org-id>Change a member’s role
Roles are owner, admin, editor, and viewer.

Assets

CommandWhat it does
anything assets upload <id> ./logo.pngUpload an image asset
anything assets list <id>List a project’s assets
anything assets remove <id> <asset-id>Remove an asset

Account and context

CommandWhat it does
anything userShow your account, org, and credits (--brief for the essentials)
anything orgs listList your organizations
anything orgs get <org-id>Inspect an organization
anything orgs set <org-id>Set the active org
anything statusShow current org, project, user, and auth state
anything switchPick an org or project interactively

Utility

CommandWhat it does
anything updateUpdate to the latest published version
anything update <version>Install or downgrade to a specific version
anything update --checkReport whether an update is available
anything link [id]Link the current directory to a project (sets it active)
anything unlinkRemove the link from the current directory
anything pullPull project files to your machine
anything watch <id>Watch a project and stream events
anything introspectPrint the full command tree as JSON
anything skillPrint the packaged skill for AI coding agents

Output modes

Every command takes these flags. They’re what make the CLI scriptable.
FlagBehavior
--jsonPrint a structured JSON envelope (see below)
--quietPrint only the primary identifier (an ID or URL), for chaining
--dry-runShow the planned actions without running them
--non-interactiveFail on ambiguity instead of prompting
--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:
{
  "ok": true,
  "command": "projects create",
  "data": { "id": "proj_123", "status": "BUILDING" }
}
On failure, the shape is the same but with an error:
{
  "ok": false,
  "command": "projects get",
  "error": { "code": "NOT_FOUND", "message": "Project not found" }
}
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:
{ "type": "result", "ok": false, "command": "projects generate", "error": { "code": "generation_failed", "message": "..." } }
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:
CodeMeaning
0Success
1Generic error
2Invalid arguments
3Not found
4Authentication failure
5Conflict
6Timeout
7Server error
8Rate limited
9Credit limit reached

Chaining commands

Use --quiet to pass an ID or URL straight into the next command:
PROJECT_ID="$(anything projects create --quiet --prompt 'Build a todo app' --org <org-id>)"
anything projects generate "$PROJECT_ID" --prompt 'Add dark mode' --quiet
PUBLISH_URL="$(anything projects publish "$PROJECT_ID" --quiet)"
echo "Published to: $PUBLISH_URL"
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:
# Start and return immediately
anything projects create --prompt "Build a CRM" --org <org-id> --no-wait --quiet

# Poll until done
anything projects status <project-id> --json
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:
{ "type": "result", "ok": false, "command": "projects create", "error": { "code": "still_building", "projectId": "proj_123", "hint": "Check progress with `anything projects status proj_123`, then publish with `anything projects publish proj_123` once status is VALID." } }
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:
anything skill
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:
anything 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