LatchkeyLatchkey

Docs

Install, CLI reference, MCP setup, and project scopes.

2-minute quickstart

Running in under two minutes

  1. Run the scan offline in one command (no account): npx -y @stitchaxis/latchkey@latest scan
  2. Buy Pro → copy licence from /success or email
  3. npm i -g @stitchaxis/latchkey
  4. latchkey login <key>
  5. latchkey add MY_API_KEY then latchkey run -- … → Approve

Cursor MCP: /integrations/cursor

How it fits together

  1. Website, buy plan, get licence, preview dashboard.
  2. CLI, real vault on your machine; Approve / Deny when something asks for a key.
  3. Project file, .latchkey.toml allowlists which names a repo may request.

Install

One command starts the scan, then an optional licence, then the next steps. latchkey doctor checks Node, the home folder, and the keychain helper.

npx @stitchaxis/latchkey
# or, once: npm install -g @stitchaxis/latchkey
latchkey doctor
latchkey init

The master key is stored in Keychain when the helper loads.

npm install -g @stitchaxis/latchkey
latchkey --help
latchkey login <your-licence-key>

# Prefer OS keychain; on Windows if keytar fails:
latchkey init --passphrase
# PowerShell, every new terminal after passphrase mode:
$env:LATCHKEY_PASSPHRASE = "your-vault-password"
$env:LATCHKEY_VALUE = "sk-test-fake-not-real"
latchkey add MY_API_KEY
latchkey list
latchkey scrub notes.txt --policy general
latchkey run -- node -e "console.log('got=', process.env.MY_API_KEY)"

Package: @stitchaxis/latchkey. The unscoped latchkey name on npm is a different package.

CLI reference

MCP setup

Point your MCP client at the Latchkey stdio server. Set LATCHKEY_MCP_APPROVE=1 in the environment that launches the server so requests can prompt for approval. The tool name is latchkey_get_secret.

{
  "mcpServers": {
    "latchkey": {
      "command": "npx",
      "args": ["-y", "@stitchaxis/latchkey", "mcp"],
      "env": { "LATCHKEY_MCP_APPROVE": "1" }
    }
  }
}

Agent sandbox (planned)

Approve/deny ships today. Preview: latchkey run --sandbox -- … (warns only; see /agent-sandbox. Do not enable sandbox flags until announced in changelog.

.latchkey.toml

# Commit this file. Never put secret values here.
[scope]
allowed = ["OPENAI_API_KEY", "ANTHROPIC_API_KEY"]

Threat model: /security. Questions: Yusuf@yusuf-choudhury.com.