CLI Reference¶
The aptdata command-line interface emits structured JSON on every
outcome, making it suitable for use inside AI orchestrators, CI/CD pipelines
and shell scripts.
aptdata run¶
Run a registered pipeline by name.
Arguments¶
| Name | Required | Description |
|---|---|---|
PIPELINE |
✅ | Pipeline identifier registered in the plugin registry |
Options¶
| Flag | Default | Description |
|---|---|---|
--env, -e |
dev |
Target execution environment label (e.g. dev, staging, prod) |
--dry-run |
false |
Compile and validate the pipeline without executing run() |
--help |
Show help and exit |
Exit codes¶
| Code | Meaning |
|---|---|
0 |
Pipeline completed successfully |
1 |
An error occurred (pipeline not found, runtime exception, etc.) |
JSON events¶
pipeline.started – emitted immediately after the CLI receives the
command:
pipeline.completed – emitted when the pipeline finishes successfully:
{
"event": "pipeline.completed",
"pipeline": "my_pipeline",
"env": "prod",
"dry_run": false,
"elapsed_seconds": 1.234
}
pipeline.error – emitted to stderr when an error occurs:
{
"event": "pipeline.error",
"pipeline": "my_pipeline",
"env": "prod",
"error": "Pipeline 'my_pipeline' not found in registry.",
"elapsed_seconds": 0.001
}
Examples¶
# Run in the default dev environment
aptdata run my_pipeline
# Run against production
aptdata run my_pipeline --env prod
# Validate without executing
aptdata run my_pipeline --dry-run
# Capture and parse JSON output with jq
aptdata run my_pipeline | jq '.elapsed_seconds'
aptdata monitor¶
Launch the interactive TUI monitoring dashboard.
Options¶
| Flag | Default | Description |
|---|---|---|
--refresh, -r |
1.0 |
Dashboard auto-refresh interval in seconds |
--help |
Show help and exit |
Key bindings¶
| Key | Action |
|---|---|
r |
Manually refresh all panels |
q / Ctrl+C |
Quit |
Examples¶
# Open with default 1-second refresh
aptdata monitor
# Faster refresh for high-frequency pipelines
aptdata monitor --refresh 0.25
aptdata system¶
Inspect and validate registered systems.
aptdata system list [--json]¶
List all systems in the plugin registry.
aptdata system info NAME [--json]¶
Show detailed info about a registered system (class name, module, docstring).
aptdata system validate NAME¶
Instantiate the system and compile all its flows without executing.
aptdata plugin¶
Manage and inspect registered reader / writer plugins.
aptdata plugin list [--json]¶
List all registered readers and writers.
aptdata plugin inspect NAME [--json]¶
Show constructor argument schema for a plugin.
aptdata plugin preview READER [--limit N]¶
Execute a reader and display the first N records (default: 5).
aptdata plugin load MODULE_PATH¶
Dynamically import a Python module (for plugin discovery).
aptdata config¶
Manage declarative YAML pipeline configurations.
aptdata config validate PATH¶
Parse and validate a YAML config file.
aptdata config init [--output PATH]¶
Generate a starter YAML configuration template.
aptdata config show PATH¶
Pretty-print a YAML config file with syntax highlighting.
aptdata config run PATH [--env ENV]¶
Parse a YAML config, register the system, and execute it.
aptdata telemetry¶
Inspect OpenTelemetry telemetry configuration.
aptdata telemetry status [--json]¶
Show whether OpenTelemetry is configured and the active tracer provider.
aptdata telemetry export [--format json]¶
Export collected telemetry spans/metrics as JSON.
aptdata interactive¶
Launch the guided interactive wizard.
See CLI Interactive Wizard for full documentation.
App module¶
aptdata.cli.app
¶
Typer-based static CLI for aptdata.
Design goals
- Machine / AI-readable: every outcome is emitted as a single JSON line on stdout (success) or stderr (error).
- Exit codes: 0 = success, 1 = error.
- Self-documenting: Typer generates --help automatically from the docstrings and type annotations.
Functions¶
run(pipeline=typer.Argument(..., help='Pipeline name / identifier to run.'), env=typer.Option('dev', '--env', '-e', help='Target execution environment.'), dry_run=typer.Option(False, '--dry-run', help='Validate and compile the pipeline without executing it.'))
¶
Run a registered data pipeline.
Emits structured JSON logs and returns exit code 0 on success or 1 on failure so that orchestrators and AI agents can parse the outcome.
Examples:
aptdata run pipeline_x --env prod aptdata run pipeline_x --env staging --dry-run
Source code in aptdata/cli/app.py
monitor(refresh=typer.Option(1.0, '--refresh', '-r', help='Dashboard refresh interval in seconds.'))
¶
Open the interactive TUI monitoring dashboard.
Displays the pipeline DAG, memory usage and task status in real time. Press q or Ctrl+C to exit.
Examples:
aptdata monitor aptdata monitor --refresh 0.5