Skip to content

facundofc/pagerduty-cli

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

79 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pagerduty-cli

PagerDuty Command Line Interface

oclif Version Downloads/week License

Usage

$ npm install -g pagerduty-cli
$ pd COMMAND
running command...
$ pd (-v|--version|version)
pagerduty-cli/0.0.32 darwin-x64 node-v14.11.0
$ pd --help [COMMAND]
USAGE
  $ pd COMMAND
...

Commands

pd auth:get

Get PagerDuty Auth token

USAGE
  $ pd auth:get

OPTIONS
  -h, --help  show CLI help

See code: src/commands/auth/get.ts

pd auth:set

Set PagerDuty Auth token

USAGE
  $ pd auth:set

OPTIONS
  -t, --token=token  A PagerDuty API token

See code: src/commands/auth/set.ts

pd auth:web

Authenticate with PagerDuty in the browser

USAGE
  $ pd auth:web

OPTIONS
  -h, --help  show CLI help

See code: src/commands/auth/web.ts

pd help [COMMAND]

display help for pd

USAGE
  $ pd help [COMMAND]

ARGUMENTS
  COMMAND  command to show help for

OPTIONS
  --all  see all commands in CLI

See code: @oclif/plugin-help

pd incident:ack

Acknowledge PagerDuty Incidents

USAGE
  $ pd incident:ack

OPTIONS
  -h, --help     show CLI help
  -i, --ids=ids  Incident ID's to acknowledge. Specify multiple times for multiple incidents.
  -m, --me       Acknowledge all incidents assigned to me
  -p, --pipe     Read incident ID's from stdin.

See code: src/commands/incident/ack.ts

pd incident:list

List PagerDuty Incidents

USAGE
  $ pd incident:list

OPTIONS
  -S, --services=services                                     Service names to include. Specify multiple times for
                                                              multiple services.

  -e, --assignees=assignees                                   Return only incidents assigned to this PD login email.
                                                              Specify multiple times for multiple assignees.

  -h, --help                                                  show CLI help

  -j, --json                                                  output full details as JSON

  -k, --keys=keys                                             Additional fields to display. Specify multiple times for
                                                              multiple fields.

  -m, --me                                                    Return only incidents assigned to me

  -p, --pipe                                                  Print incident ID's only to stdin, for use with pipes.

  -s, --statuses=open|closed|triggered|acknowledged|resolved  [default: open] Return only incidents with the given
                                                              statuses. Specify multiple times for multiple statuses.

  -t, --teams=teams                                           Team names to include. Specify multiple times for multiple
                                                              teams.

  -u, --urgencies=high|low                                    [default: high,low] Urgencies to include.

  -x, --extended                                              show extra columns

  --columns=columns                                           only show provided columns (comma-separated)

  --csv                                                       output is csv format [alias: --output=csv]

  --filter=filter                                             filter property by partial string matching, ex: name=foo

  --no-header                                                 hide table header from output

  --no-truncate                                               do not truncate output to fit screen

  --output=csv|json|yaml                                      output in a more machine friendly format

  --since=since                                               The start of the date range over which you want to search.

  --sort=sort                                                 property to sort by (prepend '-' for descending)

  --until=until                                               The end of the date range over which you want to search.

See code: src/commands/incident/list.ts

pd incident:notes

See or add notes on PagerDuty Incidents

USAGE
  $ pd incident:notes

OPTIONS
  -h, --help              show CLI help
  -i, --id=id             (required) Incident ID.
  -n, --note=note         Note to add
  -x, --extended          show extra columns
  --columns=columns       only show provided columns (comma-separated)
  --csv                   output is csv format [alias: --output=csv]
  --filter=filter         filter property by partial string matching, ex: name=foo
  --no-header             hide table header from output
  --no-truncate           do not truncate output to fit screen
  --output=csv|json|yaml  output in a more machine friendly format
  --sort=sort             property to sort by (prepend '-' for descending)

See code: src/commands/incident/notes.ts

pd incident:open

Open PagerDuty Incidents in your browser

USAGE
  $ pd incident:open

OPTIONS
  -h, --help     show CLI help
  -i, --ids=ids  Incident ID's to open. Specify multiple times for multiple incidents.
  -m, --me       Open all incidents assigned to me
  -p, --pipe     Read incident ID's from stdin.

