-
Notifications
You must be signed in to change notification settings - Fork 377
Developing the Stripe CLI
If you're working on developing the CLI, it's recommended that you alias the go command to run the dev version. Place this in your shell rc file (such as .bashrc
or .zshrc
)
The Stripe CLI is built using Go. You will need at least go version 1.16 to develop. To download and compile the source code, run:
$ go get -v -u github.com/stripe/stripe-cli/...
After installing, cd
into the directory and setup the dependencies:
$ cd go/src/github.com/stripe/stripe-cli
$ 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.
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.