Docs
Install, CLI reference, MCP setup, and project scopes.
2-minute quickstart
Running in under two minutes
- Free scan (no account):
npx @stitchaxis/latchkey scan - Buy Pro → copy licence from /success or email
npm i -g @stitchaxis/latchkeylatchkey login <key>latchkey add MY_API_KEYthenlatchkey run -- …→ Approve
Cursor MCP: /integrations/cursor
How it fits together
- Website — buy plan, get licence, preview dashboard.
- CLI — real vault on your machine; Approve / Deny when something asks for a key.
- Project file —
.latchkey.tomlallowlists which names a repo may request.
Install
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.toml → [scope] allowed = ["MY_API_KEY"]
latchkey run -- node -e "console.log('got=', process.env.MY_API_KEY)"
# Approve? [y/N] → type y → EnterPackage: @stitchaxis/latchkey on npm. Full Windows notes: docs/FIRST_RUN_WINDOWS.md.
CLI reference
latchkey init— create vault + master key (keychain or--passphrase)latchkey add NAME— store a secret (value viaLATCHKEY_VALUE)latchkey get / list / rm— manage nameslatchkey run -- cmd— inject scoped env after approvallatchkey scan— free offline leak scan (upsell to Pro / Leak scan for the full product)latchkey login <token>— activate licencelatchkey lock— clear unlocked material from memory
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": ["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.