# CLI

The `layerlens` CLI is bundled with the Python SDK. Install the SDK, set an API key, and `layerlens` is on your PATH.

## Install

```bash
pip install layerlens --extra-index-url https://sdk.layerlens.ai/package
export LAYERLENS_STRATIX_API_KEY="..."
```

Verify:

```bash
layerlens --version
```

## What it does

* `layerlens login` — interactive authentication
* `layerlens evaluate` — create and run evaluations
* `layerlens traces upload` — ingest a trace JSON
* `layerlens trace-evaluate` — run a trace evaluation
* `layerlens judges create` — create or update a judge
* `layerlens models list` — browse the public catalog
* `layerlens benchmarks list` — browse benchmarks

See the full [CLI reference](/13.1-sdk-and-apis/cli.md).

## Common patterns

### CI gate

```bash
layerlens evaluate --space my-regression-space --fail-on-regression --tolerance 0.01
```

### Trace ingest

```bash
layerlens traces upload./traces.json
```

### Reports

```bash
layerlens evaluations list --since 7d --format json > eval-report.json
```

## Where to next

* [CLI reference](/13.1-sdk-and-apis/cli.md)
* [SDK quickstart](/2.-get-started/sdk.md)
* [Tutorial: Wire CI/CD quality gates](/6.-build-wire-your-code/03-cicd-gates.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.layerlens.ai/13.2-surfaces/cli.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
