StaqOn CLI

The fast way to integrate with StaqOn

One terminal command instead of an HTTP client. No API key to generate, store, or rotate — your paired session carries your workspace's authority. Built for anyone who'd rather script a workflow than build one.

npm install -g @staqon.one/cli

Why the CLI instead of calling the API directly

→
No key handling, ever. Every other integration path starts with generating an API key and deciding how to store it safely. The CLI skips that: you approve a device-pairing code once from your StaqOn dashboard, and every call after that goes through StaqOn's own proxy on your workspace's behalf. The key never touches your terminal, your shell history, or a config file you could leak.
→
Automatic team resolution. Workspaces with more than one active team normally have to pass the right key or team id on every request. The CLI resolves that for you — if there's exactly one eligible team for a command, it just works; if there's more than one, it tells you which ids to choose from instead of making you look them up first.
→
Built for scripts, not just a terminal. Pass --json anywhere and every command returns machine-readable output with stable exit codes (not signed in, rate limited, team/key problem, consent missing) you can branch on in a cron job or CI step without parsing error strings.
→
Sessions renew themselves. A cron job or server process that calls the CLI at least once every 90 days stays signed in indefinitely (up to a 1-year absolute cap) — nothing to refresh, nothing to re-auth.
→
Same validation, same responses. Under the hood every CLI command hits the exact same endpoint a direct API call would. You're not trading correctness for convenience — you get the convenience for free.

Quickstart

  1. Install

    npm install -g @staqon.one/cli

    Requires Node 18+.

  2. Sign in

    staqon login

    Prints an 8-character code and a link. Open it (or go to /cli and type the code) while signed in to StaqOn as the workspace owner, pick a workspace, and approve. The workspace owner must have “Allow CLI access” turned on first (Workspace Settings → API → CLI access).

  3. Confirm you're paired

    staqon whoami

    Shows which workspace you're paired to, your rate-limit usage, and which commands are available to you.

  4. Run something real

    staqon messages send --email jane@example.com --message "Hello!"

    That's it — no key to pass, no base URL to remember.

What you can do from your terminal

Members & messaging

  • staqon members list

    List, search and manage your External team

  • staqon messages send

    Write into a member's thread as the workspace

  • staqon internal-message

    Push a one-way update to a member's API feed

Verify & ads

  • staqon verify start

    Push an approval prompt for a sensitive action

  • staqon ad send

    Broadcast an ad-style card to an external team

  • staqon escalation raise

    Open an escalation matter, with priority and due date

Link

  • staqon link invite --email jane@example.com --external-ref customer-482

    Create a single-use invite token for one customer — you deliver it yourself (email, SMS, your own CRM)

  • staqon link list

    See your workspace's approved Link connections: email, StaqOn username, when they linked

Link has no --team — it's one connection per workspace, and your Link signing secret never leaves StaqOn's server: the CLI signs through the same paired session as every other command, on your workspace's behalf.

Built to script

Add --json to any command for machine-readable output and stable exit codes — useful in a cron job or CI step where you want to branch on the result, not parse prose:

staqon --json link list || echo "exit code: $?"

Exit codes: 3 not signed in · 4 rate limited · 5 team/key problem · 6 consent missing · 1 anything else.

Ready to try it?

Install the CLI, pair it to your workspace, and send your first message in under five minutes.