Unofficial Command-Line Interface (CLI) for the Disruptive Technologies (DT) API.
The package is hosted on PyPI and is available through pip.
pip install --upgrade disruptive-cli
Supports Python 3.8+.
Using Service Account credentials, set the following environment variables.
export DT_SERVICE_ACCOUNT_KEY_ID="<SERVICE_ACCOUNT_KEY_ID>"
export DT_SERVICE_ACCOUNT_SECRET="<SERVICE_ACCOUNT_SECRET>"
export DT_SERVICE_ACCOUNT_EMAIL="<SERVICE_ACCOUNT_EMAIL>"
Call the dt
command using a dt NOUN VERB
syntax.
- List all available projects.
dt project list
- Get a single device.
dt device get <DEVICE_ID>
See dt -h
for additional commands.
Bash completion is currently supported. Copy the completion script in disruptive-cli/completion
to your place of choice in path, then source it from either .bashrc
, .bash_profile
, or .profile
depending on your environment.
source '/usr/local/bin/dt-completion.bash'
A tabular human readable output is prioritized.
Column headers are removed for single columns or if the --no-header
flag is provided.
A select set of columns are shown per resource. Use the --full
flag to output all available information.
On the other hand, the --include
can be used to include only specified columns in output.
The following formats are supported.
--json
--csv
--tsv
Pipes are supported using the -
symbol to make chaining commands simpler.
The following example lists all projects, then pipes the project-id
column to the serviceaccount
command to list all available Service Accounts per project. The output is formatted as .json
and piped into jq for further processing.
dt project list --include project-id | dt serviceaccount list - --json | jq
Virtualenv is used for dependency isolation, wrapped by the following commands.
- Build the distribution:
make build
- Remove build-files:
make clean