Skip to content

Add auto-update for curl-installed CLI binaries#1760

Draft
yahanxing-stripe wants to merge 2 commits into
v2from
yx-0707-1
Draft

Add auto-update for curl-installed CLI binaries#1760
yahanxing-stripe wants to merge 2 commits into
v2from
yx-0707-1

Conversation

@yahanxing-stripe

Copy link
Copy Markdown
Contributor

Summary

When the CLI is installed via curl, it now:

  • Checks for updates synchronously after each command completes, rate-limited to once per day
  • Applies pending updates at the start of the next invocation: downloads the new binary, verifies SHA256 checksum, atomic file swap, and re-execs so the user always runs the latest version
  • Skips major version changes — only minor/patch updates are auto-applied to avoid silent breaking changes
  • Only affects curl-installed binaries — Homebrew, apt, Scoop, and npm users are unaffected

User-facing output

  Automatically updating Stripe CLI from 1.23.0 to 1.23.1.
  To disable auto-update, set STRIPE_NO_AUTO_UPDATE=1 or add auto_update = false to ~/.config/stripe/config.toml
  Updated successfully ✓

####Opt-out

  # ~/.config/stripe/config.toml
  [settings]
  auto_update = false

Or:

export STRIPE_NO_AUTO_UPDATE=1

yahanxing-stripe and others added 2 commits July 8, 2026 10:45
When the CLI is installed via curl (lives in ~/.stripe/bin/), it now
checks for newer versions once per day after command execution. If a
minor/patch update is available, the next invocation downloads, verifies,
and re-execs with the new binary. Major version changes are skipped.
Users can opt out via STRIPE_NO_AUTO_UPDATE=1 or config.toml.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Committed-By-Agent: claude
Add package doc comment and simplify bool comparison.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Committed-By-Agent: claude
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant