# 升级 Stripe CLI Learn how to upgrade the CLI with or without a package manager. 更多详情请参阅 [Stripe CLI 参考](https://docs.stripe.com/cli.md)。 Keep your Stripe CLI up to date to access new features, improvements, and security updates. Follow the instructions below to upgrade the CLI using your preferred installation method. ## Homebrew 要用 [homebrew](https://brew.sh/) 升级 Stripe CLI,请运行: ```bash brew upgrade stripe/stripe-cli/stripe ``` ## Scoop 要用 [Scoop](https://scoop.sh/) 升级 Stripe CLI,请运行: ```bash scoop update stripe ``` ## Docker Stripe CLI 也可以作为 [Docker 镜像](https://hub.docker.com/r/stripe/stripe-cli)提供。要安装最新版本,请运行: ```bash docker run --rm -it stripe/stripe-cli:latest ``` ## macOS 要在没有 homebrew 的 macOS 上升级 Stripe CLI: 1. Download the latest `mac-os` tar.gz file of your cpu architecture type from [GitHub](https://github.com/stripe/stripe-cli/releases/latest). 1. Unzip the file: `tar -xvf stripe_[X.X.X]_mac-os_[ARCH_TYPE].tar.gz`. 或者,将二进制文件安装在可以全局执行的位置(例如,`/usr/local/bin`)。 ## Linux 要在没有软件包管理器的 Linux 上升级 Stripe CLI: 1. Download the latest `linux` tar.gz file from [GitHub](https://github.com/stripe/stripe-cli/releases/latest). 1. Unzip the file: `tar -xvf stripe_X.X.X_linux_x86_64.tar.gz`. 1. 将 `./stripe` 移到您的执行路径。 If you do use a Linux package manager, update the Stripe CLI using its update command. ## Windows 要在没有 Scoop 的 Windows 上升级 Stripe CLI: 1. Download the latest `windows` zip file from [GitHub](https://github.com/stripe/stripe-cli/releases/latest). 1. 解压 `stripe_X.X.X_windows_x86_64.zip` 文件。 1. Add the path to the unzipped `stripe.exe` file to your `Path` environment variable. To learn how to update environment variables, see the [Microsoft PowerShell documentation](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_environment_variables?view=powershell-7.3#saving-changes-to-environment-variables). > Windows anti-virus scanners occasionally flag the Stripe CLI as unsafe. This is very likely a false positive. For more information, see [issue #692](https://github.com/stripe/stripe-cli/issues/692) in the GitHub repository.