jdlubrano / pagerduty-cli

A CLI for quick PagerDuty access

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PagerDuty CLI

Build Status

A CLI for interacting with the PagerDuty API.

Installation

This tool assumes that you are a part of an account using Advanced Permissions.

  1. Acquire a PagerDuty developer API token.
  2. Create a configuration file at $HOME/.pagerduty.yml. The file should have the following information:
---
api-token: <your token>
  1. Download the latest binary release and place the binary somewhere in your $PATH.

  2. You should be able to run pagerduty-cli to see the available commands.

  3. 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

  1. Checkout this repository.
  2. Run go build .
  3. Run ./pagerduty-cli

Releases

  1. Bump the version in version/version.go. Commit the change to main.

  2. Create a new git tag.

$ git tag -a v0.1.0 -m "First release"
$ git push origin v0.1.0
  1. Run make release.

About

A CLI for quick PagerDuty access

License:MIT License


Languages

Language:Go 97.8%Language:Makefile 2.2%