CLI reference
Every command and flag for the Pushary agent CLI
The Pushary CLI sets up your agent and connects your phone. Run it with npx so you always get the latest version, no install required.
npx @pushary/agent-hooks@latest <command>Commands
| Command | What it does |
|---|---|
setup | Configure Claude Code, Codex, Gemini CLI, Hermes, or Cursor with Pushary, and connect your phone |
doctor | Verify your installation: MCP connection, a test push, and an optional question round trip |
clean | Remove all Pushary configuration |
mode | Switch approval mode (push_only, push_first, notify_only, terminal_only) |
hook | Run as a tool-call hook (reads stdin, writes stdout). Used by the installed agents, not by hand |
setup flags
| Flag | What it does |
|---|---|
--key pk_xxx.xxx | Use this API key instead of prompting you to paste one |
--connect app | Pair the native Pushary mobile app over an end to end sealed channel. Mints and seals the key with nothing to paste. This is the default on a machine with no key. Type it to force pairing on a machine that already has one, which a plain setup would reuse without drawing a QR |
--connect browser | Approve in a browser tab instead. For a machine with no app, or a phone that cannot scan |
--connect web | Legacy browser subscribe page |
--skip-phone | Skip the phone step. Useful in CI or non-interactive shells. Prints the connect link instead |
# Typical setup
npx @pushary/agent-hooks@latest setup
# Non-interactive: pass the key, skip the phone step
npx @pushary/agent-hooks@latest setup --key pk_xxx.xxx --skip-phonedoctor
npx @pushary/agent-hooks@latest doctorChecks each configured agent, confirms the MCP server is reachable, discovers the available tools, and sends a test push. It will also offer to run a full question and answer round trip to your phone so you can confirm approvals work end to end.
mode
# Switch approval mode for the next 30 minutes
npx @pushary/agent-hooks@latest mode push_only --for 30m| Mode | Behavior |
|---|---|
push_only | Every time. Ask your phone for each approval, even while you are here, then apply your policy's timeout action |
push_first | When I'm out. Ask your phone only when you are away, or when Pushary can't tell you are at the agent's machine. While you are present, the decision stays with the agent or the Mac app |
notify_only | Updates. Alert your phone that approval is needed, then decide in the agent's own prompt |
terminal_only | Terminal. No approval alert, the agent's own prompt decides |
See Permission policies and the control panel for how modes and policies interact.
Environment variables
| Variable | What it does |
|---|---|
PUSHARY_API_KEY | Your API key. The CLI also saves the key to its own config, so this is optional once you have run setup |
See Get your API key for where the key comes from.
Was this page helpful?