KeyRotate

KeyRotate: rotate an API key, update everywhere it was used

A key manager for developers, for Mac and Windows. On a Mac, keys live in the macOS Keychain behind Touch ID; on Windows, encrypted to your Windows account behind Windows Hello. When one is replaced, KeyRotate updates every .env, config file and app that used it; and never quietly revokes the old one. And it rings when one of your keys turns up where it shouldn't: in AI chat logs, a repository's history or a web root.

Monthly subscription · macOS 14+ · Windows 10 and 11 Download ↓

You're on Windows. KeyRotate for Windows has the same features as the Mac app, with your keys encrypted to your Windows account and unlocked with Windows Hello.

KeyRotate for Windows Download Show the Mac version

API keys that are leaking right now

1,275,105
AI API keys and tokens leaked on public GitHub in 2025

28,650,000secrets of every kind pushed to public GitHub in 2025

About one AI key every 25 seconds, up 81% in a year. KeyRotate can't un-leak a key, but it makes replacing one, and updating every file that used it, quick.

  • 39M+ secrets leaked across GitHub in 2024, public and private repositories together, by GitHub's own count. GitHub
  • 64% of the secrets GitGuardian found valid in 2022 still worked when it re-tested them in January 2026. Leaked keys mostly never get replaced. GitGuardian
  • 24,008 secrets in MCP configuration files on public GitHub in 2025; 2,117 of them were live credentials. GitGuardian
  • 2,863 live Google API keys in public web pages that quietly gained access to Gemini when their projects enabled it. Truffle Security
  • 1,748 valid keys for 14 services, including cloud and payment providers, found across 10 million websites. Many stayed exposed for months or years. Stanford & UC Davis, CCS '26

Read the latest leak news: the breaches KeyRotate has warned its users about, and what to do →

The two counters are estimates. GitGuardian counted 1,275,105 AI-service secrets and 28.65 million secrets in all pushed to public GitHub in 2025; the counters run those rates forward from 1 January, so the real figures are likely higher. Source: The State of Secrets Sprawl 2026

Black OctoberOctober's critical PHP flaws are only half the story: what attackers want from the servers they get into is the AI keys stored there. Video by Nate B Jones (AI News & Strategy Daily) · Watch on YouTube

What it does

Rotate where the vendor allows it

Cloudflare, Linode, Twilio, Perplexity, Fireworks and Resend can issue a replacement key through their API. KeyRotate asks for one, checks it works before saving it, saves it, then checks again; and restores the previous key if anything fails.

Honest about the rest

Anthropic, GitHub, Okta, Atlassian and most others have no API that creates a key; that is the vendor's decision, not a missing feature. KeyRotate says so, with the reason, and links straight to the page that issues it. Paste the new key and it is verified before it replaces the old one.

Updates every file that used it

