Passkey for AI documentation
Run ./install.sh --hardened, choose your presets, approve with Touch ID once, then restart Claude Code. Pro buyers run passkey license install license.json and team members run passkey team join <key>. Check everything with passkey status. An AI agent can do the checks for you: see Install with AI.
Install
Release status. Passkey for AI 1.x is in early release. Binary downloads arrive with the first signed release. Until then the installer builds one Swift file on your Mac from the release folder.
You need macOS 13 or later, a Touch ID sensor (a Magic Keyboard with Touch ID works), the Xcode Command Line Tools (xcode-select --install) for swiftc, and Claude Code with hooks support.
./install.sh --hardened
~/.claude/passkey/bin/passkey test-dialogThe installer lists the presets and asks about each one. stripe is recommended and on by default; the rest stay off unless you say yes. Then it asks for Touch ID once to approve your choice. Restart Claude Code.
| Flag | What it does |
|---|---|
--presets stripe,git | Skip the questions and turn on exactly these presets. --presets none keeps only the built-in guard. |
--mode window | One Touch ID opens a window per Claude session. |
--window-minutes 30 | Window length, 1 to 120 minutes. Default 15. |
--hardened | Root-owned binary in /usr/local/libexec/passkey and config in /usr/local/etc/passkey. Recommended. |
The first run backs up ~/.claude/settings.json to settings.json.bak-passkey before changing it and leaves your other hooks alone. Re-running the installer rebuilds, refreshes presets and asks before it changes your config.
Install with an AI agent
Claude Code, Codex or Antigravity can run the checks and the install command for you. Copy a prompt from Install with AI (tasks: install, activate a Pro license, join a Team, set up Team as an admin, add a custom rule, review the audit log, uninstall) or point an agent at /install.md.
The agent stops at every Touch ID step, because Passkey blocks agents from registering its hook, approving config changes and removing it. You do those steps yourself, so an agent can make the setup faster but not unattended.
How it decides
- Claude wants to run a tool. Passkey reads the call.
- If any block rule matches, the call is blocked with no prompt. Block always wins.
- If any auth rule matches, you get Touch ID (or a window approval in window mode). Cancel and the call is refused.
- If nothing matches, the call runs untouched.
Every decision goes to ~/.claude/passkey/audit.log. If the config is broken or changed without your Touch ID, Passkey enforces the rules you approved last, adds whatever the current files ask for, and drops to per-call mode. It never locks you out.
Two modes
| per-call (default) | window | |
|---|---|---|
| Touch ID | Every matching call | First matching call, then none for N minutes |
| Scope | That one call | That Claude session only |
| Good for | Money, production, anything rare | Long sessions with many routine actions |
| Block rules | Always block | Always block |
always_ask rules | Ask | Still ask every time |
| Close early | n/a | passkey lock |
{
"mode": "window",
"window_minutes": 15,
"presets": ["stripe", "git", "publish"]
}Presets
| Preset | Plan | Covers |
|---|---|---|
| built-in guard | Free, always on | Passkey's own files, signing key and approval record, its approve and uninstall commands, process kills, Claude Code settings changes |
stripe | Free | Stripe MCP, Stripe CLI and api.stripe.com: money out blocked, amounts over $1,000 blocked, the rest asks |
git | Pro | Force pushes to main and master blocked, pushes to main ask |
publish | Pro | Package publishes, production deploys, releases, terraform apply, kubectl apply or delete always ask |
shell-danger | Pro | rm -rf of home blocked, other recursive deletes, sudo, DROP DATABASE, TRUNCATE TABLE, docker volume removal ask |
Write your own rules
Add rules to "rules" in your config, or drop a new file into presets/.
{
"name": "prod-db-writes",
"tool": "mcp__supabase__execute_sql",
"field": "query",
"pattern": "\\b(insert|update|delete)\\b",
"not_pattern": "^\\s*select\\b",
"action": "auth",
"always_ask": true,
"describe": { "*": "write to the production database: {value}" }
}| Field | Meaning |
|---|---|
name | Shown in the audit log and block message |
tool | Regex that must match the whole tool name, such as Bash or mcp__stripe__.* |
field | Dot path inside the tool input to test. Default: the command for Bash, otherwise the whole input as JSON |
pattern, not_pattern | Regex that must match, and a regex that cancels the match |
scope | "command" matches inside one command the shell runs, leaving commit messages, echo and grep text out |
max | Matches if any number under the listed keys is above the limit |
action | block or auth |
describe, amount, live_flag | Plain-words dialog text, an appended amount, and a LIVE or test marker |
always_ask | Ask even inside an open window |
Check a config with passkey check-config. After you edit the config or a preset, run passkey approve in your own terminal and confirm with Touch ID. New rules apply at once; removed rules and window mode wait for your approval.
License
A license is a small signed file. Passkey checks it offline with a public key built into the program. A Pro license never needs a server. A Team license is refreshed by passkey team sync. Without one, Passkey runs the free plan and passkey status says which presets are off. The built-in guard never depends on a license.
passkey license # show the current license
passkey license install license.json # check the file and install itFor a hardened install, put the file in /usr/local/etc/passkey/license.json (needs sudo), or leave it in ~/.claude/passkey/, which is checked too. Lost your file? Open the link in your Stripe receipt.
Commands
| Command | What it does |
|---|---|
passkey status | Config path, approval state, mode, presets, rule counts, open windows |
passkey lock | Close every approval window now |
passkey check-config | Validate config and presets |
passkey approve | Approve config or preset changes with Touch ID |
passkey test-dialog | Show a Touch ID prompt to confirm the sensor works |
passkey license | Show or install a license |
passkey team join <member key> | Join this Mac to your Team with a key from your admin, then sync once |
passkey team enroll <token> | Enroll this Mac with an enrollment token and receive its own member key |
passkey team sync | Refresh the Team license and policy and ship new audit lines |
passkey team status | Show the team, the policy version, what is shipped and the last sync |
passkey team leave | Leave the team on this Mac |
Team
The Team plan adds a shared audit log, a signed policy, approval from a phone and reports. The Team guide covers setup. On a Mac these commands do the work:
passkey team join <member key> # key from your admin, starts with pkm_
passkey team enroll <token> # enrollment token, starts with pke_
passkey team sync # license, policy and audit lines
passkey team status # team, policy version, last sync
passkey team leave # stop syncing on this MacManaged preference. An MDM can set the key TeamEnrollToken in the preference domain com.passkeyforai.passkey. When it is present and the Mac is not enrolled, passkey team sync enrolls the Mac by itself, with the label <console user>@<hostname>. The admin portal downloads a ready .mobileconfig for it.
Files. State lives in ~/.claude/passkey/team/: team.json (the member key, mode 600), the last verified policy and a shipping offset. The built-in guard protects the folder like the rest of Passkey. A hardened install may keep team.json in the system folder.
When it syncs. On passkey team sync, and at most once an hour from the hook in a detached process that never delays a decision. A Mac with no team configured makes no network calls.
What is sent. With Team enrolled, Passkey sends the audit log lines (the action summary, the rule name, the decision, the session id and the time), the device name and the version to passkeyforai.com, plus approval requests. It never sends file contents, command output or prompts. A policy can turn audit shipping off for the team.
Security model
What it is: a guardrail that turns risky agent actions into a deliberate human act, with a readable description and a hardware check.
What it is not: a sandbox. Hooks run as you. Pattern rules over shell commands can be dodged by a determined process. Treat Passkey as one layer.
A user install is a speed bump, not a wall: the guard blocks the obvious ways in, but a same-user process that writes a script first and runs it later can get around it. --hardened moves the binary and config to root-owned folders and checks the owner and permissions of every file and parent folder on each call.
Timing. Claude Code gives a hook 75 seconds, and a hook that times out does not block. So Passkey waits at most 15 seconds for another open prompt, gives the Touch ID sheet 45 seconds, and a watchdog blocks the call at 70 seconds no matter what.
Found a gap? Open a private security advisory on the repository.
Uninstall
Run it yourself in a terminal. Removing Passkey needs Touch ID, and the guard blocks Claude from running the removal commands.
./uninstall.shIt removes the hook and the install folders and saves your audit log to ~/passkey-audit-<date>.log.