Skip to content

CLI

The simpcat CLI is installed automatically with pip install simpcat. It handles authentication, diagnostics, offline run sync, and data queries.

Runtime environment variable overrides for the CLI, Python SDK, and spawned reporter are documented in the Environment Variables reference.

Create an API key in the Simpcat web UI under Settings → API Keys, then authenticate with:

Terminal window
simpcat login

You’ll be prompted for your API key. Pass it directly with:

Terminal window
simpcat login --key sk-your-api-key

Connect to a custom host:

Terminal window
simpcat login --host my-simpcat.example.com

The SIMPCAT_HOST environment variable is also respected when --host is not provided.

simpcat login verifies the key with the server and stores credentials per host in ~/.simpcat/config.toml.

Remove saved credentials for a host:

Terminal window
# Remove credentials for the default host (app.simpcat.ai)
simpcat logout
# Remove credentials for a specific host
simpcat logout --host my-simpcat.example.com

Upload orphaned runs that didn’t finish syncing (e.g. after a crash or network failure).

Sync a specific run:

Terminal window
simpcat sync .simpcat/run-20260219_143052-a1b2c3d4/

Scan for and sync all unfinished runs:

Terminal window
simpcat sync --all

The sync command replays the run’s WAL (write-ahead log), uploads any pending logs and media, and marks the run as finished.

Most users do not need this during normal setup. Use it when you want a diagnostic summary of the current CLI and reporter configuration:

Terminal window
simpcat verify

This checks:

  • Config file exists
  • Host configuration
  • API key is configured
  • Server is reachable and API key is valid
  • Reporter mode (online/offline)
  • Active environment variable overrides

Exits with code 1 if any check fails — useful in CI or setup scripts.

Set SIMPCAT_MODE=offline before launching training:

Terminal window
SIMPCAT_MODE=offline python train.py

simpcat.init() starts a reporter process for each run, and that reporter inherits the training environment. In offline mode, the reporter collects metrics to the local WAL (write-ahead log) without making any network calls. Use simpcat sync later to upload offline runs.

Offline sync currently treats each unsynced local reporter attempt as its own uploaded run. Fresh offline runs do not have a canonical run ID or run.json until future offline-resume support is added, so restarting from the same save_dir will not automatically continue the same logical run. Use online mode when you need normal multi-process resume semantics.

You can also set mode = "offline" in the [reporter] section of your config file.

The simpcat get namespace is the read-only CLI surface over the documented public API.

List all projects in your organization:

Terminal window
simpcat get projects

List runs, with optional filters:

Terminal window
# All runs
simpcat get runs
# Filter by project
simpcat get runs --project my-project --limit 10

Show details for a specific run:

Terminal window
simpcat get run a1b2c3d4

List metric names and summary stats recorded by a run:

Terminal window
simpcat get metric-summary a1b2c3d4

View time-series data for a specific metric:

Terminal window
simpcat get metric a1b2c3d4 train/loss
# Limit resolution or filter by step range
simpcat get metric a1b2c3d4 train/loss --resolution bucketed --after-step 100

Query one or more metrics across one or more runs and write the result in machine-readable formats:

Terminal window
simpcat get metrics --runs a1b2c3d4,b5c6d7e8 --metrics train/loss --format csv

List signed file URLs for a run:

Terminal window
simpcat get files a1b2c3d4 --format json

Query assets across one or more runs:

Terminal window
simpcat get assets --runs a1b2c3d4,b5c6d7e8 --types console_log,image --format json

Export metric data in various formats:

Terminal window
# Export all metrics as Parquet (default)
simpcat export simpcat a1b2c3d4
# Export a specific metric as CSV
simpcat export simpcat a1b2c3d4 train/loss --format csv -o loss.csv
# Export from multiple runs
simpcat export simpcat run1,run2 --format json

Supported formats: parquet, csv, arrow, arrow_stream, json.

Most simpcat get commands support either --format text|json or a machine-oriented export format. For export, use --format json.

Internal command — runs the metrics collection reporter for a single run. Called automatically by simpcat.init(), not intended for direct use.

Terminal window
simpcat reporter --run-dir .simpcat/run-xxx/ --run-id abcd1234