cirron spool
Manage the local spool directory where the Cirron Python SDK writes trace batches whileci.profile() is active. Spool files accumulate in ./.cirron/spool/ and contain JSON batches of spans and marks produced by your training or inference code.
The spool command group is the setup path for external runs: laptops, notebooks, or customer servers that aren’t on platform-managed compute. It lets you see what the SDK has buffered locally, push those batches to the platform, or reclaim disk by clearing them.
Subcommands
cirron spool inspect: List spool files with sizes and timestampscirron spool flush: Upload buffered batches to the platformcirron spool clear: Delete local spool files
Usage
Options
| Option | Description | Default |
|---|---|---|
--dir <path> | Override the spool directory | ./.cirron/spool (current working directory) |
--json | Emit machine-readable JSON (inspect only) | — |
--force | Skip the confirmation prompt (clear only) | — |
Subcommand Details
Inspect the Spool
List every batch file in the spool with its timestamp and size, plus a header summary and oldest/newest footer.Example Output
Empty Spool Output
JSON Output
Flush the Spool
Upload every batch file to the platform’s trace ingest endpoint, then delete each file after it’s acknowledged. Files are sent in oldest-first order. Batches are gzip-compressed when larger than 1 KB.cirron auth login (~/.cirron/config.json). Before sending any batch, the CLI verifies your token is still valid and transparently refreshes it if it’s close to expiry. If verification returns 401/403, the flush is aborted with a prompt to re-authenticate.
Each upload has a request timeout (governed by config.timeout) and retries up to three times on transient failures (5xx, 429, network errors) with exponential backoff. Rate-limited responses respect the Retry-After header.
Example Output
Partial Failure
If a fatal error occurs mid-flush (e.g. an authentication issue or an unrecoverable 4xx), remaining batches stay in the spool and can be retried on the next run:Missing Ingest Route
If the platform you’re pointing at doesn’t expose/api/traces yet, flush fails fast with a clear message and leaves your spool intact:
Clear the Spool
Delete every batch file in the spool directory. By default you’re shown a summary and asked to confirm; use--force to skip the prompt (useful in scripts).
Confirmation Prompt
Example Output
How It Works
The Python SDK writes spool files whenci.profile() is active. Each file is a JSON batch containing spans and marks from one flush interval (roughly 1 second of runtime). File names encode a nanosecond-precision timestamp plus a batch ID, which the CLI parses to present ordered results without reading each file’s contents.
Spool files are the public local artifact of the SDK. They work standalone and can be consumed by third-party tools. Flushing to the platform is optional; many teams run profilers on disconnected laptops or air-gapped machines and simply archive the spool directory.
The CLI’s spool commands are a lightweight inspection surface:
inspectshows the file-system inventory without parsing batch contents.flushuploads exactly the JSON the SDK produced, no transformation.clearis a plain directory delete.
cirron traces view instead.
Authentication
spool flush requires CLI authentication. inspect and clear are offline operations.
Error Handling
Common Errors
Not Authenticated
cirron auth login.
Auth Expired
cirron auth login.
Upload Timeout
cirron spool flush. The failed batch remains on disk and will be retried.
Local Unlink Failure
Examples
Disconnected Laptop Workflow
Archive and Ship a Spool
Reclaim Disk
Related Commands
- cirron auth: Manage authentication (required for
flush) - cirron status: Check CLI status
- cirron config: Manage CLI configuration (
apiUrl,timeout, etc.)