.env, wp-config.php, JSON (including Claude Code's settings.json), YAML, TOML or your own pattern. KeyRotate shows you the exact lines it would change, updates only what you confirm, writes atomically, keeps the file's permissions, and leaves a backup you can restore in one click.

Straight into hosting and CI; and both ways with password managers

A rotated key goes straight into GitHub Actions secrets, Netlify and Vercel environment variables, Fly.io secrets, Supabase Edge Function secrets and Cloudflare Workers secrets, and KeyRotate can redeploy afterwards through a deploy hook or a GitHub workflow. Secret stores and password managers work both ways. Import ▸ From a secret store or password manager… signs in to 1Password (a Connect server, or op through a helper script), Bitwarden or Vaultwarden (bw serve), HashiCorp Vault, Doppler, Infisical or AWS Secrets Manager and brings in the keys it finds, each still linked to its store. Rotate one in KeyRotate and the store gets the new value; change it in the store and, within 15 minutes, KeyRotate checks it with the vendor, takes it and rewrites every .env, config, server and app that uses it (for op, with a 1Password service account). A store keeps the master copy, but it doesn't update your .env files. KeyRotate does. Before any rotation, it checks every target can be reached.

LINE, Telegram, Discord and other bot tokens

LINE channel access tokens rotate automatically: KeyRotate signs the request with the channel's assertion signing key and gets a new 30-day token, and the old one keeps working until it expires; it is never revoked. Tokens for WhatsApp Business, Telegram, Discord and Viber bots and Chatwork are checked with each service, with a warning when one stops working. A Brave Search key shows how much of the month's query quota is left, and an Apify token shows this cycle's spend against your plan's cap.

Reads nothing else

KeyRotate matches your variable by name and replaces that line. It never parses, displays or transmits the other secrets sitting in the same file; which is the whole reason it is safe to point at a production .env.

Switch accounts in one click

Several subscriptions or organisations for the same vendor? Group keys into accounts, name a profile; "Work", "Personal", a client; and switch every file from the menu bar.

Warns before a key stops working

A key the vendor now rejects, a real expiry countdown where one is published (Anthropic, OpenAI, Mistral, Fireworks), and usage or rate limits where they are reported; as a notification, and optionally to your phone through ntfy or Gotify. When every key on a vendor account stops at once, it says the account itself may be disabled, so you check your email before replacing keys that would not help.

Rings when a key is used by someone else

Usage Watch asks Anthropic, OpenAI and OpenRouter every 15 minutes, with the admin keys you stored, how each key was used. Use of a key you don't hold, use far above a key's normal pattern, a model it never called, or a replaced key still being used; each raises a warning with a Rotate now button. A key that suddenly steps up to a frontier model it never used; the first thing a thief does with a stolen key; rings as critical. For Amazon Bedrock, CloudTrail even shows a call from an address that isn't yours. And when OpenAI warns or cuts off a user of your organisation, KeyRotate hears about it through Enfour's relay and rings if that user isn't one of your apps'.

One alarm screen for every sign of a leak

Guard gathers every sign that a key may be in someone else's hands, worst first, each with one action: Rotate now, Open key or Dismiss. It listens to AI tool logs, Enfour's signed breach advisories, Usage Watch, the daily key check (vendors revoke keys reported leaked, so a sudden refusal is a clue), Leak Scan and your remote repositories. A sidebar badge counts the warnings, and closing the window keeps KeyRotate guarding from the menu bar.

Knows which breaches concern you; and tells you even when closed

Enfour's signed breach advisories are ranked on your Mac by the keys and accounts you hold; exposed, likely, possible or unlikely; so the breaches that matter to you come first, and nothing about what you use leaves your Mac. Turn on Apple push and new advisories reach you with KeyRotate closed, along with a warning if Guard itself stops: KeyRotate quit, hung or crashed.

Catches leaked email passwords and addresses

An SMTP or IMAP password in a config file, a mail server address with its password, or a SendGrid, Mailgun, Brevo, Postmark or Resend key is looked for in AI logs, repositories and web roots just like an API key; and rings in Guard, because whoever holds it sends mail as you. Web projects also list the email addresses a site hands out, with an alarm for any downloadable file that lists many. Add your addresses and a Have I Been Pwned key, and KeyRotate checks them daily and rings when one turns up in a new breach.

Finds your keys in AI chat logs

A key pasted into Claude Code, Codex or another coding agent; or printed by a command it ran; went to the AI provider and stays in plain text in the tool's logs, where credential thieves look first. Every hour KeyRotate reads the new lines in the logs of Claude Code, Codex, Gemini CLI, Qwen Code, OpenCode, Goose, Cline and Roo Code, finding your stored keys by exact value and other secrets with Gitleaks' rules. A live key that turns up rings every day until it is rotated. Only where and when is kept, with a masked preview; never the secret.

Watches your repositories, every branch and tag

Add a GitHub, Gitea or Forgejo (Codeberg included), GitLab or Bitbucket account and pick repositories, or give any HTTPS git address. KeyRotate copies each one's full history to your Mac with git built in; nothing to install; searches it with Leak Scan, then fetches only the changes, daily. On GitHub it also reads secret-scanning alerts and says when a secret GitHub found still works. Rotating doesn't clean history, so revoke the old key too.

Knows what your web server would hand out

Add a web project; with shortcuts to ~/Sites, /Library/WebServer/Documents, MAMP's htdocs and Herd; or send a site from Pancake Stack or FrontierStack with Watch in KeyRotate…. Each finding is judged by how the server treats the file: a .env, JSON, SQL dump, backup or log in the web root is anyone's to download; a key in a script or page reaches every visitor's browser; a key in PHP isn't public, but travels with every copy, backup and repository. Web projects are re-scanned daily.

Drop in your project folders

Drag your .env and PHP config files; or whole project folders; onto KeyRotate. It finds the keys, imports each once however many files hold it, and makes every file a target, so the first rotation already rewrites them all. Example files such as .env.example are never written to.

Finds the .env files a rotation would miss

Every folder scan lists the .env files KeyRotate isn't updating yet. Import keys and make targets… brings their keys in and makes each file a target, so the next rotation rewrites it too. Update old keys… writes the current key over an older copy, changing only that line and keeping a backup.

Test keys stay test keys

Test-mode and sandbox keys for Stripe, Square, Paddle, PAY.JP, KOMOJU, Mollie, Razorpay, Toss Payments, PayPal, Braintree and Adyen get their own entries, and a live entry refuses a test key. PAYJP_SECRET_KEY=sk_test_… is recognised as PAY.JP's, not Stripe's.

AWS, every way it comes

Each profile in ~/.aws/credentials is its own key, and a rotation rewrites only that profile. GovCloud and China keys are checked and rotated in their own partition, and Amazon Bedrock API keys (ABSK…) are managed too. Temporary keys that expire within hours are listed with the reason and left out.

Works with the tools you already run

FrontierStack

Pair once and KeyRotate hands FrontierStack every new key over a pinned, signed connection to your own Mac. The pairing is credentials-only: it can set a key and read status, and nothing else. FrontierStack's Telegram and LINE alert channels use the same bot and channel tokens, so a token rotated here carries the very next alert.

Claude Code & Codex

Keep one settings profile per account and copy the exact launch command. KeyRotate never touches Claude Code's own login or its Keychain item.

OpenClaw and agent runtimes

Writes the environment variable each runtime actually reads, including the list form used for rotation pools.

Why the old key is never revoked

A key is rarely in one place. Revoke it the moment you rotate and you break the cron job, the staging server or the colleague's laptop you forgot about. KeyRotate leaves the previous key valid, updates everything it knows about, and then reminds you to revoke; once you can see that nothing else is still using it. Where the vendor's API allows it (OpenAI, Anthropic, OpenRouter, Mistral, Fireworks, Linode, AWS IAM, Paddle), the key's screen then revokes the old key by its id with one confirmed click.

Private by design

No account. No telemetry. No sync server. Secret values are macOS Keychain items; besides them KeyRotate keeps a list of which platform each key belongs to and which files use it, copies of any repositories you ask it to watch, and scan findings that record where and when with a masked preview, never the secret. Network requests go to the vendors and git hosts you chose, to a notification server if you configure one, and to fetch Enfour's signed advisories; nowhere else, and nothing about your keys goes with them. Access to files outside the app is granted by you, folder by folder, and remembered only as macOS's own security-scoped bookmarks.

KeyRotate for Windows

The same app for Windows 10 and 11: the same vendors, rotation, file updates, leak scanning, accounts and profiles. Each key is encrypted on its own with Windows' data protection (DPAPI) for your Windows account, so a copied file is unreadable on another PC or account, and revealing one asks for Windows Hello. KeyRotate lives in the system tray instead of the menu bar. Your data stays in %APPDATA%\KeyRotate; moving keys to another PC is done with an encrypted backup.

Not on Windows: pairing with FrontierStack and Pancake Stack, the iPhone and Apple Watch companion, and VibeProxy, which are Mac apps. CLIProxyAPI works on both.

Download

KeyRotate for Mac

macOS 14 or later. Sold and updated through the Mac App Store, as a monthly subscription you start in the app.

Download on the Mac App Store

KeyRotate for Windows

Windows 10 or 11 on 64-bit Intel/AMD or Arm. A monthly subscription bought here: US$1.99 or ¥200 a month, for up to three PCs.

…

Buy a subscription

If a subscription lapses, every key stays visible and copyable on either system; only rotation, file updates and switching pause. A key manager that locked you out of your own credentials would be worse than none.

See every supported service