Imported from argos-ci/argos-javascript (
skills/argos-cli/SKILL.md) via skills.sh. Install upstream withnpx skills add argos-ci/argos-javascript --skill argos-cli. Copyright stays with the author (MIT).
Argos CLI
Run argos <command> --help for the exact flags of any command. This skill
covers only what --help can't: the token model, the output contract, and the
command map.
Output contract (agents)
- Pass
--jsonwhenever you parse stdout; commands print human-readable text otherwise. - Errors go to stderr as
Error: <message>. Exit0= success,1= failure. - Never print token values or webhook secrets. Only the two token creation
commands and
webhook createprint one, and only once: pipe the value straight into the secret that needs it (see the token rotation and webhook flows below) instead of echoing it.
Authentication
A <buildReference> is a build number (e.g. 72652) or a full build URL. With a
number, add --project owner/project; a URL already contains it. A <changeId>
is not a build ref: it comes from a diff's change.id and does not carry the
account, so every change command needs --project owner/project (or
ARGOS_PROJECT). A <testId> comes from a diff's test.id and carries the
project name but not the account, so test commands need the same
--project/ARGOS_PROJECT, except with a project token, which already
identifies its own project. project and automation commands take the same
--project owner/project; account and webhook commands take --account <slug> (or ARGOS_ACCOUNT).
A project token can be linked to several projects of an account. Such a token
does not identify a project on its own. Every command that uses it (upload,
finalize, skip, deploy, media upload and the read commands) needs
--project owner/project or ARGOS_PROJECT, or Argos answers 400. A project
token can also lack a permission (builds:write, deployments:write,
projects:read, media:read, media:write): Argos answers 403 naming the one
the command needs, and only a new token with it fixes that.
There are two token types. Pick one by command:
| Commands | Token | Resolution order |
|---|---|---|
build list, build get, build snapshots, build download, baseline download, test list, test get, test changes, change list, project get, project deployments, project domain get, media get, media list, media versions, media update, media delete |
Project token | --token › ARGOS_TOKEN |
review *, comment *, test comment *, media comment *, test subscribe / unsubscribe, build subscribe / unsubscribe, change ignore / unignore, account *, project update, project transfer, project contributor *, project token *, project domain set, automation *, webhook *, analytics, create-project |
Personal access token (PAT) | --token › ARGOS_TOKEN › argos login |
upload, finalize, skip, deploy, media upload |
CI / project token | --token › ARGOS_TOKEN (or tokenless CI) |
baseline download takes only a project token: the baseline lookup it relies on
rejects a PAT, including the one from argos login.
argos login asks the user which access to grant. Its default, "Read and
write", covers reviews, comments and media but not administration: account *,
create-project, project update, project transfer, project contributor set|remove, project token create|revoke, project domain set,
automation create|update|deactivate and webhook * need "Admin" access. An Insufficient scope error names the missing
permission: ask the user to run argos login again and choose "Admin", or use
a PAT.
Project tokens read build data but cannot review, comment, ignore changes, or
administer a project or team. Those need a PAT. If no suitable token is
available, ask the user. For these actions, if no PAT exists, report the
conclusion and evidence instead of acting. argos login is for interactive
humans, not CI.
Commands
- Inspect:
build list [--branch <b>] [--commit <sha>] [--search <q>]·build get <ref>·build snapshots <ref> [--needs-review] [--metrics-period 24h|3d|7d|30d|90d]·build subscribe|unsubscribe <ref> - Export:
build download <ref> [-o <dir>]·baseline download [-o <dir>] [--branch <b>] [--build-name <name>] [--mode ci|monitoring] - Review:
review list <ref>·review create <ref> --event <approve|reject|comment> [--body <md>]·review dismiss <ref> <reviewId>·review reviewer list <ref>·review reviewer add|remove <ref> <userId...> - Comment:
comment list <ref>·comment create <ref> --body <md> [--reply-to <id>] [--diff <id> [<anchor>]] [--draft]·comment get|edit|delete|resolve|unresolve|subscribe|unsubscribe <ref> <id>·comment react|unreact <ref> <id> <emoji> - Flakiness:
test list [--build-name <name>] [--search <q>]·test get <testId>·test changes <testId> [--ignored true|false] [--metrics-period …]·test subscribe|unsubscribe <testId>·change list·change ignore|unignore <changeId> --project owner/project - Test comments:
test comment list|create <testId>·test comment get|edit|delete|resolve|unresolve|subscribe|unsubscribe <testId> <id>·test comment react|unreact <testId> <id> <emoji> - Project:
project get·project update [--name …] [--summary-check …] [--default-user-level …] [--ignore-changes true|false] [--deployments true|false] …·project transfer --to <slug>·project contributor list|set|remove·project deployments [--environment preview|production]·project domain get|set <domain> - Project tokens:
project token list·project token create --name <name> [--permissions <p…>] [--expire-at <iso> | --expires-in <days>]·project token revoke <tokenId>·account project-token list|revoke·account project-token create --projects <name…> --name <name> […](one token for several projects) - Automation:
automation list [--active true|false]·automation get <ruleId>·automation create|update [<ruleId>] --definition-file <path>·automation deactivate <ruleId> - Team:
account get·account update --default-user-level <member|contributor>·account member list|set-level|remove·account invite list|create|cancel|reset-link·account domain list|add|remove - Webhooks:
webhook list·webhook get|delete <webhookId>·webhook create --url <https-url> --events <event…> [--projects <name…>](events:build.completed,build.reviewed,deployment.created,deployment.ready; every project, including future ones, unless--projectsis given) ·webhook delivery list <webhookId> [--status pending|success|failed] [--event-id <id>]·webhook delivery get|resend <webhookId> <deliveryId> - Account:
analytics --account <slug> [--from <date>] [--to <date>] [--group-by day|week|month] [--time-zone <iana>] [--project <name>]·create-project <name> --account <slug>·whoami - Media:
media upload <files...> [--branch <b> | --pr <n>] [--state before|after] [--description <text>] [--visibility team|public] [--no-compress]·media list [--branch <b>] [--pr <n>] [--stage staged|published] [--search <q>] [--type image|video]·media get|delete|versions <mediaId>·media update <mediaId> [--name <n>] [--description <text>] [--branch <b>] - Media comments:
media comment list <mediaId> [--all](open threads by default) ·media comment create <mediaId> --body <md> [--reply-to <id> | <anchor>]·media comment get|edit|delete|resolve|unresolve|subscribe|unsubscribe <mediaId> <id>·media comment react|unreact <mediaId> <id> <emoji> - CI:
upload <dir>·finalize·skip·deploy <dir>(Argos hosts it) ·deploy --url <url>(reports a deployment hosted elsewhere, such as Vercel; replacesARGOS_PREVIEW_BASE_URL) - Auth:
login·logout - Docs:
docs search <query> [--limit <n>](no token; up to 10 results, 5 by default)
List commands (build list, test list, change list, account member list, project contributor list, project deployments, automation list,
account invite list, webhook delivery list) follow pagination up to
--limit (default 100).
An <anchor> pins a comment to part of the screenshot, in normalized 0-1
coordinates (0.62,0.34 is 62% across, 34% down). Use --anchor-area <x,y,width,height> (x,y is the top-left corner) when the feedback is about a
whole component or region, and --anchor-point <x,y> only when it is about one
spot. Build comments also take --anchor-lines <from,to> for a text snapshot.
build snapshots --json enriches each diff with test.metrics (flakiness:
stability, consistency, flakiness, all from 0 to 1) and, on a change, change
(id, ignored, occurrences). High occurrences or flakiness flags a
change worth ignoring; pass its change.id to change ignore.
analytics starts each day, week and month at midnight UTC. The Analytics page
uses the viewer's browser time zone, so pass --time-zone <iana> (e.g.
Europe/Paris) to get the same numbers. A date in --from starts at midnight
in that zone, and a date in --to includes the whole day.
Common flows
Review a build (inspect with a project token, decide with a PAT):
ARGOS_TOKEN=<project-token> argos build snapshots <ref> --needs-review --json
argos review create <ref> --token <pat> --event approve --json
# regression: argos review create <ref> --token <pat> --event reject --body "..."
Silence a flaky change (inspect with a project token, ignore with a PAT). Ignored changes stop requiring review and are auto-approved on future builds:
ARGOS_TOKEN=<project-token> argos build snapshots <ref> --json # read each diff's change.id + occurrences
argos change ignore <changeId> --token <pat> --project owner/project
# revert: argos change unignore <changeId> --token <pat> --project owner/project
Work through a project's flakiness backlog. test list returns the tests still
running in the project, flakiest first, so the first page is what to stabilise;
change list audits what has already been silenced:
ARGOS_TOKEN=<project-token> argos test list --project owner/project --json --limit 20
ARGOS_TOKEN=<project-token> argos change list --project owner/project --json # already ignored
Diagnose a flaky test before deciding whether to fix it or ignore it. test get
reports how flaky it is; test changes lists the distinct changes most-frequent
first, each with the diff, baseline and head image URLs to look at:
ARGOS_TOKEN=<project-token> argos test get <testId> --json # flakiness, stability, consistency, series
ARGOS_TOKEN=<project-token> argos test changes <testId> --json # occurrences + diff/base/head URLs per change
# a change with occurrences > 1 that nothing in the UI explains is flaky:
argos change ignore <changeId> --token <pat> --project owner/project
Export screenshots to a directory. Files are laid out by snapshot name
(chromium/home.png), so screenshots uploaded from a directory come back under
the same paths; a name without an image extension gets one. The directory must
be empty or not exist yet. baseline download takes the newest build of the
default branch (or --branch) that Argos can use as a baseline, for one
--build-name (default unless given); failure screenshots are left out:
ARGOS_TOKEN=<project-token> argos build download <ref> -o ./screenshots --json # { build, directory, files: [{ name, status, path, url }] }
ARGOS_TOKEN=<project-token> argos baseline download -o ./baseline --build-name storybook
Look up how an Argos feature works before guessing at a config option or flag.
Append .md to a result's URL to read the whole page as Markdown:
argos docs search "parallel builds" --json # [{ title, url, excerpt }], best match first
curl "$(argos docs search "parallel builds" --json | jq -r '.[0].url').md"
Upload screenshots in CI:
argos upload ./screenshots --token $ARGOS_TOKEN
Parallel builds:
argos upload ./screenshots --parallel-nonce $ID --parallel-index $i --parallel-total $n
argos finalize --parallel-nonce $ID
Onboard someone onto a team and a project. Team roles (owner, billing,
member, contributor) come from account, per-project access from
project contributor. billing is a member who also manages the plan, spend
limit and invoices. Every role but contributor already reaches every project,
so only contributors need a grant:
argos account invite create dev@acme.com --account acme --level contributor --json
argos account member list --account acme --search dev --json # read back user.id once they accept
argos project contributor set <userId> --level reviewer --project acme/web --json
Configure a project. project update only changes the settings you pass, and
prints the project back so you can check what it ended up with:
argos project get --project acme/web --json
argos project update --project acme/web --summary-check auto --ignore-changes true --auto-ignore-after 3 --json
Rotate a project token without downtime: create the replacement, update the CI
secret, then revoke the old token once CI stops using it (its lastUsedAt stops
moving). Tokens get every permission and never expire unless told otherwise:
argos project token list --project acme/web --json # find the old token's id
argos project token create --project acme/web --name "GitHub Actions" --expires-in 365 --json \
| jq -r .token | gh secret set ARGOS_TOKEN # never echo the value
argos project token revoke <oldTokenId> --project acme/web
One token for several projects (a monorepo, say) comes from the account, and CI then names the project on every command:
argos account project-token create --account acme --projects web docs --name Monorepo --json | jq -r .token | gh secret set ARGOS_TOKEN
ARGOS_PROJECT=acme/web argos upload ./screenshots
Send build and deployment events to an endpoint. webhook create prints the
signing secret once: store it where the endpoint reads it, to verify the
webhook-signature header (Standard Webhooks):
argos webhook create --account acme --url https://hooks.acme.com/argos \
--events build.completed build.reviewed --projects web --json \
| jq -r .secret | gh secret set ARGOS_WEBHOOK_SECRET # never echo the value
Debug a webhook. Argos retries a failing delivery, then marks it failed;
deliveries are kept 7 days. delivery get shows the request Argos sent and the
start of the response. Once the endpoint is fixed, resend: the new delivery
keeps the event's webhook-id, so the endpoint can skip events it already
processed:
argos webhook delivery list <webhookId> --account acme --status failed --json
argos webhook delivery get <webhookId> <deliveryId> --account acme --json # responseStatus, failureReason, responseBody, event
argos webhook delivery resend <webhookId> <deliveryId> --account acme --json
Ask for a review on a build, then check who is still on the hook:
argos review reviewer add <ref> <userId> --token <pat> --project acme/web
argos review reviewer list <ref> --token <pat> --project acme/web --json