CLI & error codes

The anywhere CLI is written for both developers and AI coding agents. Pass --json to any structured command for machine-readable output ({"ok": true, "result": ...} on stdout, progress and diagnostics on stderr).

Authentication, updates & skill

anywhere login --api https://api.anywhere.so   # browser-approved device login (valid 30 days)
anywhere whoami                                # API, account, workspaces with role, plan and per-worker ceilings
anywhere logout                                # remove the saved credentials
anywhere update                                # update the CLI and its embedded agent skill
anywhere skill install                         # install or refresh the bundled agent skill
anywhere workspaces list                       # list personal and team workspaces

Workers, projects & deploys

anywhere check [DIR]                                  # validate anywhere.toml, upload rules, and plan ceilings
anywhere deploy [DIR] [--worker NAME]                 # upload files, run build, and apply triggers
anywhere new NAME                                     # create a starter worker ready for exec
anywhere workers list                                 # list workers with status, project, pending secrets, last run, and next run
anywhere workers inspect NAME                         # show limits, project, triggers, pending secrets, and recent deploys
anywhere workers project NAME (PROJECT | --none)      # assign or remove a worker's optional project
anywhere workers pause NAME                           # stop worker, cancel queued runs, and skip triggers (keeps disk)
anywhere workers resume NAME                          # resume a paused worker (applies latest effective secrets)
anywhere workers delete NAME [--yes]                  # permanently delete a worker
anywhere projects list [--workspace WS]               # list optional projects in a workspace
anywhere projects create NAME [--workspace WS]        # create an optional project
anywhere projects rename PROJECT NEW [--workspace WS] # rename a project (accepts ID or name)
anywhere projects delete PROJECT [--workspace WS]     # delete a project (ungroups its workers)

For a team workspace, qualify the worker name as OWNER/NAME (for example anywhere deploy ./triage --worker acme/triage). Worker names stay flat across optional projects.

Triggers & runs

anywhere triggers [--worker NAME]                                # list cron & webhook triggers, next run, and last outcome
anywhere triggers url TRIGGER [--worker NAME]                    # create or rotate a webhook trigger's secret URL
anywhere run TRIGGER [--worker NAME] [< payload.json]            # trigger a cron or webhook run immediately (optional stdin)
anywhere runs [--worker NAME] [--trigger TRIGGER] [--limit N]    # list runs, newest first (no wake)
anywhere runs RUN_ID [--worker NAME]                             # inspect status, note, artifacts, and output (no wake)
anywhere runs input RUN_ID [--headers] [--worker NAME]           # read kept input body or webhook headers JSON (no wake)
anywhere runs replay RUN_ID [--worker NAME]                      # replay a run using its kept input & trigger's current command
anywhere runs pull RUN_ID [DIR] [--worker NAME]                  # download output.txt, artifacts/, and kept input (no wake)
anywhere runs link [RUN_ID] [--worker NAME]                      # print 12-hour link for HTML artifacts (no wake)

Sleep, logs, exec & files

anywhere sleep NAME                    # end active/queued runs as cancelled and sleep now
anywhere logs --worker NAME [--follow] # read or stream build, deploy, and run logs
anywhere exec NAME -- CMD [ARGS...]    # run a command in /app (wakes worker if asleep)
anywhere exec -t NAME -- CMD [ARGS...] # run an interactive terminal command (TTY sign-in, bash)
anywhere pull NAME /app/data ./out     # copy remote directory to local path (wakes worker)

An anywhere exec session keeps its worker awake while it’s connected. One with no input typed and no output from its command for 30 minutes is closed with exec_idle: its command is stopped and the worker sleeps. The command may have done part of its work before it went quiet, so check what it completed before running it again. Output counts when the worker reads it from the command, even if your side hasn’t taken it yet; a client that takes none of it for 30 minutes is closed with exec_output_stalled. anywhere exec exits 1 for either, as it does for a command that exits 1: the error: exec_idle: line on standard error, or the error event with --json, tells them apart. Long silent work belongs in a trigger’s run, or should print its progress. A session whose connection is cut before its command ends, as while the platform restarts, stops its command, which may have done part of its work: the CLI exits with exec_cut, the session’s ID and how it ended, and anywhere exec --outcome ID --worker NAME reads it again later.

Secrets, usage & operations

# Worker secrets (pass --staged to queue changes without restarting an awake worker)
printf %s "$VAL" | anywhere secrets set KEY [--worker NAME] [--staged]             # store encrypted secret from stdin
anywhere secrets set --env-file FILE [--worker NAME] [--staged]                    # import secrets from a .env file
anywhere secrets list [--worker NAME] [--effective]                                # list names, or sources & pending status
anywhere secrets get KEY [--worker NAME]                                           # reveal a worker secret value (audited)
anywhere secrets unset KEY [--worker NAME] [--staged]                              # remove a worker-local secret or override

