On this page
Start · 02
Quickstart
Install the CLI, connect one registered agent, and start a governed Claude Code or OpenAI Codex session from your terminal.
Before you start#
- A Keydris account. Create one if you do not already have one.
- A registered agent with a policy assigned in the Keydris console. Copy its Agent ID; you will use it in the commands below. See Policies if you have not created one yet.
- Node.js 20+ with npm. The npm package supports Windows, macOS, and Linux on x64 and ARM64.
- Claude Code or the OpenAI Codex CLI installed and available in your terminal.
Install, connect, and run#
Pick your harness and replace <agent-id> with the Agent ID from the console:
Note
Linux and Windows WSL requirement. Linux users, including Windows users running through WSL, must install these required packages before starting the Keydris proxy:
Linux · Windows WSL
sudo apt-get install bubblewrap socatnpm install -g @keydris/clikeydris init claude-code <agent-id> # configures and signs in when neededkeydris status # checks the setupkeydris run -- claude # starts a governed Claude sessionkeydris init opens browser sign-in when this machine does not already have a valid identity for the selected agent. You normally do not need to run keydris login first. If init reports that sign-in is incomplete, finish it with keydris login before starting the proxy.
Note
&. A global npm installation is recommended because npm then owns the executable used by that background process. Do not install with --omit=optional, because the matching native binary is an optional platform package.Note
keydris: command not found? Your shell cannot see npm's global bin directory. This is troubleshooting only; most installations need no change.
diagnose
command -v keydris # no output means the shell cannot find itecho "$(npm config get prefix)/bin" # npm's global bin directoryecho "$PATH" # must contain that directoryIf that directory is missing from PATH and you use zsh, the macOS default, run this fix and also add the same line to ~/.zshrc so new terminals inherit it. Then run source ~/.zshrc or open a new terminal:
zsh
export PATH="$(npm config get prefix)/bin:$PATH"Installed through the native installer instead? It places keydris in /usr/local/bin, which is already on PATH.
Note
Getting 401 errors when minting a session? If you've followed the setup instructions but session minting still returns a 401, clear the locally stored identity data and try again:
terminal
rm -rf ~/.keydris-data/identity/*Then retry the session minting step.
On macOS or Linux, you can use the native stable-channel installer instead of npm. It verifies the downloaded binary checksum, and this path does not require Node.js:
macOS or Linux · native installer
curl -fsSL https://get.keydris.com/keydris-cli/install.sh | bashkeydris version # confirm the installationWhat each command did#
- npm install installed a small JavaScript launcher and the native Keydris binary for your operating system.
- init saved the Agent ID, generated the local CA, wrote the required Claude Code settings or Codex hooks, signed this device in when needed, and read the governed origins from the agent's assigned policy. The policy itself remains managed in Keydris, not in local CLI flags.
- proxy up started the brokered egress proxy as a background process. It prints the log path and the command used to stop it.
- status checked the stored identity, Agent ID, policy-derived scope, harness configuration, and control-plane reachability.
- Starting the harness began a session. Claude Code uses the lifecycle hooks written by init; Codex uses the Keydris wrapper. The session receives a short-lived KIT and renews it during long-running work.
Verify the setup#
terminal
keydris status # identity, agent, harness, scope, and control planekeydris proxy scope list # origins detected from the assigned policyCheck that the Agent ID is correct, the identity is valid, the control plane is UP, and your selected integration is wired. The scope should list the origins governed by the assigned policy. If init could not detect that scope, the first successful session refreshes it.
Your first ALLOW and your first REJECT#
Ask the agent to run one shell command your policy permits, then one it rejects. Seeing both outcomes is the fastest way to confirm that command governance is active before relying on it.
request · illustrative
agent → shell
$ git status
command rule matched · read-only Git operationdecision
ALLOW
policy permits
→ the harness executes the commandrequest · illustrative
agent → shell
$ git push --force origin main
same agent · more authority requesteddecision
REJECT
reason: command rule denied
→ blocked before execution · recordedInspect the evidence#
local evidence
keydris logs # print the local ledger and verify its hash chainYou can also open Audit in the Keydris console for the organization-level view. Decision and execution outcome are separate facts: an allowed action can still fail at the provider.
Remote shells and common fixes#
- If init cannot open a browser on a remote machine, run it first so the Agent ID is saved, then use
keydris login --no-browser. Open the printed URL in a browser to finish sign-in. - Run
keydris statusfirst when setup looks wrong; it reports expired identity, missing harness configuration, scope problems, and control-plane reachability. - Restart the background proxy with
keydris proxy downfollowed bykeydris proxy up. Its log is stored under~/.keydris-data/proxy.log. - If a native tool does not trust the generated CA, rerun your init command with
--trust-store. This changes the operating system trust store and may require elevated privileges. - For every available command and cleanup instructions, see the CLI reference.