Scripting & agents
This page is for coding agents and scripts that run artor. If you use the CLI yourself, the
CLI reference is all you need.
JSON output
Commands marked [--json] in the CLI reference print machine-readable output on
stdout. Everything else (progress, notices, the target line below) goes to stderr, so stdout stays
parseable.
- Single items include a
targetobject naming the organization and account the command acted in. Lists (includingartor account list) are a bare array with notarget. artor open --jsonprints the URL without opening a browser;artor open --signed-in --jsonprints{ url, authUrl, expiresAt }and opens no browser.artor status --jsonsetsorgsStale: truewhen the saved organization list couldn’t be refreshed, so a “not a member” answer may be out of date.
artor account list --json
A bare array: one { "kind": "account", ... } row per signed-in login, then one
{ "kind": "pending", "apiUrl": ... } row per login made by an older CLI that isn’t identified
yet. Tokens are never included.
- An account row’s status is
ok,invalid(runartor loginagain),suspended,deletion_pending,unreachable, orerror. - A pending row has a
reason:unreachable,suspended,deletion_pending,unsaved, orerror(withhttpStatus). Runningartor account listagain usually identifies it.
Review-anchor notes (agentNotes)
artor init and artor publish keep a Review anchors (Artor) section in the project’s
AGENTS.md (or CLAUDE.md), asking the agent to tag elements with data-testid so comment pins
stay on them. See Making a prototype easy to review.
With --json, both commands add an agentNotes field:
"agentNotes": {
"files": ["AGENTS.md"],
"status": "added",
"hint": "..."
}status is added, updated, current, disabled or failed. hint appears when the notes
were added, updated or failed. The section sits between artor review anchors comment markers;
anything you write inside them is replaced. Skip it for one run with --no-agent-notes, or for the
folder with "agentNotes": false in .artor/project.json. Turning it off never removes an
existing section.
Non-interactive runs
With no terminal, or with --json, the CLI never prompts.
- Say where to act. If the account or organization can’t be worked out on its own, pass
--org <ref>, plus--account <email>when more than one of your accounts belongs to it. See Organization context. - Confirm explicitly. Destructive commands need
--yes(-y) and an exact name or ID, not a partial match.artor rm --permanentneeds--confirm "<exact name>";--yesalone isn’t enough. - Pass every choice as a flag.
initfiles the prototype in the Organization Space’s Draft folder unless you pass--space/--folder; a folder name that doesn’t exist stops setup rather than being created.share setneeds a flag to know what to change. - Secrets from a pipe. Use
--password-stdinfor link passwords andenv set KEY --stdinfor values, so they never land in shell history.--password=<value>is refused. If the organization requires link passwords, an unattendedshare addwithout a password flag is refused. envandmockstay in the linked folder’s organization. In an unlinked folder with more than one possible organization they refuse. For them,--orgis a deprecated alias for--scope org, not an organization selector.unlinkwith no flags removes only the project link when there’s no terminal.
The target line
Before acting, most commands print one line to stderr naming the organization, account, and (when
known) Space, folder or prototype, for example -> acme · you@x.com · Client work / Checkout redesign.
Organization checks
Commands confirm the organization against your live membership list just before changing
anything. If the list changed (you left, the organization was renamed, or --org now resolves
differently), the command refuses and changes nothing; run artor account list to refresh, then
retry. In a folder linked to one organization, an --org naming another is refused, with no
--force exemption: run artor unlink --link-only first, or run from another folder.
Flags
--flag valueand--flag=valueboth work.- A flag that needs a value but gets none (the next word is another flag, or it’s the last word) stops the command with exit code 1 before anything is fetched or written.
- For a note, label or description that starts with
--, use the=form:--message=--hotfix. - An empty value is accepted for text flags, but not for
--dir,--spaceor--folder.
Environment variables
| Variable | Effect |
|---|---|
ARTOR_NO_AUTOUPDATE=1 | Skip automatic CLI and skill updates for this run. |
ARTOR_SKILL_AUTO_UPDATE=0 | Turn off only the skill’s automatic update. |
ARTOR_GITHUB_TOKEN | Token for adding a skill from a private GitHub repository (artor skill add). |
ARTOR_REGISTRY_TOKEN | Upstream token for artor registry add. |
NO_COLOR / FORCE_COLOR | Disable or force terminal colors. NO_COLOR wins. |
Project-local installs, npx and CI never update themselves; they print a notice instead.