stripe-cli icon indicating copy to clipboard operation
stripe-cli copied to clipboard

How to 'update' the Stripe CLI to its latest version (Looking for documents/instructions)

Open kwhjvdkamp opened this issue 4 years ago • 7 comments

Problem

What are you trying to do? Learning on Stripe > [Environment: Windows, IDE: VSCode with terminal: Bash] > $ 'stripe listen' responded with: A newer version of the Stripe CLI is available, please update to: v1.5.6.

Looking for something like 'npm update' does not update/upgrade the Stripe CLI, nor documentation can be found 'how to' (only updating objects e.g. but that's not I wanted). In case I have to download the newest version from GitHub, do I have to uninstall the current version? If so, how to uninstall the current version of Stripe CLI? How to go uninstalling the Stripe CLI with scoop (recommended to windows developers by Stripe isn't it?). Updating/upgrading Stripe CLI is not so obvious like 'npm update' (packages update)?

Feature

What would help you accomplish your original task

  1. https://github.com/stripe/stripe-cli/releases
  2. Download 'your version' (for my *_x86_64.zip)
  3. Unzipping and executing the executable on 'cmd' (or 'ps')

Phenomenon: no latest version even after removing it version re-adding: 2021_01_14_20_23_02_Administrator_Windows_PowerShell

Documentation / instruction at the spot of 'installing the Stripe CLI', might be a suggestion.

Examples

Any example interaction you expect 2021_01_14_15_55_32_auth js_AngularPaymentParts_Visual_Studio_Code however still 1.5.5

kwhjvdkamp avatar Jan 14 '21 15:01 kwhjvdkamp

Thanks for the suggestion! This is a bit tricky depending on how you installed the CLI and what operating system you're on. It's hard to detect if the user installed from a package manager (like homebrew or apt) and we want to be careful about not recommending them to manually download if the package manager can do it.

Similarly, if you installed it manually it's quite tricky to download a binary from the internet and replace it in place, especially without escalated permissions (which we want to avoid asking users to do).

We'll keep looking into this but I'm not sure if we'll have a solution in the near term though.

tomer-stripe avatar Feb 22 '21 18:02 tomer-stripe

To upgrade Stripe CLI to the latest version, run: for mac: brew upgrade stripe/stripe-cli/stripe

Harshad-AKA-Sparrow avatar May 27 '21 10:05 Harshad-AKA-Sparrow

Thanks Mr. Harshad-AKA-Sparrow! However, I am on good old, for many out-there 'horrible' winloss, so what should I run? Can't fake a mac brew on 'winloss' though!

kwhjvdkamp avatar May 27 '21 12:05 kwhjvdkamp

I'm on v1.5.5

Running brew upgrade stripe/stripe-cli/stripe gives me:

Warning: stripe/stripe-cli/stripe 1.5.5 already installed

dominiceden avatar Aug 12 '21 10:08 dominiceden

You can see the documentation on how to upgrade stripe here: https://stripe.com/docs/stripe-cli#upgrade

jainudit012 avatar Nov 04 '21 04:11 jainudit012

Thx!

kwhjvdkamp avatar Nov 04 '21 06:11 kwhjvdkamp

it also gave me:

➜ brew upgrade stripe/stripe-cli/stripe
Warning: stripe/stripe-cli/stripe 1.10.3 already installed

also, tried the docker version from https://stripe.com/docs/stripe-cli/upgrade but it gave:

➜ docker run --rm -it stripe/stripe-cli:latest
The official command-line tool to interact with Stripe.

Before using the CLI, you'll need to login:

  $ stripe login

If you're working on multiple projects, you can run the login command with the
--project-name flag:

  $ stripe login --project-name rocket-rides

Usage:
  stripe [command]

Webhook commands:
  listen                        Listen for webhook events
  trigger                       Trigger test webhook events

Stripe commands:
  logs                          Interact with Stripe API request logs
  status                        Check the status of the Stripe API

Resource commands:
  get                           Quickly retrieve resources from Stripe
  charges                       Make requests (capture, create, list, etc) on charges
  customers                     Make requests (create, delete, list, etc) on customers
  payment_intents               Make requests (cancel, capture, confirm, etc) on payment intents
  ...                           To see more resource commands, run `stripe resources help`

Other commands:
  community                     Chat with Stripe engineers and other developers
  completion                    Generate bash and zsh completion scripts
  config                        Manually change the config values for the CLI
  feedback                      Provide us with feedback on the CLI
  fixtures                      Run fixtures to populate your account with data
  help                          Help about any command
  login                         Login to your Stripe account
  logout                        Logout of your Stripe account
  open                          Quickly open Stripe pages
  samples                       Sample integrations built by Stripe
  serve                         Serve static files locally
  version                       Get the version of the Stripe CLI

Flags:
      --api-key string        Your API key to use for the command
      --color string          turn on/off color output (on, off, auto)
      --config string         config file (default is $HOME/.config/stripe/config.toml)
      --device-name string    device name
  -h, --help                  help for stripe
      --log-level string      log level (debug, info, trace, warn, error) (default "info")
  -p, --project-name string   the project name to read from for config (default "default")
  -v, --version               Get the version of the Stripe CLI

Use "stripe [command] --help" for more information about a command.

how do i upgrade in docker as it keeps mentioning me to upgrade?

deadcoder0904 avatar Jul 25 '22 13:07 deadcoder0904