Skip to content

Command line ​

sh
keymitt <command> [options]

Secrets ​

add ​

sh
keymitt add <name> [--description <text>] [--command <program>]... [--host <host>]...
                   [--env <VAR>]... [--channel stdin|env|file|http]... [--from-stdin]

Stores a new secret. The value is prompted for twice without echo, or read from standard input with --from-stdin (for example pbpaste | keymitt add api --from-stdin --host api.example.com). Names use letters, digits, ., _ and -. --command psql resolves the program now and stores its full path. --env restricts which environment variable names the secret may be put in. Without --channel, --command enables stdin, env and file, and --host enables http.

update ​

sh
keymitt update <name> [--from-stdin]

Replaces the value of an existing secret.

rm ​

sh
keymitt rm <name> [--yes]

Deletes the value from the keychain and the entry from the policy. Asks you to type the name to confirm, unless --yes is given.

list ​

Shows every secret, whether its value is present in the keychain, and its channels, programs and hosts.

allow, disallow ​

sh
keymitt allow <name> [--command <program>]... [--host <host>]... [--env <VAR>]... [--channel <channel>]...
keymitt disallow <name> [--command <program>]... [--host <host>]... [--env <VAR>]... [--channel <channel>]...

Adds or removes rules. Allowing a host also enables the http channel; commands are stored as full paths.

Server ​

mcp ​

Runs the MCP server on standard input and output. Configure this in your AI client. Logs go to standard error; set KEYMITT_LOG (warn by default) for more detail.

Approvals ​

CommandPurpose
keymitt pendingList requests waiting for terminal approval
keymitt approve <id>Approve one; you type yes to confirm. Needs an interactive terminal
keymitt deny <id>Deny one

Backup ​

CommandPurpose
keymitt backup <file>Encrypted backup of the policy and all values. Strong approval and a passphrase
keymitt restore <file> [--overwrite]Restore with strong approval; existing values and entries are kept unless --overwrite

Audit ​

sh
keymitt audit [-n <lines>]

Prints the last entries (20 by default) of audit.jsonl, one JSON object per line. Events are add, update, remove, run, http, read_file, backup and restore. Entries record the secrets involved, the command or URL with placeholders, the approval (method, strength, elapsed_ms), the outcome and the number of redactions — never values. The log rotates to audit.jsonl.1 at 10 MB.

Setup and diagnostics ​

CommandPurpose
keymitt doctor [--approval]Check paths, policy (including bare program names), keychain, approval methods and curl
keymitt setup claudePrint the Claude Code registration command
keymitt setup polkitPrint the Linux polkit action and how to install it
keymitt pathsShow where keymitt keeps its files

Environment variables ​

VariablePurpose
KEYMITT_HOMEDirectory for policy.toml, audit.jsonl and pending approvals
KEYMITT_LOGLog filter for keymitt mcp, e.g. info or debug

Released under the MIT or Apache-2.0 license.