@stripe/cli-darwin-x64 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +167 -0
- package/bin/stripe +0 -0
- package/package.json +23 -0
package/README.md
ADDED
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
# Stripe CLI
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+

|
|
5
|
+
|
|
6
|
+
The Stripe CLI helps you build, test, and manage your Stripe integration right from the terminal.
|
|
7
|
+
|
|
8
|
+
**With the CLI, you can:**
|
|
9
|
+
|
|
10
|
+
- Securely test webhooks without relying on 3rd party software
|
|
11
|
+
- Trigger webhook events or resend events for easy testing
|
|
12
|
+
- Tail your API request logs in real-time
|
|
13
|
+
- Create, retrieve, update, or delete API objects.
|
|
14
|
+
|
|
15
|
+

|
|
16
|
+
|
|
17
|
+
## Installation
|
|
18
|
+
|
|
19
|
+
Stripe CLI is available for macOS, Windows, and Linux for distros like Ubuntu, Debian, RedHat and CentOS.
|
|
20
|
+
|
|
21
|
+
### npm (macOS, Linux, Windows)
|
|
22
|
+
|
|
23
|
+
If you have Node.js >= 18 installed, you can install via npm or run directly with npx:
|
|
24
|
+
|
|
25
|
+
```sh
|
|
26
|
+
npm install -g @stripe/cli
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
```sh
|
|
30
|
+
npx @stripe/cli login
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### macOS
|
|
34
|
+
|
|
35
|
+
Stripe CLI is available on macOS via [Homebrew](https://brew.sh/):
|
|
36
|
+
|
|
37
|
+
```sh
|
|
38
|
+
brew install stripe/stripe-cli/stripe
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Linux
|
|
42
|
+
|
|
43
|
+
Refer to the [installation instructions](https://stripe.com/docs/stripe-cli#install) for available Linux installation options.
|
|
44
|
+
|
|
45
|
+
### Windows
|
|
46
|
+
|
|
47
|
+
Stripe CLI is available on Windows via the [Scoop](https://scoop.sh/) package manager:
|
|
48
|
+
|
|
49
|
+
```sh
|
|
50
|
+
scoop bucket add stripe https://github.com/stripe/scoop-stripe-cli.git
|
|
51
|
+
scoop install stripe
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Docker
|
|
55
|
+
|
|
56
|
+
The CLI is also available as a Docker image: [`stripe/stripe-cli`](https://hub.docker.com/r/stripe/stripe-cli).
|
|
57
|
+
|
|
58
|
+
```sh
|
|
59
|
+
docker run --rm -it stripe/stripe-cli version
|
|
60
|
+
stripe version x.y.z (beta)
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
**Password Store Setup with Docker**
|
|
64
|
+
|
|
65
|
+
While test mode doesn’t require password store, you will need to set it up if you wish to perform live mode requests.
|
|
66
|
+
|
|
67
|
+
> You can also make live mode requests on a per command basis by attaching the `--api-key` flag.
|
|
68
|
+
|
|
69
|
+
1. Create `entrypoint.sh`
|
|
70
|
+
|
|
71
|
+
```sh
|
|
72
|
+
#!/bin/sh
|
|
73
|
+
if ! [ -f ~/.gnupg/trustdb.gpg ] ; then
|
|
74
|
+
chmod 700 ~/.gnupg/
|
|
75
|
+
gpg --quick-generate-key stripe-live # This will generate a gpg key called "stripe-live"
|
|
76
|
+
fi
|
|
77
|
+
if ! [ -f ~/.password-store/.gpg-id ] ; then
|
|
78
|
+
pass init stripe-live # This will initialize a password store record named "stripe-live", using the gpg key above
|
|
79
|
+
pass insert stripe-live # This will insert value for the password store "stripe-live", which we will put Stripe Live Secret Key in
|
|
80
|
+
fi
|
|
81
|
+
|
|
82
|
+
string="$@"
|
|
83
|
+
liveflag="--live"
|
|
84
|
+
|
|
85
|
+
if [ -z "${string##*$liveflag*}" ] ;then
|
|
86
|
+
OPTS="--api-key $(pass show stripe-live)" # This will use the content of the password store "stripe-live" which was inserted in line 8
|
|
87
|
+
fi
|
|
88
|
+
|
|
89
|
+
#pass insert stripe-live
|
|
90
|
+
/bin/stripe $@ $OPTS
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
2. Create a docker file `Dockerfile-cli`
|
|
94
|
+
|
|
95
|
+
```sh
|
|
96
|
+
FROM stripe/stripe-cli:vx.x.x
|
|
97
|
+
RUN apk add pass gpg-agent
|
|
98
|
+
COPY ./entrypoint.sh /entrypoint.sh
|
|
99
|
+
ENTRYPOINT [ "/entrypoint.sh" ]
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
3. Build the docker image
|
|
103
|
+
|
|
104
|
+
```sh
|
|
105
|
+
docker build -t stripe-cli -f Dockerfile-cli .
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
4. Run the docker image with password volumes, replacing `$command` with the appropraite Stripe CLI command (i.e `customers list`)
|
|
109
|
+
|
|
110
|
+
```sh
|
|
111
|
+
docker run --rm -it -v stripe-config://root/.config/stripe/ -v stripe-gpg://root/.gnupg/ -v stripe-pass://root/.password-store/ stripe-cli $command
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
> For live mode requests append `--live` after `$command`.
|
|
115
|
+
|
|
116
|
+
### Without package managers
|
|
117
|
+
|
|
118
|
+
Instructions are also available for installing and using the CLI [without a package manager](https://github.com/stripe/stripe-cli/wiki/Installing-and-updating#without-a-package-manager).
|
|
119
|
+
|
|
120
|
+
## Usage
|
|
121
|
+
|
|
122
|
+
Installing the CLI provides access to the `stripe` command.
|
|
123
|
+
|
|
124
|
+
```sh-session
|
|
125
|
+
stripe [command]
|
|
126
|
+
|
|
127
|
+
# Run `--help` for detailed information about CLI commands
|
|
128
|
+
stripe [command] help
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
## Commands
|
|
132
|
+
|
|
133
|
+
The Stripe CLI supports a broad range of commands. Below are some of the most used ones:
|
|
134
|
+
- [`login`](https://stripe.com/docs/cli/login)
|
|
135
|
+
- [`listen`](https://stripe.com/docs/cli/listen)
|
|
136
|
+
- [`trigger`](https://stripe.com/docs/cli/trigger)
|
|
137
|
+
- [`logs tail`](https://stripe.com/docs/cli/logs/tail)
|
|
138
|
+
- [`events resend`](https://stripe.com/docs/cli/events/resend)
|
|
139
|
+
- [`samples`](https://stripe.com/docs/cli/intro_stripe_samples)
|
|
140
|
+
- [`serve`](https://stripe.com/docs/cli/serve)
|
|
141
|
+
- [`status`](https://stripe.com/docs/cli/status)
|
|
142
|
+
- [`config`](https://stripe.com/docs/cli/config)
|
|
143
|
+
- [`open`](https://stripe.com/docs/cli/open)
|
|
144
|
+
- [`get`, `post` & `delete` commands](https://stripe.com/docs/cli/get)
|
|
145
|
+
- [`resource` commands](https://stripe.com/docs/cli/resources)
|
|
146
|
+
|
|
147
|
+
## Documentation
|
|
148
|
+
|
|
149
|
+
For a full reference, see the [CLI reference site](https://stripe.com/docs/cli)
|
|
150
|
+
|
|
151
|
+
## Telemetry
|
|
152
|
+
|
|
153
|
+
The Stripe CLI includes a telemetry feature that collects some usage data. See our [telemetry reference](https://stripe.com/docs/cli/telemetry) for details.
|
|
154
|
+
|
|
155
|
+
## Feedback
|
|
156
|
+
|
|
157
|
+
Got feedback for us? Please don't hesitate to tell us on [feedback](https://stri.pe/cli-feedback).
|
|
158
|
+
|
|
159
|
+
## Contributing
|
|
160
|
+
|
|
161
|
+
See [Developing the Stripe CLI](../../wiki/developing-the-stripe-cli) for more info on how to make contributions to this project.
|
|
162
|
+
|
|
163
|
+
## License
|
|
164
|
+
Copyright (c) Stripe. All rights reserved.
|
|
165
|
+
|
|
166
|
+
Licensed under the [Apache License 2.0 license](blob/master/LICENSE).
|
|
167
|
+
|
package/bin/stripe
ADDED
|
Binary file
|
package/package.json
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@stripe/cli-darwin-x64",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "The Stripe CLI macOS x64 binary",
|
|
5
|
+
"homepage": "https://stripe.com/docs/stripe-cli",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/stripe/stripe-cli.git"
|
|
10
|
+
},
|
|
11
|
+
"os": [
|
|
12
|
+
"darwin"
|
|
13
|
+
],
|
|
14
|
+
"cpu": [
|
|
15
|
+
"x64"
|
|
16
|
+
],
|
|
17
|
+
"bin": {
|
|
18
|
+
"stripe": "bin/stripe"
|
|
19
|
+
},
|
|
20
|
+
"files": [
|
|
21
|
+
"bin/stripe"
|
|
22
|
+
]
|
|
23
|
+
}
|