Skip to content

Getting started ​

Five minutes from nothing to an agent calling an API with a token it never sees.

1. Install ​

keymitt is a single binary. On macOS and Linux:

sh
curl -fsSL https://keymitt.walisayu.com/install.sh | sh

On Windows, in PowerShell:

powershell
irm https://keymitt.walisayu.com/install.ps1 | iex

To build from source instead, see Installation.

Then check that the keychain and the approval prompt work on your machine — --approval shows a test prompt:

sh
keymitt doctor --approval

Platform notes — Windows Hello, Linux polkit — are in Installation.

2. Store a secret ​

sh
keymitt add github --description "GitHub fine-grained token" --host api.github.com

keymitt prompts for the value twice, without echoing it, and stores it in your OS keychain. The --host flag allows the secret to be sent to api.github.com by http_request, and nowhere else.

For a secret that a program needs, allow the program instead:

sh
keymitt add pg-staging --description "staging DB password" --command psql --env PGPASSWORD

It prints psql → /opt/homebrew/bin/psql: keymitt resolves psql right away and stores its full path, so the secret can only ever go to that program — not to some other psql that appears on PATH later.

3. Connect your AI client ​

For Claude Code, print the registration command:

sh
keymitt setup claude

and run the command it prints, which looks like this:

sh
claude mcp add --scope user keymitt -- /Users/you/.local/bin/keymitt mcp

Any MCP client that can start a stdio server works; the command is keymitt mcp. See AI clients for hardening tips.

4. Ask for something ​

Ask your agent, for example: "Using keymitt, check which GitHub user my token belongs to." It will call list_secrets, then:

json
{
  "tool": "http_request",
  "arguments": {
    "url": "https://api.github.com/user",
    "headers": { "Authorization": "Bearer {{secret:github}}" }
  }
}

A prompt appears on your screen describing the request. Approve it, and the agent receives the response — with the token, if it appeared anywhere, replaced by [REDACTED:github].

5. Look back ​

Every use is recorded, without values:

sh
keymitt audit
json
{"ts":"2026-10-18T09:12:44Z","event":"http","secrets":["github"],"action":"GET https://api.github.com/user","approval":{"approved":true,"method":"touch-id/password","strong":true,"elapsed_ms":1840},"outcome":"HTTP 200","redactions":0}

Next ​

Released under the MIT or Apache-2.0 license.