See code: src/commands/incident/open.ts

pd incident:priority

Set priority on PagerDuty Incidents

USAGE
  $ pd incident:priority

OPTIONS
  -h, --help               show CLI help
  -i, --ids=ids            Incident ID's to set priority on. Specify multiple times for multiple incidents.
  -m, --me                 Set priority on all incidents assigned to me
  -n, --priority=priority  (required) The name of the priority to set.
  -p, --pipe               Read incident ID's from stdin.

See code: src/commands/incident/priority.ts

pd incident:resolve

Resolve PagerDuty Incidents

USAGE
  $ pd incident:resolve

OPTIONS
  -h, --help     show CLI help
  -i, --ids=ids  Incident ID's to resolve. Specify multiple times for multiple incidents.
  -m, --me       Resolve all incidents assigned to me
  -p, --pipe     Read incident ID's from stdin.

See code: src/commands/incident/resolve.ts

pd rest:delete

Make a DELETE request to PagerDuty

USAGE
  $ pd rest:delete

OPTIONS
  -H, --headers=headers    [default: ] Headers to add, for example, `From=martin@pagerduty.com`. Specify multiple times
                           for multiple headers.

  -e, --endpoint=endpoint  (required) The path to the endpoint, for example, `/users/PXXXXXX` or `/services`

  -h, --help               show CLI help

  -p, --params=params      [default: ] Parameters to add, for example, `query=martin` or `include[]=teams. Specify
                           multiple times for multiple params.

See code: src/commands/rest/delete.ts

pd rest:fetch

Fetch objects from PagerDuty

USAGE
  $ pd rest:fetch

OPTIONS
  -e, --endpoint=endpoint  (required) The path to the endpoint, for example, `/users/PXXXXXX` or `/services`
  -h, --help               show CLI help

  -p, --params=params      [default: ] Parameters to add, for example, `query=martin` or `include[]=teams. Specify
                           multiple times for multiple params.

See code: src/commands/rest/fetch.ts

pd rest:get

Make a GET request to PagerDuty

USAGE
  $ pd rest:get

OPTIONS
  -H, --headers=headers    [default: ] Headers to add, for example, `From=martin@pagerduty.com`. Specify multiple times
                           for multiple headers.

  -e, --endpoint=endpoint  (required) The path to the endpoint, for example, `/users/PXXXXXX` or `/services`

  -h, --help               show CLI help

  -p, --params=params      [default: ] Parameters to add, for example, `query=martin` or `include[]=teams. Specify
                           multiple times for multiple params.

See code: src/commands/rest/get.ts

pd rest:post

Make a POST request to PagerDuty

USAGE
  $ pd rest:post

OPTIONS
  -H, --headers=headers    [default: ] Headers to add, for example, `From=martin@pagerduty.com`. Specify multiple times
                           for multiple headers.

  -d, --data=data          (required) JSON data to send

  -e, --endpoint=endpoint  (required) The path to the endpoint, for example, `/users/PXXXXXX` or `/services`

  -h, --help               show CLI help

  -p, --params=params      [default: ] Parameters to add, for example, `query=martin` or `include[]=teams. Specify
                           multiple times for multiple params.

See code: src/commands/rest/post.ts

pd rest:put

Make a PUT request to PagerDuty

USAGE
  $ pd rest:put

