Keep API keys out of agent context with secure runtime secrets.
Project details
Keyclasp offers a secure way to manage and inject API keys into trusted commands without exposing sensitive information. By storing credentials in an encrypted local vault, it ensures that coding agents only access necessary secrets while running on local machines, reducing the risk of accidental leaks.
Keyclasp provides a secure solution for managing and injecting runtime secrets into coding agents, helping to keep API keys out of prompts and project files. By utilizing a local encrypted vault, Keyclasp allows developers to store sensitive credentials securely and access them via trusted command names without exposing plaintext secrets.
To demonstrate the functionality of Keyclasp, follow this quick example for setting up a demo vault and using a dummy credential:
Create a Temporary Vault Execute the following commands to set up a local demo vault:
demo_vault=$(mktemp -d)
export KEYCLASP_HOME="$demo_vault"
keyclasp init --machine-only
Store a Dummy Credential Store a sample API key for demonstration:
printf '%s' 'dummy-key-for-keyclasp' | keyclasp set DEMO_KEY --project demo --environment local
Run a Command Using the Credential Execute a command through Keyclasp to verify that the credential is accessible:
keyclasp run --project demo --environment local --env DEMO_KEY -- node -e 'console.log("Credential available:", Boolean(process.env.DEMO_KEY))'
Expected output:
Credential available: true
Keyclasp differs from alternatives like 1Password op run by offering a local-first approach that eliminates the need for cloud dependencies, providing a more straightforward and autonomous method for managing secrets tailored specifically for coding agents.
Keyclasp is designed for developers seeking to enhance security and control over runtime credential management without additional cloud complications.
Comments
0Start the conversation
Share the first comment.