A command-line tool for Stripe
翻訳待ち
開発ツールGo · ShellGitHub @stripe自分でインストール所有者未確認
Paste into Claude or ChatGPT for installation instructions suited to your environment.
Have you tried it? One tap is enough. No sign-in needed.
Loading the full README. The saved excerpt is shown below.
The Stripe CLI helps you build, test, and manage your Stripe integration right from the terminal.
• Securely test webhooks without relying on 3rd party software
• Trigger webhook events or resend events for easy testing
• Tail your API request logs in real-time
• Create, retrieve, update, or delete API objects.
Stripe CLI is available for macOS, Windows, and Linux for distros like Ubuntu, Debian, RedHat and CentOS.
If you have Node.js >= 18 installed, you can install via npm:
You can also directly execute commands via npx, although this won't add stripe to your PATH:Read the full README ↗
The Stripe CLI helps you build, test, and manage your Stripe integration right from the terminal.
With the CLI, you can:
Stripe CLI is available for macOS, Windows, and Linux for distros like Ubuntu, Debian, RedHat and CentOS.
Use the installation script for your operating system to enable automatic updates by default.
macOS or Linux:
curl -fsSL https://cli.stripe.com/install.sh | sh
Windows (PowerShell):
irm https://cli.stripe.com/install.ps1 | iex
After installation, open a new terminal to use stripe.
Package-manager installations don't support automatic updates. Use your package manager to upgrade the CLI, as described in Upgrading.
If you have Node.js >= 18 installed, you can install via npm:
npm install -g @stripe/cli
You can also directly execute commands via npx, although this won't add stripe to your PATH:
npx @stripe/cli login
Homebrew:
brew install stripe
apt (Debian, Ubuntu):
curl -s https://packages.stripe.dev/api/security/keypair/stripe-cli-gpg/public | gpg --dearmor | sudo tee /usr/share/keyrings/stripe.gpg > /dev/null
echo "deb [signed-by=/usr/share/keyrings/stripe.gpg] https://packages.stripe.dev/stripe-cli-debian-local stable main" | sudo tee -a /etc/apt/sources.list.d/stripe.list
sudo apt update
sudo apt install stripe
yum/dnf (RedHat, Fedora, CentOS):
echo -e "[Stripe]\nname=stripe\nbaseurl=https://packages.stripe.dev/stripe-cli-rpm-local/\nenabled=1\ngpgcheck=0" | sudo tee -a /etc/yum.repos.d/stripe.repo
sudo yum install stripe
WinGet:
winget install Stripe.StripeCLI
Scoop:
scoop bucket add stripe https://github.com/stripe/scoop-stripe-cli.git
scoop install stripe
The CLI is also available as a Docker image: stripe/stripe-cli.
docker run --rm -it stripe/stripe-cli version
stripe version x.y.z (beta)
Password Store Setup with Docker
While test mode doesn’t require password store, you will need to set it up if you wish to perform live mode requests.
You can also make live mode requests on a per command basis by attaching the
--api-keyflag.
entrypoint.sh#!/bin/sh
if ! [ -f ~/.gnupg/trustdb.gpg ] ; then
chmod 700 ~/.gnupg/
gpg --quick-generate-key stripe-live # This will generate a gpg key called "stripe-live"
fi
if ! [ -f ~/.password-store/.gpg-id ] ; then
pass init stripe-live # This will initialize a password store record named "stripe-live", using the gpg key above
pass insert stripe-live # This will insert value for the password store "stripe-live", which we will put Stripe Live Secret Key in
fi
string="$@"
liveflag="--live"
if [ -z "${string##*$liveflag*}" ] ;then
OPTS="--api-key $(pass show stripe-live)" # This will use the content of the password store "stripe-live" which was inserted in line 8
fi
#pass insert stripe-live
/bin/stripe $@ $OPTS
Dockerfile-cliFROM stripe/stripe-cli:vx.x.x
RUN apk add pass gpg-agent
COPY ./entrypoint.sh /entrypoint.sh
ENTRYPOINT [ "/entrypoint.sh" ]
docker build -t stripe-cli -f Dockerfile-cli .
$command with the appropraite Stripe CLI command (i.e customers list)docker run --rm -it -v stripe-config://root/.config/stripe/ -v stripe-gpg://root/.gnupg/ -v stripe-pass://root/.password-store/ stripe-cli $command
For live mode requests append
--liveafter$command.
Download the latest release for your platform from the GitHub Releases page.
macOS:
tar -xvf stripe_X.X.X_mac-os_ARCH.tar.gz
Optionally move the stripe binary to /usr/local/bin for global access.
Linux:
tar -xvf stripe_X.X.X_linux_x86_64.tar.gz
Move the stripe binary to a directory on your PATH.
Windows:
Unzip stripe_X.X.X_windows_x86_64.zip and add the path containing stripe.exe to your Path environment variable.
Note: Anti-virus software may flag the binary as unsafe. This is a false positive; see issue #692 for details.
When you install using a script, the CLI checks for updates as you use it and automatically installs updates within the same major version.
To disable automatic updates, set STRIPE_NO_AUTO_UPDATE=1 or add auto_update = false to ~/.config/stripe/config.toml.
If you installed using a package manager, use the matching upgrade command.
npm install -g @stripe/cli
Homebrew:
brew upgrade stripe
apt (Debian, Ubuntu):
sudo apt update && sudo apt upgrade stripe
yum/dnf (RedHat, Fedora, CentOS):
yum update stripe
WinGet:
winget upgrade Stripe.StripeCLI
Scoop:
scoop update stripe
docker pull stripe/stripe-cli:latest
Because Docker containers are ephemeral, the stripe login command isn't supported. Use the --api-key flag instead.
Download the latest release for your platform from the GitHub Releases page and replace your existing binary.
This is the beginning of the README. Read the rest at the original. Read the full README ↗