npx passport-bridge@latest init does it in one pass: see the developer quickstart.
Passport CLI is for terminal coding agents and automation. It talks to the same Passport connection as Claude, Cursor, and ChatGPT — same access rules, Safety, approvals, and Activity log.
Prefer the normal Add agent setup for apps with a GUI (Cursor chat, VS Code chat, Claude Desktop, Claude.ai, ChatGPT). Claude Code and Codex CLI can use either path; using the CLI does not turn off other connections.
Install and sign in
Works on Windows, Linux, and macOS. Needs Node.js 22.23.2 or newer.- Windows (PowerShell)
- Linux
- macOS
1
Install once
The
passport-bridge package ships both passport and passport-bridge.2
Sign in
Run The terminal prints what to expect:Codes expire after 10 minutes and work once. Nothing connects until you click Connect, and Deny stops the terminal. If you’re already signed in to Passport in that browser, you’ll see your workspace straight away; Use a different account picks another. Login stores a rotating credential in To switch later on a machine with more than one profile, inspect and select the local active profile explicitly:
passport login. It opens your browser. Sign in with Google, GitHub, or a code sent to your email, check that the code on the page matches your terminal, then click Connect. New to Passport? Name your workspace on the same page and you’re in.~/.passport/credentials.json with owner-only permissions and makes that profile active.Already know the workspace? passport login --workspace ws_… signs in to it directly. Self-hosted deployments also pass --cloud <origin>. On SSH, CI, or another headless host, add --no-open so Passport prints the link instead of launching a browser; open it on any device:3
Search, inspect, and run
search returns namespaced tool names. Pass one directly to describe or run; no name translation is required.Commands
Every command accepts
--profile, --json, --timeout, --quiet, and --caller.
passport discover is how Inventory → Outside Passport findings reach Passport; it is the only source. It is headless and cross-platform, which suits an onboarding script or a scheduled MDM job, and it reports limited configuration metadata only—never paths, commands or arguments, environment values, headers, credentials, endpoint paths or query strings, prompts, files, tool payloads, or traffic. See Inventory.
Diagnose and complete
doctor returns every check even when one fails. Human output includes a safe,
actionable fix; --json returns a stable report suitable for support automation.
Neither form prints credential values, response bodies, or member identity.
passport version --json is also offline. It returns version, profileCount,
profileSelected, selectionSource, next, and optional endpoint/profile
fields. passport ready --json runs the local, authentication, server, and
exact CLI-protocol preflight and returns ready, ok, auth/profile context,
server, and checks; gate on its ready value and exit code rather than
parsing human output.
Install generated completion in the standard location for your shell:
JSON and exit-code contract
With--json, stdout contains exactly one JSON value. Hints and warnings go to stderr, so an agent can pipe results without stripping human output. JSON errors have this stable shape:
passport run --wait <sec> retries only a definite approval_pending response. It never retries a timeout or network failure because the execution outcome could be ambiguous.
For passport describe <tool> --json, tool and parameters remain the
Passport-native fields. The response also includes the conventional aliases
name (same value as tool) and inputSchema (same value as parameters);
agents can use either vocabulary without translating tool definitions.
Profiles and attribution
The default profile usescli as its policy agent. Login activates the newly completed profile. When no explicit or environment selector and no valid active profile are present, CLI 0.8.1 detects exactly one CLI-owned profile (client: "cli" or the exact legacy cli@<workspace> shape) and makes that existing profile active. When several profiles are stored, passport profiles lists them and passport use <name> changes the local active profile without contacting Passport. If more than one CLI candidate remains, Passport refuses to guess and asks for an explicit selector. Scripts should use an explicit selector so they cannot accidentally run against another workspace.
--caller <id> takes precedence. Activity labels it as self-reported, for example Passport CLI · Codex via CLI; the authenticated member or agent and the policy agent remain separate identities.
OpenCode is a first-class policy identity too, but it is not listed in the Add agent hub — set it up with the CLI. Use --client opencode --profile opencode@work when its selection and Activity should remain distinct from other terminal agents.
Headless, CI, and cron
For scripts and CI, create an automation key in Agents → Automations, then inject it and the workspace endpoint through your CI secret store. Environment-key mode works withoutpassport login and writes no local credential file.
passport connect from an interactive member profile when an app needs personal OAuth.
Legacy agent keys are non-interactive: they do not create action-time member
approval prompts. Use a member profile for an operation that must pause for a
human’s one-off approval.
The CLI never wraps provider APIs directly and never bypasses the gateway. It calls Passport’s governed meta-tools and
MCP resource/prompt methods, so CLI and MCP usage share one policy and audit pipeline.