Skip to content

BreachRx/breachrx-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BreachRx CLI

About

The BreachRx command line interface is a utility for power users to streamline their use of the BreachRx incident management platform and further empower teams to prepare for and get ahead of incidents so they can act decisively when they occur.

Download

On the releases page, click on Assets at the bottom of the most recent release to download the latest version.

Usage

Usage: python breachrx-cli.pyz [OPTIONS] COMMAND [ARGS]...

Options:
  --version  Show the version and exit.
  --help     Show this message and exit.

Commands:
  create-incident
  get-incident-severities
  get-incident-types

Setup

Set the following environment variables (or create a .env file in the directory you plan to run the command in, with the following variables set):

# API Key and Secret Key can be generated on the BreachRx platform by an Admin.
BREACHRX_API_KEY="<API_KEY>"
BREACHRX_SECRET_KEY="<API_SECRET_KEY>"

# This corresponds to the simple org name in your organization's custom subdomain used when accessing the BreachRx platform.
# https://<ORG_NAME>.app.breachrx.io
BREACHRX_ORG_NAME="<ORG_NAME>" 

Commands

create-incident

Usage: python breachrx-cli.pyz create-incident [OPTIONS] INCIDENT_NAME

Options:
  --severity TEXT       Incident severity.
  --incident-type TEXT  Incident type.
  --description TEXT    A brief description of the Incident.
  --help                Show this message and exit.

get-incident-severities

Usage: python breachrx-cli.pyz get-incident-severities [OPTIONS]

Options:
  --help  Show this message and exit.

get-incident-types

Usage: python breachrx-cli.pyz get-incident-types [OPTIONS]

Options:
  --help  Show this message and exit.

Development

Development requires installing Poetry (pip install poetry).

poetry install
poetry self add poetry-plugin-export

How to build a single python executable

poetry export -f requirements.txt --output requirements.txt --without-hashes
mkdir dist
cp -rf breachrx-cli dist
python -m pip install -r requirements.txt --target dist/breachrx-cli
python -m zipapp -p "/usr/bin/env python3" dist/breachrx-cli

The resulting pyz file in the dist/ directory can be executed with the following command from any directory:

python breachrx-cli.pyz --help

Note: The environment variables must be set.

GraphQL API

The BreachRx GraphQL API documentation can be found here.

About

BreachRx platform command line interface

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages