-
Notifications
You must be signed in to change notification settings - Fork 377
Developing the Stripe CLI
The Stripe CLI is built using Go. Installation instructions vary slightly based on which version of go
you have installed locally (checked using go version
).
For 1.18.x
or greater, run the following:
-
git clone
this repo cd stripe-cli
go get ./...
If you're using v1.16
(the minimum supported) or v1.17
, run:
$ go get -v -u github.com/stripe/stripe-cli/...
$ cd go/src/github.com/stripe/stripe-cli
No matter how you installed, you can now setup the dependencies:
$ make setup
Once setup, run the test suite to make sure everything works as expected:
$ make test
You can invoke the local version of the CLI by running:
$ go run cmd/stripe/main.go
Optionally, you can add this to your shell profile to make running the local version a little easier. Note that this command will only work when from the stripe-cli
directory. An absolute path to the CLI folder won't work either.
alias stripe-dev='go run cmd/stripe/main.go'
To run the linter, run make lint
.
Make sure golangci-lint
is installed: brew install golangci/tap/golangci-lint
You can run tests with:
$ make test
To release a new version, checkout master
and then run make release
. It'll prompt you for a version and will then push a new tag.