# Workspace secrets (always staged; personal or team workspace namespace)
printf %s "$VAL" | anywhere secrets set KEY --workspace WS [--scope all|selected] [--project P...] [--worker W...]
anywhere secrets scope KEY --workspace WS --scope all|selected [--project P...] [--worker W...]
anywhere secrets list --workspace WS                                               # list workspace secrets, scopes, and pending workers
anywhere secrets get KEY --workspace WS                                            # reveal a workspace secret value (audited)
anywhere secrets attach KEY --workspace WS (--worker W | --project P)              # attach a selected secret to a worker or project
anywhere secrets detach KEY --workspace WS (--worker W | --project P)              # detach a selected secret from a worker or project
anywhere secrets unset KEY --workspace WS                                          # delete a workspace secret

# Apply staged secret changes
anywhere secrets apply [--worker NAME] [--wait] [--timeout S]                      # apply pending secrets to one worker
anywhere secrets apply --workspace WS [--workers A,B] [--wait] [--timeout S]       # apply pending secrets across a workspace

# Usage & operations
anywhere usage                                                                     # account usage period, forecast, and rates
anywhere usage NAME [--range 1h|24h|7d|30d]                                        # per-worker resource chart data and problems
anywhere operations get OP_ID [--wait]                                             # inspect an in-flight or finished operation
anywhere operations cancel OP_ID                                                   # cancel an active deploy

Common error codes

Every CLI and API error returns a stable code, whether retrying is safe, and how to fix it:

Code Meaning and fix
not_signed_in / unauthenticated Run anywhere login --api https://api.anywhere.so.
cli_outdated Run anywhere update, then retry the command.
worker_trigger_invalid Fix the trigger name, cron expression, timezone, webhook, dedupe_header, or timeout in anywhere.toml.
worker_triggers_missing Add at least one [[trigger]] block to anywhere.toml before deploying.
trigger_not_found Check trigger names with anywhere triggers --worker NAME.
trigger_still_running Previous run of that cron trigger is still active; inspect with anywhere runs --worker NAME.
webhook_queue_full 100 runs are already queued on that webhook trigger (HTTP 429, retryable).
input_too_large Request or stdin input exceeded 1 MiB (HTTP 413).
webhook_headers_too_large Webhook request headers exceeded 16 KiB encoded JSON (HTTP 431).
dedupe_header_missing Required dedupe_header was absent on the webhook request (HTTP 400).
webhook_not_found Webhook token is unknown or rotated; generate a fresh URL with anywhere triggers url.
webhook_run_blocked Queued webhook run ended not_started behind an earlier run marked lost whose ending never arrived; inspect anywhere runs or anywhere sleep NAME.
no_input Run has no kept input to read with anywhere runs input (HTTP 409).
input_not_kept Non-cron run’s input fell outside the newest 50 ended runs with input; start the trigger with anywhere run TRIGGER < payload instead (HTTP 409).
worker_busy Another deploy is active on this worker; check anywhere operations get ID --wait.
worker_limits_unavailable Requested [limits] exceed the host’s per-sandbox CPU or memory ceiling; lower [limits] in anywhere.toml and redeploy.
limit_above_plan Lower [limits] in anywhere.toml or upgrade your plan at /billing.
disk_limit_below_used Requested disk cap is smaller than current disk usage; raise disk or clean /app/data.
plan_worker_limit Free includes up to 3 workers; delete one or upgrade to Pro or Team for unlimited workers.
usage_limit_reached Monthly usage reached 100% and workers paused; upgrade or add a top-up at /billing.
exec_terminal_required exec -t requires an interactive terminal; run directly in a shell rather than via an agent pipe.
host_memory_full The worker’s host had no memory free for a deploy or exec, and nothing started; retry shortly, or lower [limits] memory. A run waits as queued instead.
exec_cut An anywhere exec session was cut before its command ended, as while the platform restarts, and its command stopped; anywhere exec --outcome ID says how it ended; unknown means the platform lost track before the worker’s host said, and the host’s word replaces it once it comes.
exec_idle No input or output in an anywhere exec session for 30 minutes, so it was closed and its command stopped; check what it completed before running it again.
exec_output_stalled The client took none of an anywhere exec session’s output for 30 minutes, so it was closed and its command stopped; check what it completed first.
run_not_ended Run is still executing; retry anywhere runs pull or anywhere runs link after it finishes.
secret_inherited_from_workspace Worker-level unset targeted an inherited workspace secret; detach or unset it at workspace scope, or set a worker-local override instead (HTTP 409).
scope_targets_conflict --worker or --project targets cannot be combined with --scope all; use --scope selected or omit targets (HTTP 400).
secret_scope_is_all attach and detach only apply to selected-scope workspace secrets; switch scope to selected first (HTTP 400).
too_many_workspace_secrets Workspace reached the 200 workspace-secret limit; remove unused workspace secrets first (HTTP 400).
too_many_secrets / secrets_too_large A worker’s merged worker and workspace secrets exceeded 100 entries or 1 MiB total; trim secrets or narrow workspace scopes (HTTP 400).
project_name_invalid / project_name_taken Project names must be 1–64 non-control characters and unique (case-insensitively) within the workspace.
no_such_project Project ID or name does not exist in this workspace; list projects with anywhere projects list.

For agents:Markdown (/docs/cli.md)Index (/llms.txt)