Docs · Build with agents

CLI reference

Reading as an agent? Every article is also served as Markdown — the full corpus is llms.txt, versioned with these docs.

Command-line interface

The postlane command wraps the REST API: every command prints JSON and exits with a code a pipeline can gate on. It runs the same checks as the web app and the assistant tools — the same preflight, the same delivery guards, the same receipt. It is the console script of the A1 Lane Python package (also runnable as python -m postlane) and uses the Python standard library only.

Configure

  • POSTLANE_URL — the server to talk to (or --url).
  • POSTLANE_TOKEN — a workspace API token (plt_…, scopes read ⊂ write ⊂ publish) for pipelines, or a session token (ses_…, printed by postlane auth login) for your own account actions (or --token).
  • POSTLANE_WORKSPACE — the default workspace id (or --workspace / -w). --pretty indents the JSON.
shSign in, mint a pipeline token, schedule a post, wait for its receipt
export POSTLANE_URL=https://a1lane.ai
postlane auth login --email [email protected]      # prints a session token
export POSTLANE_TOKEN=ses_…
postlane workspaces list
export POSTLANE_WORKSPACE=ws-…
postlane tokens create pipeline --scope read --scope write --scope publish   # shown once
export POSTLANE_TOKEN=plt_…                       # pipelines use the workspace token
postlane create --caption "Today's clip" --to acc_… --at 2026-11-07T09:00:00-08:00
postlane status post_… --wait                     # exit 0 only when every destination is live

Exit codes

CodeMeaning
0Done — every destination settled as asked.
1Error — the request was refused or failed; the JSON says why.
2Not done yet — destinations are still active.
3Attention needed — a failed, uncertain or blocked destination, or an unhealthy account.

Commands

41 commands, read from the CLI's own argument parser on this request.

CommandWhat it doesUsage
platformspostlane platforms [-h]
authsign up / log in as an ordinary user; prints a session token
auth signuppostlane auth signup [-h] --email EMAIL [--name NAME] [--password PASSWORD] [--code CODE]
auth loginpostlane auth login [-h] --email EMAIL [--name NAME] [--password PASSWORD] [--code CODE]
auth logoutpostlane auth logout [-h]
auth mepostlane auth me [-h]
workspaces listpostlane workspaces list [-h]
workspaces createpostlane workspaces create [-h] name
workspaces deletepostlane workspaces delete [-h] id
workspaces settingskey=value (require_approval=true, timezone=…)postlane workspaces settings [-h] [fields ...]
tokensworkspace API tokens (session token required)
tokens listpostlane tokens list [-h]
tokens createpostlane tokens create [-h] [--scope SCOPE] name
tokens revokepostlane tokens revoke [-h] id
members listpostlane members list [-h]
members invitepostlane members invite [-h] [--role ROLE] email
batchA-4: submit many posts from a JSON file; print the roll-uppostlane batch [-h] [--wait] [--timeout TIMEOUT] source
approvalrequest | approve | rejectpostlane approval [-h] [--note NOTE] id {request,approve,reject}
releaseG-4: release a post held for same-asset confirmationpostlane release [-h] id
handoffprint the handoff pack(s) for a postpostlane handoff [-h] id
accounts listpostlane accounts list [-h]
accounts connectpostlane accounts connect [-h] [--reconnect RECONNECT] [--from-file FROM_FILE] platform [fields ...]
accounts probepostlane accounts probe [-h] id
accounts disconnectpostlane accounts disconnect [-h] id
accounts showpostlane accounts show [-h] id
accounts settingspostlane accounts settings [-h] id [fields ...]
media addpostlane media add [-h] source
media listpostlane media list [-h]
media deletepostlane media delete [-h] id
createcreate a postpostlane create [-h] [--caption CAPTION] [--media MEDIA] [--to TO] [--at AT] [--draft] [--label LABEL] [--json JSON] [--wait] [--timeout TIMEOUT]
statuspostlane status [-h] [--receipts] [--wait] [--timeout TIMEOUT] id
listpostlane list [-h] [--status STATUS] [--limit LIMIT] [--offset OFFSET]
attentionpostlane attention [-h]
retrypostlane retry [-h] [--force] [--acknowledge] [--destination DESTINATION] id
cancelpostlane cancel [-h] id
deletepostlane delete [-h] id
duplicatepostlane duplicate [-h] id
publishqueue a draftpostlane publish [-h] [--at AT] id
resolverun the A-3 probe for an uncertain destinationpostlane resolve [-h] post destination
eventspostlane events [-h] [--after AFTER] [--limit LIMIT] [--follow]
exportpostlane export [-h]

Self-hosted operator commands

These act on a deployment's own data directory or its admin token. They are for people running their own server, not for the hosted service.

CommandWhat it doesUsage
serverun the engine + API in this processpostlane serve [-h]
seed-reviewerR-29: create/refresh the reviewer test workspace offline (2FA-exempt, no live platform)postlane seed-reviewer [-h] --email EMAIL --password PASSWORD [--workspace-name WORKSPACE_NAME]
backupsnapshot every database (SQLite backup API) + sync media/logs append-only to POSTLANE_BACKUP_TARGETpostlane backup [-h] [--target TARGET]
backup-drillrestore the newest snapshot into a scratch dir, integrity-check it and compare receipt countspostlane backup-drill [-h] [--target TARGET]
restorerestore a snapshot + the newer journal into the data dir (engine stopped); the next start quarantinespostlane restore [-h] [--snapshot SNAPSHOT] [--target TARGET] [--no-journal]
restore-bootcontainer boot: empty data dir + a backup set on POSTLANE_BACKUP_TARGET -> restore snapshot + journal (staged, verified, promoted); fails closedpostlane restore-boot [-h]
mfa-resetoperator recovery: turn off a user's 2FA and revoke their sessions (offline; no email path exists)postlane mfa-reset [-h] --email EMAIL
deletion-recordsQ-Del-5: list platform data-deletion (and deauthorize) records past 12-month retention (offline); --purge deletes thempostlane deletion-records [-h] [--purge]
tokenshow where the API token livespostlane token [-h] [--reveal]
healthpostlane health [-h]