Skip to main content

BKey CLI

Installation

Requires Node.js 22.12 or newer.

First-time setup

setup-agent --save stores the new agent as a named profile in ~/.bkey/profiles.json alongside your human session. The profile identifier is slugified from --name ("My Agent"my-agent); override with --profile <slug>. Agent mode is opt-in — invoke with --agent (uses the default agent profile) or --agent --profile my-agent (pin a specific one). List all profiles with bkey profiles.

Biometric approval from the terminal

Blocks until the user approves on their phone. Exits 0 on approval, non-zero on denial or timeout. Pipe it to gate any shell command:
Add --json to get the full approval token on stdout for downstream use. Add --amount, --currency, --resource, --recipient, --description to render structured details on the approval screen.

Commands

Dual-mode commands (vault, proxy, wrap, checkout) accept --agent / --human / --profile <name>. BKEY_PROFILE and BKEY_MODE=agent env vars work for shell workflows.

bkey clients — the developer dashboard, headless

Everything the bkey.id/developers dashboard does for “Login with bkey” is available from the terminal, so an agent working on your machine can set up and operate your integration for you the way flyctl operates a Fly app. Client management is owner-scoped to the signed-in human (bkey auth login); agent client_credentials tokens are rejected, and every command accepts --json.
--public registers a PKCE-only client (no secret) for SPAs and native apps. --no-vault skips the phone push on create and rotate-secret; the secret is then printed once and not stored anywhere. A rotation that times out may still have completed on the server — check whether the old secret still works before rotating again.

bkey wrap — inject vault secrets into a process

Run any program with vault-backed environment variables. Each {vault:name} placeholder triggers a biometric approval on the user’s phone before the command starts, and the decrypted value is delivered end-to-end to the CLI process:
The value is never written to disk. If the user denies, the wrapped command never runs.

Source

github.com/bkeyID/bkey/typescript/packages/cli