Repository navigation
CLI
The jba command-line tool provides convenience commands for launching JupyterLab, listing configurations, describing them, and validating them.
Install jupyter-bioacoustic to get the jba entry point automatically.
Launch JupyterLab with the IOPub data rate limit required for spectrogram streaming.
jba lab # default rate limit
jba lab -r 5e8 # custom rate limit
jba lab -d # enable debug logging (./jba_debug.log)
jba lab -d /tmp/my_debug.log # debug logging to custom path| Option | Description |
|---|---|
-r, --rate-limit
|
IOPub data rate limit (default 1e10) |
-d, --debug
|
Enable debug logging. Optionally pass a log file path. |
-c, --clean
|
Clear pixi PyPI cache and reinstall before launching. Useful when editable installs serve stale labextensions. |
See Debug Mode for details on log output.
List configuration files found under the config directory.
jba list # list all (projects, config, forms)
jba list -p # projects only
jba list -c # configs only
jba list -f # forms only
jba list -d my_configs/ # custom config directory| Option | Description |
|---|---|
-d, --dir
|
Root configuration directory (default annotator_config) |
-p, --project
|
Show only projects |
-c, --config
|
Show only configs |
-f, --form
|
Show only forms |
Print a human-readable summary of a configuration.
jba describe my_config # search all subdirs by name
jba describe my_config -p # search projects only
jba describe -f path/to/form.yaml # describe a file directly
jba describe -p forms/ my_config # search for name in a specific directory| Option | Description |
|---|---|
name |
Configuration name (optional if -p/-c/-f provides a path) |
-d, --dir
|
Root configuration directory (default annotator_config) |
-p, --project
|
Search projects. Optionally pass a file or directory path. |
-c, --config
|
Search configs. Optionally pass a file or directory path. |
-f, --form
|
Search forms. Optionally pass a file or directory path. |
Resolution rules:
| Invocation | Behavior |
|---|---|
jba describe name |
Search all subdirs (projects/, config/, forms/) for a YAML with that stem |
jba describe name -p |
Search only the projects/ subdir |
jba describe -f path/to/file.yaml |
Use the file directly as a form config |
jba describe -p path/to/dir/ name |
Search for name inside path/to/dir/ as a project |
Validate a configuration and report errors and warnings. Accepts the same arguments and resolution rules as describe.
jba validate my_config # validate by name
jba validate my_config -f # validate as form only
jba validate -f path/to/form.yaml # validate a file directlyOutput uses exit codes for scripting:
| Exit code | Meaning |
|---|---|
0 |
Valid (may include warnings) |
1 |
Invalid (has errors), file not found, or missing arguments |
Example output:
Form: annotator_config/forms/my_form.yaml
Errors (3):
✗ "data_index_column" is required when a form is configured — set it to the column that uniquely identifies each row in the input data
✗ Unknown annotation tool "time_marker". Valid tools: bounding_box, fixed_duration, multibox, start_end_time_select, time_select
✗ Unknown annotation tool "start_end_time". Valid tools: bounding_box, fixed_duration, multibox, start_end_time_select, time_select
✗ Invalid
All commands that operate on configuration files accept -d/--dir to override the default root directory (annotator_config).
The -p/-c/-f flags on describe and validate serve double duty: as scope filters (flag-only) and as path providers (when followed by a string). If neither a name argument nor a path flag is given, the command prints an error.