A command-line interface for interacting with Honeybadger's Reporting API.
go install github.com/honeybadger-io/cli@latest
The CLI can be configured using either command-line flags, environment variables, or a configuration file.
By default, the CLI looks for a configuration file at config/honeybadger.yml
in the current directory. You can specify a different configuration file using the --config
flag.
Example configuration file:
api_key: your-api-key-here
endpoint: https://api.honeybadger.io # Optional, use https://eu-api.honeybadger.io for EU region
You can set configuration using environment variables prefixed with HONEYBADGER_
:
export HONEYBADGER_API_KEY=your-api-key-here
export HONEYBADGER_ENDPOINT=https://eu-api.honeybadger.io # Optional, for EU region
Global flags that apply to all commands:
--api-key
: Your Honeybadger API key--endpoint
: Honeybadger endpoint (default: https://api.honeybadger.io)--config
: Path to configuration file
Report a deployment to Honeybadger:
hb deploy --environment production --repository github.com/org/repo --revision abc123 --user johndoe
Required flags:
-e, --environment
: Environment being deployed to (e.g., production)
Optional flags:
-r, --repository
: Repository being deployed-v, --revision
: Revision being deployed-u, --user
: Local username of the person deploying
Pull requests are welcome. If you're adding a new feature, please submit an issue as a preliminary step; that way you can be (moderately) sure that your pull request will be accepted.
When adding or changing functionality, please also add or update corresponding tests.
To run tests locally:
go test ./...
- Fork it.
- Create a topic branch
git checkout -b my_branch
- Make your changes and add an entry to the CHANGELOG.
- Commit your changes
git commit -am "Boom"
- Push to your branch
git push origin my_branch
- Send a pull request
To publish a new release:
-
Create and push a new tag with the version number:
git tag v1.0.0 git push origin v1.0.0
-
The release workflow will automatically:
- Build binaries for multiple platforms (Linux, macOS, Windows)
- Create a GitHub release with the binaries
- Generate a changelog from commit messages
The binaries will be available for download from the GitHub releases page.
Note: Commits with messages containing [skip ci]
will skip the test workflow, but the release workflow will still run when a tag is pushed.
MIT License. See the LICENSE file in this repository for details.