Satcat CLI
Satcat CLI is a command-line application included with Satcat SDK for quickly performing common tasks on Satcat.
Whereas the Satcat SDK Python library is best used for writing scripts used in automated systems, the Satcat CLI is best used as a tool for power users to interact with Satcat services quickly and efficiently from the command line without needing to write Python code.
Getting Started
If you have installed the SDK using pip, the Satcat CLI should already be installed in your path. You can verify this using:
$ satcat version
satcat version 1.0.0
Listing Entities
You can use the satcat
list command to list any entity in the Satcat screening API, including your screenings:
$ satcat list screenings
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━┓
┃ Id ┃ Title ┃ Status ┃ Created At ┃ Conjunctions Count ┃ Primary Ids Preview ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━┩
│ dd44f906-1e9c-40cd-b97f-e6d791b39b96 │ Screening │ SUCCESS │ 2022-06-22 14:50:24+00:00 │ 12 │ [25544] │
└──────────────────────────────────────┴───────────┴─────────┴───────────────────────────┴────────────────────┴─────────────────────┘
In the Screening list table with rich formatting, the values in the Id
column are automatic hyperlinks to the Satcat web application on supported terminal clients (ctrl-click
/ cmd-click
to open in your web browser).
Since Satcat screenings all run on Satcat servers, you can view the same screening results and information on the Satcat website easily after configuring and running them using the SDK or CLI.
Output Formatting
By default, the Satcat CLI uses rich output formatting including tables and progress indicators for human readability. However, you can also configure the CLI to output plain JSON data for machine readability or redirecting to a file (e.g. for logging purposes).
To set the output format to json, use the --output-format
(-o
) flag of the satcat
base command:
$ satcat --output-format json ...
The --output-format
flag must be specified after the base satcat
command but before any subcommands.
❌ satcat list screenings --output-format json
✅ satcat --output-format json list screenings
To disable interactive progress indicators in the terminal output, you can use the --no-progress
flag of the satcat
base command:
$ satcat --no-progress ...
These settings can also be persistently configured in the settings module as settings.output_format
and settings.show_progress
respectively.
The default rich CLI output format only displays a curated subset of information for each resource type for maximum readability. To view all fields of a resource and inspect in detail, it's best to use --output-format json
.