Docs
Install, CLI reference, MCP setup, and project scopes.
2-minute quickstart
Running in under two minutes
- Run the scan offline in one command (no account):
npx -y @stitchaxis/latchkey@latest 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
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
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, open-access offline leak scan (no licence; nothing leaves the machine)latchkey login <token>, activate licencelatchkey setup, first-run wizardlatchkey doctor, check this machinelatchkey scrub, clean a text file offlinelatchkey 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": ["-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.