CLI Reference
capy is the terminal companion to the menu bar app. It reads the same Keychain-backed vault, so every command that reads a value asks for Touch ID.
Installation
The binary ships inside Capykeys.app. Symlink it onto your PATH:
# /opt/homebrew/bin is on PATH and writable without sudo on Apple Silicon.
# On Intel, use /usr/local/bin (may need sudo).
BIN=$([ -d /opt/homebrew/bin ] && echo /opt/homebrew/bin || echo /usr/local/bin)
ln -sf /Applications/Capykeys.app/Contents/MacOS/capykeys-cli "$BIN/capy"
# capykeys is kept as an alias, so anything already scripted keeps working
ln -sf /Applications/Capykeys.app/Contents/MacOS/capykeys-cli "$BIN/capykeys"The command used to be called capykeys. Both names run the same binary and always will — there is no deprecation warning, because stderr noise on every invocation breaks scripts that treat any stderr output as failure.
Commands that never read a secret
No Touch ID, nothing revealed. These are safe in scripts and safe to hand an agent.
capy list
Every key — provider, group, tags, and age. Never values. A ⚠ on the age means the secret is old enough to be worth rotating.
capy list
# PLATFORM GROUP TAGS AGE
# Anthropic General 2w
# CoinGecko Cheapass 4d
# Vercel higharc 0dcapy ref
Print a key's capy:// reference. It emits the shortest form that resolves unambiguously — see References.
capy ref figma
# → capy://figma
capy ref anthropic --group general
# → capy://anthropic/general
capy ref coingecko --field COINGECKO_SECRET_KEY
# → capy://coingecko#coingecko_secret_keycapy env --names
Which environment variable each key would get, without reading anything. Name the keys — bare, it wants the interactive picker and fails in a script.
capy env --names coingecko
# COINGECKO_API_KEY ← CoinGecko (Cheapass) / COINGECKO_API_KEY
# COINGECKO_SECRET_KEY ← CoinGecko (Cheapass) / COINGECKO_SECRET_KEYcapy skill
Print the agent skill — what an AI assistant needs to know to act on a reference. See Agents.
capy skill # stdout
capy skill --install # ~/.claude/skills/capykeys/SKILL.md
capy skill >> AGENTS.md # any other harnessCommands that read a secret
Each one prompts for Touch ID. Choose by where the value needs to end up.
capy run
Injects secrets into a child process only. They never reach stdout, a file, or your shell history — this is the one to reach for when the destination is a command.
capy run -e OPENAI_API_KEY=openai -- npm start
capy run -e GITHUB_TOKEN=github/work -- ./deploy.sh
# A .env of capy:// references. The file is safe to commit;
# the values are not in it.
capy run --env-file .env -- npm run dev
# No -e flags, in a terminal: multi-select picker, conventional
# names derived automatically.
capy run -- npm startcapy env
Emits export lines for your current shell. eval is required — without it the lines just print.
eval "$(capy env openai github/work)"
eval "$(capy env --dotenv openai)" # NAME=value instead of export linescapy get · capy resolve
Print a value to stdout. Use these only when the secret genuinely has to be materialised — a config file, a request body. Anything on stdout can end up in a log or a transcript.
capy get openai
capy get coingecko --field COINGECKO_SECRET_KEY
capy get github --group work --copy # clipboard instead of stdout
capy resolve capy://anthropic/generalcapy pick
The default with no arguments: browse interactively, grouped the way the menu bar groups them. Type to filter, ↑↓ to move, ⏎ copies after Touch ID.
capy
capy pick aws # open with a filter already appliedManaging keys
# The secret is never an argument — arguments are visible to every
# process via ps. It's read from a hidden prompt, or piped.
capy add github --group work --tags dev,ci
pbpaste | capy add openai
capy mv github --group work --to personal
capy mv openai --to general # take it out of its group
capy rm github --group work
capy rm github --force # skip the confirmation, for scriptsTags are letters and digits only, three at most. A group of General is the default bucket and is never stored as a real group. Moving a key changes its reference, and a group holds one key per platform, so capy mv refuses a move that would put a second one there.
Field names and env vars
Field names match case-insensitively, and space, hyphen and underscore are interchangeable — so secret-access-key finds Secret Access Key.
Environment variable names come from the vendor's own convention — OPENAI_API_KEY, GITHUB_TOKEN, HF_TOKEN — with PLATFORM_API_KEY as the fallback. Multi-field keys yield one variable per field. Check any of it with capy env --names.
Omit the arguments
Every command that needs a key will ask for one if you don't name it. On a terminal you get the same grouped picker; in a script it stays a hard error, so automation never blocks on hidden interactivity.
capy ref # pick a key, print its reference
capy get # pick a key, Touch ID, print the secret
capy rm # multi-select, then confirm
capy mv --to work # multi-select, then move
capy env # multi-select, export lines
capy run -- npm start # multi-select, names derivedShell completion
Completion is live: platform and group arguments complete from your actual vault, so capy ref ⇥ offers the keys you have.
capy completions zsh > "${fpath[1]}/_capy"
capy completions bash > /usr/local/etc/bash_completion.d/capy
capy completions fish > ~/.config/fish/completions/capy.fish
# no argument: picks from $SHELL
capy completionsTouch ID is interactive
Every command that reads a value prompts, so they fail in headless and background contexts — retrying in a loop accomplishes nothing. For unattended work, keep the secret inside one process with capy run, and use list, ref and env --names to reason about what exists without triggering a prompt.