
A CLI for interacting with the PagerDuty API.
Installation
This tool assumes that you are a part of an account using
Advanced Permissions.
- Acquire a PagerDuty developer API token.
- Create a configuration file at
$HOME/.pagerduty.yml. The file should
have the following information:
---
api-token: <your token>
-
Download the latest binary release
and place the binary somewhere in your $PATH.
-
You should be able to run pagerduty-cli to see the available commands.
-
You may wish to create an alias for the CLI as it's full name is admittedly
verbose. You can add alias pd="pagerduty-cli" to your shell's profile if you
so choose.
Upgrading
Upgrading is still a work in progress, so in the meantime, repeat step 3 from
above with the latest binary. Eventually I would like this tool to upgrade
itself, but I haven't yet gotten that far.
Usage
This tool, thanks to the awesome Cobra package
strives to be self-service and self-documenting. You can run
pagerduty-cli help with no additional commands to see a list of available
commands. You can see additional help for subcommands by running
pagerduty-cli help <subcommand>.
Development
- Checkout this repository.
- Run
go build .
- Run
./pagerduty-cli
Releases
-
Bump the version in version/version.go. Commit the change to main.
-
Create a new git tag.
$ git tag -a v0.1.0 -m "First release"
$ git push origin v0.1.0
- Run
make release.