Rotate any API key in one command — verified end-to-end.
Install
npx
npx keyrotate setupHomebrew
brew tap Prompto-Studio/homebrew-tap && brew install keyrotatenpm -g
npm install -g keyrotatecurl
curl -fsSL https://raw.githubusercontent.com/Prompto-Studio/keyrotate/main/scripts/install.sh | bashWhy it exists
Rotating one API key isn't one step — it's six. The new key has to land in 1Password, in GitHub Actions, in Supabase, in your local .env, and be verified against the upstream provider before the old one is revoked.
Miss one and you've shipped a half-rotated key. The alert path breaks, or the old key stays alive, or your team's vault drifts out of sync. keyrotate does the whole rotation in one command, verifies the new key against the provider before writing anything, and leaves an audit log behind.
One command, four destinations
$ keyrotate rotate resend-alerts Provider: Resend Destinations: 1Password, GitHub, Supabase Create new at: https://resend.com/api-keys ✓ 1Password ready (vault: Private) ✓ gh ready, repo Prompto-Studio/Prompto-Bot-Img ✓ supabase ready, project lubvpbxxwyy… ? Paste the new Resend key (hidden): **** ▸ Verifying against Resend… ✓ ▸ Writing to 1Password… ✓ ▸ Writing to GitHub Actions secret… ✓ ▸ Writing to Supabase Edge secret… ✓ ▸ Triggering test-alerts workflow… ✓ ✓ Rotation complete (3/3 destinations).
Verifies against
ResendOpenAIGoogle Cloud
fal.aiElevenLabsStripe
NetlifySupabaseHuggingFace
PostHogAbuseIPDB+ custom
Writes to
1PasswordBitwardenGitHub Actions
Supabase EdgeNetlify env
Fly.io secrets.env file
Commands
setup
Interactive guided setup for any projectinit
Scaffold a minimal keyrotate.tomldiscover
Scan .env / 1Password / Bitwarden for existing keys (read-only)import
First-time import of an existing key into the vaultadd-custom
30-second wizard for any custom API providerrotate
Interactive rotation — paste a new keyauto-rotate
Zero-prompt rotation (Resend / PostHog)verify
Verify a single key against its providerverify-all
Read-only health check of every keycheck-rotations
What's due — supports --email via your own Resend keyself-check
doctor + discover + check-rotations in one passdoctor
Diagnose missing CLIs / auth / destination configaudit
Show the last N rotations (default 20)github-oauth
OAuth device flow for a GitHub OAuth tokenWhat's new in v00.00.19
Last sprint shipped four versions back-to-back, focused on onboarding and unattended operation.
- v00.00.16 — Bitwarden destination,
discoverscanner across.env/ 1Password / Bitwarden,importfor first-time onboarding,add-custom30-second wizard, full server / Docker / Windows install docs. - v00.00.17 —
Provider.create()capability andauto-rotatecommand for fully unattended rotations against Resend and PostHog. - v00.00.18 —
rotate_everypolicies andcheck-rotationswith optional email summary via the user's own Resend key (zero infrastructure on our side). - v00.00.19 — GitHub OAuth device flow (returns an OAuth token, not a PAT — honest about the limit) and
self-checkaggregate command.