Skip to content

v0.1.0

Choose a tag to compare

@yangsi7 yangsi7 released this 08 Jul 19:45

First public release of rotate — rotate a leaked or expired API-key env variable across all your .env and .mcp.json files, safely.

Install

curl -fsSL https://raw.githubusercontent.com/yangsi7/rotate-env/v0.1.0/install.sh | bash

Highlights

  • Rotates a named env var's value across .env, .env.*, .envrc, and .mcp.json, discovered at runtime with fd.
  • .env via awk (preserves quoting / export / inline comments, exact-key, literal value); .mcp.json via jq walk (env, headers, args[] wrapper).
  • Secret never on argv (passed via environment), never printed (masked). New value via --value-file, $ROTATE_NEW_VALUE, a silent prompt, or stdin.
  • Dry-run by default; atomic temp+mv writes, preserved perms, optional --backup (chmod 600); idempotent; --old-value-file surgical rotation.

See the CHANGELOG.