Skip to content

Developing the Stripe CLI

Kenneth Auchenberg edited this page Oct 30, 2019 · 7 revisions

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)

Installation

The Stripe CLI is built using Go. To download and compile the source code, run:

$ go get -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'

Linting

To run the linter, run make lint.

Make sure golangci-lint is installed: brew install golangci/tap/golangci-lint

Tests

You can run tests with:

$ make test

Releasing

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.