@primerapp/primer-agent-cli
v0.1.1
Published
Hosted Primer agent CLI client.
Readme
Primer Agent CLI
Small hosted-client CLI for the Primer agent runtime.
The agent and tools run on a hosted Primer backend. This package only handles argument parsing, authentication headers, websocket transport, terminal rendering, user-question prompts, and lightweight diagnostics.
Install
npm install -g @primerapp/primer-agent-cliUsage
The initial npm package defaults fresh installs to staging while the
browser-login flow is being exercised before production promotion. An explicit
--target, PRIMER_AGENT_TARGET, or active stored login still wins.
primer-agent login
primer-agent doctor
primer-agent "Ask the agent to do something"
primer-agent --list-active-runs
primer-agent --attach-run run_123The browser login stores a target-bound mbcli_ token in
~/.primer-agent/config.json with user-only file permissions. For CI or
headless use, pass a credential explicitly:
export PRIMER_API_KEY=mb_user_key
primer-agent "Ask the agent to do something"Useful auth commands:
primer-agent auth status
primer-agent logoutEndpoint overrides are available for local or private deployments:
primer-agent login \
--target staging \
--app-url https://studio.staging.primerapp.com \
--api-url https://studio-backend.staging.primerapp.com \
--ws-url wss://agent-service.staging.primerapp.com/ws--debug-tools only renders raw tool input/output when the hosted backend sends
that data. If the backend sends redacted public metadata, the CLI keeps it
redacted.
