Skip to Content
RabbitLock Docs

Quickstart

Install RabbitLock, store a secret, and run your coding agent with brokered credentials.

Prefer to let your agent do it?

Paste this into your coding agent: Set up RabbitLock for this project: read https://rabbitlock.com/agents.md and follow it. See Set up with your agent.

You need Node.js 20 or newer. For Node's built-in fetch to go through the proxy, the agent's tools need Node 22.21+ or 24.5+.

Install

npm install -g @rabbitlock/cli

Create your identity and policy

Run this in the repository your agent works in:

rabbitlock init

This creates:

  • ~/.rabbitlock/identity: your private key seed. Back it up and never commit it.
  • ~/.rabbitlock/ca/: a local certificate authority, used to inspect requests to your allowed hosts.
  • rabbitlock.agent.yaml: your policy. Commit it; it contains no secrets.

Your encrypted secrets and receipts are kept on your machine, in ~/.rabbitlock/projects/<project>, so nothing secret goes in the repo. To share secrets with teammates later, see Teams.

Store a secret

echo -n "$GITHUB_TOKEN" | rabbitlock set GITHUB_TOKEN
# or type it at a hidden prompt:
rabbitlock set STRIPE_API_KEY

Values are encrypted on your machine. Already have a .env? rabbitlock import .env --delete stores all of it in one step.

Say where each secret may go

Edit rabbitlock.agent.yaml:

rabbitlock.agent.yaml
secrets:
  GITHUB_TOKEN:
    hosts: [api.github.com, github.com]
  STRIPE_API_KEY:
    hosts: [api.stripe.com]
    approval: once   # ask a human the first time it's used in a session

A secret that isn't listed here is never given to the agent.

Run your agent

rabbitlock run -- claude

The first line printed shows which secrets are brokered and which sandbox is active:

rabbitlock: brokering 2 secret(s) [GITHUB_TOKEN, STRIPE_API_KEY] for `claude` (sandbox: claude-settings) via http://127.0.0.1:60775; receipts -> /path/to/repo/.rabbitlock/receipts.jsonl

Check what was used

rabbitlock receipts
2026-11-23T15:55:08.586Z  injected         GITHUB_TOKEN             GET api.github.com/user -> 200

What next

On this page