Skip to main content

KeyBank

Tell an agent “use the development key.” It matches that phrase to a catalog entry and either writes the key into a .env file or sets it for the command it is about to run.

The same skill can add a new API key from a description. The only thing you paste yourself is the secret, into one file: ~/.keybank/secrets.env.

Quick start

  1. Install the CLI.
pipx install agent-keybank

uv tool install agent-keybank works too.

  1. Run setup once. It creates ~/.keybank and asks which coding agents you use, then installs the skill for those agents.
keybank setup

Non-interactive:

keybank setup --agents all
keybank setup --agents claude,codex,cursor
  1. Tell an agent what secrets you need. It writes the ids and descriptions. You paste each secret into ~/.keybank/secrets.env. After that, “use the development key” is enough.

After install

Say something like: “I need a development key and a production key for my API, both exposed as SERVICE_API_KEY.”

The agent adds catalog entries with ids, descriptions, and the runtime name. It does not see the secrets.

Open ~/.keybank/secrets.env and paste the values yourself:

service-prod=...
service-dev=...

Do not ask the agent to open that file. Agents must never read it.

From then on you can say:

  • “Use the development key and put it in this folder’s .env.”
  • “Run this script with the production key.”
  • “Add a staging key that maps to SERVICE_API_KEY.”

Where keys live

The bank is on the machine, not in any git repo. Override the location with KEYBANK_HOME.

File Who may read it What it holds
~/.keybank/catalog.yaml You and agents Id, description, aliases, runtime name, public companions
~/.keybank/secrets.env You and the keybank CLI only The secret for each id

catalog.yaml never contains secrets. secrets.env is mode 600 and stores values under the catalog id:

service-prod=...
service-dev=...

What setup does

keybank setup creates ~/.keybank/ with catalog.yaml and secrets.env if they are missing, then copies the skill into the agent folders you chose.

--agents all covers Claude Code, Codex, Cursor, OpenCode, Gemini, Factory, Grok, and Amp.

Re-run keybank setup to refresh the skill. The bank stays put. pipx upgrade agent-keybank (or uv tool upgrade agent-keybank) refreshes the CLI.

pipx uninstall agent-keybank

Uninstall removes the CLI. It does not delete ~/.keybank.

Commands

Discover keys. These print ids and descriptions, never secret values.

keybank list
keybank list --json
keybank show development
keybank resolve "personal project"

Load a key into a folder as the runtime name the process expects.

keybank load development --into ./scripts/my-probe/.env
keybank load service-dev platform-work --into ./scripts/my-probe/.env
keybank load service-dev --as OTHER_API_KEY --into ./scripts/my-probe/.env

--into DIR writes DIR/.env. --as VAR renames the secret for one key.

Run a command with the key in the process environment and skip writing a file.

keybank run development -- python script.py

Add a catalog entry. Then paste the secret into ~/.keybank/secrets.env. You can also run keybank set-secret <id> and type it at a hidden prompt.

keybank add service-dev \
  --description "Development environment" \
  --alias dev --alias development \
  --maps-to SERVICE_API_KEY \
  --public SERVICE_API_URL=https://api.dev.example.com

Other commands: keybank init, keybank remove <id> --yes, keybank doctor, keybank home.

Catalog format

Agents may read this file. Keep secrets out of it.

keys:
  - id: service-prod
    description: Production API, personal project
    aliases: [prod, production]
    maps_to: SERVICE_API_KEY
    public:
      SERVICE_API_URL: https://api.example.com

  - id: service-dev
    description: Development environment
    aliases: [dev, development]
    maps_to: SERVICE_API_KEY
    public:
      SERVICE_API_URL: https://api.dev.example.com

maps_to is the environment variable the process should see. That is how two keys both become SERVICE_API_KEY at use time. public holds non-secret companions such as a base URL.

Prefer letting an agent run keybank add. Hand-edits work if you stick to this shape.

Agent skill

The skill is one file bundled with the CLI. It follows the Agent Skills standard. keybank setup copies it into the personal skill folders for the agents you pick.

New agent sessions pick it up from those folders. The skill tells the agent to use the CLI and to stay out of secret files.

Security rules

The CLI is the only process that should open secrets.env. It never prints secret values.

Generated .env files are mode 600. Add .env to .gitignore in the folder you load into.

keybank run is the safer option when you do not need a leftover file.

Do not put a master .env in a git repo root and do not ask an agent to open it.

Tests

python3 -m unittest discover -s tests -v

License

MIT. See LICENSE. Anyone can use, copy, modify, and distribute this, including commercially.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agent_keybank-0.1.0.tar.gz (19.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agent_keybank-0.1.0-py3-none-any.whl (16.8 kB view details)

Uploaded Python 3

File details

Details for the file agent_keybank-0.1.0.tar.gz.

File metadata

  • Download URL: agent_keybank-0.1.0.tar.gz
  • Upload date:
  • Size: 19.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for agent_keybank-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e9b7de1770bcd54c54a53f9647937a7c1b597ae3c61b286f1cb96120883de06c
MD5 00d7b1f9a58f94732f23d3e710ec1e50
BLAKE2b-256 f01d74d2b2d1969cab3a7f9d99eea58e59703583569a3e54f47c7cd134d3acd0

See more details on using hashes here.

Provenance

The following attestation bundles were made for agent_keybank-0.1.0.tar.gz:

Publisher: publish.yml on jackaldenryan/agent-keybank

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file agent_keybank-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: agent_keybank-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 16.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for agent_keybank-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dfc21bbf9323466c856268ba967dfc74b238ce9a443526def1cbe4a8b9e9a886
MD5 24b84e6c6cbbee8a661005e770771a46
BLAKE2b-256 e9efa037aa3520a36a64e42362656d0818626960cecec426aca176ac39b5b40d

See more details on using hashes here.

Provenance

The following attestation bundles were made for agent_keybank-0.1.0-py3-none-any.whl:

Publisher: publish.yml on jackaldenryan/agent-keybank

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.1.2

2 files

0.1.1

2 files

This release

0.1.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page