Documentation Index
Fetch the complete documentation index at: https://docs.cirron.com/llms.txt
Use this file to discover all available pages before exploring further.
cirron doctor
Print a single-command diagnostic of the user’s local Cirron setup: installed SDK extras, resolved config, local spool status, and platform connectivity.cirron doctor is designed as the first thing a user runs after pip install cirron-sdk, and as the standard artifact for support tickets (“run cirron doctor and send me the output”).
The command is read-only and never mutates state. It works with no arguments, no API key, and no config file: each section reports what is present and what is missing rather than failing.
Usage
Options
| Option | Description | Default |
|---|---|---|
--json | Emit a machine-readable JSON object with the full report | off |
--venv <path> | Inspect a specific Python environment instead of auto-detecting | auto-detected (see below) |
--no-color | Disable ANSI color, regardless of TTY | off |
--strict | Exit non-zero when no Python environment is detected | off |
What Gets Reported
Environment
The Python environment being inspected. Resolution order (first hit wins):$VIRTUAL_ENV(set bysource .venv/bin/activate)$CONDA_PREFIX(set byconda activate)./.venv/in the current working directory./venv/in the current working directory- Nothing found, dep sections are skipped
--venv /path/to/.venv to override. Doctor reads Python’s version string from the venv’s pyvenv.cfg, so no Python process is ever spawned.
Dependency Sections
The installedcirron-sdk package is the source of truth: doctor parses the Requires-Dist lines in its METADATA file to discover which optional extras the SDK advertises and checks each one against site-packages. Results are grouped into:
- Core:
cirron-sdk,pydantic,pyyaml,requests. Any missing entry here counts as a broken install. - Core (optional):
python-dotenvfor.envauto-loading. - Frameworks:
torch,tensorflow,transformers,scikit-learn. When installed, each advertises the SDK feature it unlocks (hooks availableorci.wrap() available). - Data:
pandas,polars,datasets, etc.pandasis the defaultci.load()backend. - Snapshots:
safetensors, required for sampled or full snapshot capture. - Other extras: groups the installed SDK declares that this CLI version does not have friendly labels for (for example
[s3],[azure],[postgres]). A note at the bottom suggests upgrading the CLI when this list is non-empty.
pip install 'cirron-sdk[group]' hint needed to install it.
Platform
Endpoint, authentication, and connectivity. Doctor prefers the CLI’s~/.cirron/config.json (the file written by cirron auth login) and falls back to the SDK’s ~/.cirron/config.toml. The authSource field captures which layer supplied credentials:
cli: JWT fromcirron auth loginsdk:api_keyin~/.cirron/config.tomlenv:CIRRON_API_KEYenv varapi: an API key is present but the origin was not tracked
GET /api/health with a 3-second timeout, records latency, and reads the platform’s health payload (status, version). When no credentials are present, doctor prints not configured without making any network call.
Local
The paths and presence of relevant config files:~/.cirron/config.json(CLI auth)~/.cirron/config.toml(SDK config)cirron.yaml/cirron.yml/cirron.jsondiscovered by walking upward from the current directory.envin the current directory- Resolved
output_dirwith its resolution source (default,config.toml,env)
Spool
File count, total bytes, oldest/newest mtime, and free disk space for the directory at{output_dir}/spool/.
GPU
A single line from the CLI’s existing hardware detector. Silently omitted when no GPU is detected.Example Output
Activated venv with the full SDK install:JSON Output
Exit Codes
| Code | Meaning |
|---|---|
0 | All core deps present, and platform is either reachable or not configured (valid for standalone use) |
1 | A core dep is missing (broken install), or the configured platform is unreachable or reports unhealthy, or cirron-sdk itself is not installed in the target environment. --strict also returns 1 when no Python environment is detected. |
How It Works
Doctor inspects your Python environment without ever spawningpython. Packages installed via pip drop a {name}-{version}.dist-info/METADATA file in site-packages/, which is a plain RFC 822 text file. Doctor reads those files directly: for cirron-sdk, it parses the Requires-Dist lines to discover the SDK’s extras groups; for every package in the report, it reads Name and Version from the same file.
This approach has three benefits:
- The expected-dep list is always fresh, baked into whatever SDK version the user has installed. A newer SDK with new extras will surface under “Other extras” even on an older CLI.
- No subprocess, no shell-escaping, no cross-platform
python3vspythondiscovery. - Fast: doctor finishes in well under a second even on a venv with dozens of deps.
[all] or [sql]) are filtered to keep the report clean.
Examples
First-Run Setup Check
CI Pipeline
Support Ticket
Troubleshooting a Specific Venv
Related Commands
- cirron auth status — Show authentication state (doctor includes a compact version of this)
- cirron info —diagnostics — CLI-side diagnostic (auth, config, connectivity) as opposed to doctor’s SDK-environment focus
- cirron spool inspect — Detailed per-file view of the spool; doctor only reports counts and totals
ci.deps(): In-process equivalent for scripts and library code. Reports installed extras and raisesCirronDependencyErrorlisting missing ones when called with required names