Command Line Interface (CLI)#
compass#
COMPASS command line interface
Usage
compass [OPTIONS] COMMAND [ARGS]...
Options
- --version#
Show the version and exit.
collect#
Collect ordinance documents for a list of jurisdictions
This command runs the “first half” (i.e. the collection portion) of the COMPASS pipeline on for a set of jurisdictions. It finds and parses the documents but does not do any filtering or validation. As such, it does not require an LLM endpoint and thus can be parallelized and scaled without worrying about rate limits. The output is a manifest of parsed documents that can be passed to the extraction command.
Usage
compass collect [OPTIONS]
Options
- -c, --config <config>#
Required Path to a collection configuration JSON or JSON5 file. This file should contain any/all the arguments to pass to
CollectionRequest.
- -v, --verbose#
Show logs on the terminal.
- -np, --no-progress#
Flag to hide progress bars during collection.
- -p, --plugin <plugin>#
One-shot plugin configuration to add to COMPASS before collection
- -o, --out-dir-exists <out_dir_exists>#
How to handle an existing output directory. Choices: fail, increment, overwrite, prompt. If omitted, prompts interactively when running in a terminal, or fails when running non-interactively (e.g. CI).
- Options:
fail | increment | overwrite | prompt
extract#
Extract structured data from a saved collection manifest
This command runs the “second half” (i.e. the extraction portion) of the COMPASS pipeline on a previously saved collection manifest. It will perform document validation and filtering as necessary and will extract ordinances from the remaining documents.
Usage
compass extract [OPTIONS]
Options
- -c, --config <config>#
Required Path to an extraction configuration JSON or JSON5 file. This file should contain any/all the arguments to pass to
ExtractionRequest.
- -v, --verbose#
Show logs on the terminal.
- -np, --no-progress#
Flag to hide progress bars during extraction.
- -p, --plugin <plugin>#
One-shot plugin configuration to add to COMPASS before extraction
- -o, --out-dir-exists <out_dir_exists>#
How to handle an existing output directory. Choices: fail, increment, overwrite, prompt. If omitted, prompts interactively when running in a terminal, or fails when running non-interactively (e.g. CI).
- Options:
fail | increment | overwrite | prompt
finalize#
Finalize a partially-completed COMPASS run
Usage
compass finalize [OPTIONS]
Options
- -c, --config <config>#
Required Path to COMPASS run configuration JSON or JSON5 file. This file should contain any/all the arguments to pass to
ProcessRequest. The output directory that this config points to will be finalized.
process#
Download and extract ordinances for a list of jurisdictions
Usage
compass process [OPTIONS]
Options
- -c, --config <config>#
Required Path to ordinance configuration JSON or JSON5 file. This file should contain any/all the arguments to pass to
ProcessRequest.
- -v, --verbose#
Show logs on the terminal. Add extra libraries to get logs from by increasing the input (-v, -vv, -vvv). Does not affect log level, which is controlled via the config input.
- -np, --no-progress#
Flag to hide progress bars during processing.
- -p, --plugin <plugin>#
One-shot plugin configuration to add to COMPASS before processing
- -o, --out-dir-exists <out_dir_exists>#
How to handle an existing output directory. Choices: fail, increment, overwrite, prompt. If omitted, prompts interactively when running in a terminal, or fails when running non-interactively (e.g. CI).
- Options:
fail | increment | overwrite | prompt
search#
Run only the search step and emit ranked URL results
Usage
compass search [OPTIONS]
Options
- -c, --config <config>#
Required Path to ordinance configuration JSON or JSON5 file. Only the search-related keys (
tech,jurisdiction_fp,search_engines,url_ignore_substrings,url_keep_substrings,num_urls_to_check_per_jurisdiction,max_num_concurrent_browsers) are read.
- -n, --n-top-urls <n_top_urls>#
Override the number of top URLs to retain per jurisdiction (
num_urls_to_check_per_jurisdiction).
- -o, --output <output>#
Optional path to write the report. If omitted, the report is written to stdout.
- --output-format <output_format>#
Output representation for search results.
- Default:
'json'- Options:
json | summary
- -v, --verbose#
Show logs on stderr. Add extra libraries to get logs from by increasing the input (-v, -vv, -vvv).
- -p, --plugin <plugin>#
One-shot plugin configuration to register before searching