For the complete documentation index, see llms.txt. This page is also available as Markdown.

CLI — Getting Started

SDK CLI getting started — installation, configuration, output formats, shell completion.

The LayerLens Stratix CLI provides terminal access to all platform features: traces, judges, evaluations, integrations, scorers, evaluation spaces, bulk operations, and CI/CD helpers.

Installation

Install the SDK with the cli extra:

pip install layerlens --extra-index-url https://sdk.layerlens.ai/package[cli] --extra-index-url https://sdk.layerlens.ai/package

If you already have layerlens installed, add the CLI extra:

pip install "layerlens[cli]" --extra-index-url https://sdk.layerlens.ai/package

For local development from a cloned repo:

pip install -e ".[cli]"

Verify the installation:

stratix --version

Configuration

API key

The 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:

Custom host

By default the CLI talks to api.layerlens.ai. Override with:

Global options

Every 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

Output formats

The default output is a human-readable table:

Switch to JSON for scripting:

Shell completions

The CLI supports tab-completion for commands, options, and resource IDs.

Follow the printed instructions to enable completions. After setup, you can tab-complete trace IDs, judge IDs, model names, and more.

First commands

List your traces

Run an evaluation

Create a judge

Check integrations

Generate a CI report

Next steps

  • Command Reference — all commands and their options

  • Examples — 15 common workflows as copy-paste shell sessions

Last updated

Was this helpful?