Skip to content
caiopizzolPublic

Latest commit

 

History

321 Commits

Folders and files

Repository files navigation

keypin

keypin

Rotate a key everywhere it's used.

npm version MIT
keypin.dev · Docs · Console · API keys

The keypin CLI is free and open source. No account, no server, and it never stores a value.

What is keypin?

When a key has to change, keypin replaces it at the provider and everywhere the project publishes it. keypin rotate makes the new key, publishes it to each destination the project's secretspec.toml lists for it, and revokes the old one only after you approve. keypin status shows what's due across all your projects.

secretspec says which keys a project needs and runs it with them. keypin keeps those keys fresh everywhere, from settings under [tool.keypin] in the same file. Values stay in your vault.

Rotation Destinations Vaults
Resend GitHub Actions 1Password
Neon Cloudflare Workers Infisical
OpenAI Vercel projects Bitwarden
Supabase Supabase Functions Doppler
Cloudflare API tokens Netlify projects AWS Secrets Manager
OpenRouter Railway services
Google Cloud API keys Convex deployments
ElevenLabs Fly.io apps
AWS IAM access keys GitLab CI/CD
SendGrid
Twilio API keys
xAI
Google Cloud service account keys
MongoDB Atlas
Secrets you generate

Want another? Vote for it on the roadmap.

Install

keypin runs on macOS, and on Linux with glibc (not Alpine), on arm64 or x64. It works with secretspec, which you install too.

npm install -g keypin

Get started

cd ~/code/my-project
secretspec init                 # declare the keys in secretspec.toml
keypin check                    # what the project uses, what's missing, and what to add
keypin publish --all            # write production keys to their destinations
keypin rotate RESEND_API_KEY    # make a new key at the provider, save it to your vault and publish it

Get started walks through each step. rotate needs the key's issuer first. publish and rotate show a plan and wait for you to answer y.

Commands

keypin rotate <VARIABLE>                 # replace a key at its provider, then publish it
keypin rotate --due                      # rotate every key that is due
keypin status                            # every project's keys, and when each is due for rotation
keypin publish <VARIABLE> | --all        # write production keys to their destinations
keypin check [folder]                    # report one project; writes nothing
keypin unregister [folder]               # stop listing a project

--profile <name> picks another profile. keypin <command> --help lists every option, and keypin --help the exit codes.

Use with an agent

The keypin skill teaches a coding agent to use keypin without seeing values, and to hand each approval back to you:

npx skills add caiopizzol/keypin       # this project
npx skills add caiopizzol/keypin -g    # all your projects

Docs

Releases

Used by

Contributors

Languages