The LayerLens Stratix CLI provides terminal access to all platform features: traces, judges, evaluations, integrations, scorers, evaluation spaces, bulk operations, and CI/CD helpers.
Install the SDK with the cli extra:
pip install layerlens[cli] --extra-index-url https://sdk.layerlens.ai/packageIf you already have layerlens installed, add the CLI extra:
pip install "layerlens[cli]" --extra-index-url https://sdk.layerlens.ai/packageFor local development from a cloned repo:
pip install -e ".[cli]"Verify the installation:
stratix --versionThe CLI requires a LayerLens Stratix API key. Set it as an environment variable (recommended):
export LAYERLENS_STRATIX_API_KEY="your-api-key"Or pass it per-command:
stratix --api-key "your-api-key" trace listBy default the CLI talks to api.layerlens.ai. Override with:
stratix --host my-instance.example.com trace list
stratix --host my-instance.example.com --port 8443 trace listEvery command accepts these options:
| Option | Description |
|---|---|
--api-key |
API key (or set LAYERLENS_STRATIX_API_KEY) |
--host |
API host |
--port |
API port |
--format |
Output format: table (default) or json |
--verbose / -v |
Enable debug output |
--version |
Print version and exit |
The default output is a human-readable table:
stratix trace listID Created Filename Evaluations
───────────────────────────────────────────────────────────────────────────────────────
a1b2c3d4-... 2026-03-15 14:30 traces.jsonl 3
e5f6a7b8-... 2026-03-14 09:12 batch_02.json 1
Switch to JSON for scripting:
stratix --format json trace list[
{
"id": "a1b2c3d4-...",
"created_at": "2026-03-15T14:30:00Z",
"filename": "traces.jsonl",
...
}
]The CLI supports tab-completion for commands, options, and resource IDs.
# Print setup instructions for your shell
stratix completion bash
stratix completion zsh
stratix completion fish
stratix completion powershellFollow the printed instructions to enable completions. After setup, you can tab-complete trace IDs, judge IDs, model names, and more.
stratix trace liststratix evaluate run --model openai/gpt-4o --benchmark arc-agi-2 --waitstratix judge create --name "Response Quality" --goal "Rate accuracy and completeness" --model-id <MODEL_ID>stratix integration liststratix ci report -o summary.md- Command Reference — all commands and their options
- Examples — 15 common workflows as copy-paste shell sessions