OPTIONS
  -H, --headers=headers    [default: ] Headers to add, for example, `From=martin@pagerduty.com`. Specify multiple times
                           for multiple headers.

  -d, --data=data          (required) JSON data to send

  -e, --endpoint=endpoint  (required) The path to the endpoint, for example, `/users/PXXXXXX` or `/services`

  -h, --help               show CLI help

  -p, --params=params      [default: ] Parameters to add, for example, `query=martin` or `include[]=teams. Specify
                           multiple times for multiple params.

See code: src/commands/rest/put.ts

pd schedule:list

List PagerDuty Schedules

USAGE
  $ pd schedule:list

OPTIONS
  -h, --help              show CLI help
  -j, --json              output full details as JSON
  -k, --keys=keys         Additional fields to display. Specify multiple times for multiple fields.
  -n, --name=name         Select schedules whose names contain the given text
  -p, --pipe              Print user ID's only to stdin, for use with pipes.
  -x, --extended          show extra columns
  --columns=columns       only show provided columns (comma-separated)
  --csv                   output is csv format [alias: --output=csv]
  --filter=filter         filter property by partial string matching, ex: name=foo
  --no-header             hide table header from output
  --no-truncate           do not truncate output to fit screen
  --output=csv|json|yaml  output in a more machine friendly format
  --sort=sort             property to sort by (prepend '-' for descending)

See code: src/commands/schedule/list.ts

pd service:disable

Disable PagerDuty Services

USAGE
  $ pd service:disable

OPTIONS
  -h, --help       show CLI help
  -i, --ids=ids    Select services with the given ID. Specify multiple times for multiple services.
  -n, --name=name  Select services whose names contain the given text
  -p, --pipe       Read service ID's from stdin.

See code: src/commands/service/disable.ts

pd service:enable

Enable PagerDuty Services

USAGE
  $ pd service:enable

OPTIONS
  -h, --help       show CLI help
  -i, --ids=ids    Select services with the given ID. Specify multiple times for multiple services.
  -n, --name=name  Select services whose names contain the given text
  -p, --pipe       Read service ID's from stdin.

See code: src/commands/service/enable.ts

pd service:list

List PagerDuty Services

USAGE
  $ pd service:list

OPTIONS
  -h, --help              show CLI help
  -j, --json              output full details as JSON
  -k, --keys=keys         Additional fields to display. Specify multiple times for multiple fields.
  -n, --name=name         Retrieve only services whose names contain this text
  -p, --pipe              Print service ID's only to stdin, for use with pipes.
  -t, --teams=teams       Team names to include. Specify multiple times for multiple teams.
  -x, --extended          show extra columns
  --columns=columns       only show provided columns (comma-separated)
  --csv                   output is csv format [alias: --output=csv]
  --filter=filter         filter property by partial string matching, ex: name=foo
  --no-header             hide table header from output
  --no-truncate           do not truncate output to fit screen
  --output=csv|json|yaml  output in a more machine friendly format
  --sort=sort             property to sort by (prepend '-' for descending)

See code: src/commands/service/list.ts

pd service:set

Set PagerDuty Service attributes

USAGE
  $ pd service:set

OPTIONS
  -h, --help         show CLI help
  -i, --ids=ids      Select services with the given ID. Specify multiple times for multiple services.
  -k, --key=key      (required) Attribute key to set
  -n, --name=name    Select services whose names contain the given text
  -p, --pipe         Read service ID's from stdin.
  -v, --value=value  (required) Attribute value to set

See code: src/commands/service/set.ts

pd update [CHANNEL]

update the pd CLI

USAGE
  $ pd update [CHANNEL]

See code: @oclif/plugin-update

pd user:list

List PagerDuty Users

USAGE
  $ pd user:list

OPTIONS
  -e, --email=email       Select users whose login email addresses contain the given text
  -h, --help              show CLI help
  -j, --json              output full details as JSON
  -k, --keys=keys         Additional fields to display. Specify multiple times for multiple fields.
  -p, --pipe              Print user ID's only to stdin, for use with pipes.
  -x, --extended          show extra columns
  --columns=columns       only show provided columns (comma-separated)
  --csv                   output is csv format [alias: --output=csv]
  --filter=filter         filter property by partial string matching, ex: name=foo
  --no-header             hide table header from output
  --no-truncate           do not truncate output to fit screen
  --output=csv|json|yaml  output in a more machine friendly format
  --sort=sort             property to sort by (prepend '-' for descending)

See code: src/commands/user/list.ts

pd user:set

Set PagerDuty User attributes

USAGE
  $ pd user:set

OPTIONS
  -e, --email=email  Select users whose emails contain the given text
  -h, --help         show CLI help
  -i, --ids=ids      Select users with the given ID. Specify multiple times for multiple users.
  -k, --key=key      (required) Attribute key to set
  -p, --pipe         Read user ID's from stdin.
  -v, --value=value  (required) Attribute value to set

See code: src/commands/user/set.ts

About

A command line interface for PagerDuty

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 97.3%
  • Shell 2.5%
  • Other 0.2%