> ## Documentation Index
> Fetch the complete documentation index at: https://empirical.run/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# CLI

> Install the empirical command line tool, sign in, and set up the agent skill for Claude Code, Codex and other coding agents

The `empirical` CLI lets you, or the coding agents on your machine, work with Empirical from the
terminal: start agent sessions, clone the test repository, call the API and read the KV store.

## Install

Run the installer:

```sh theme={null}
curl -fsSL https://cli.empirical.run/install | sh
```

The installer adds `~/.empirical/bin` to your shell `PATH`. If a new terminal can't find `empirical`,
add it to your shell profile:

```sh theme={null}
export PATH="$HOME/.empirical/bin:$PATH"
```

Check the installed version with `empirical version`, and upgrade with `empirical upgrade`.

## Sign in

Sign in with your Empirical account. The CLI opens a browser to authorize:

```sh theme={null}
empirical login
```

On a machine without a browser, such as an SSH session, run `empirical login --no-browser` and paste
the code shown after you authorize.

To check that it worked, list the projects you can access:

```sh theme={null}
empirical whoami
empirical projects
```

If you can access more than one project, add `--project <slug>` to commands that act on a project.

## Set up the agent skill

The Empirical skill teaches coding agents such as Claude Code and Codex how to use the `empirical`
command. The installer offers to set it up. To install it yourself, pass exactly one of `--global` or
`--project`:

```sh theme={null}
empirical skill install --global
```

`--global` installs into your global agent directories (`~/.claude` and `~/.agents`). `--project`
installs into the current project at `.agents/skills`.

The CLI manages `SKILL.md` and overwrites it on every install and upgrade. To customize the skill for
your project, add a `CUSTOM.md` file in the same directory. The skill tells agents to read it, and the
CLI never changes it.

## Common tasks

| To | Run | Guide |
| - | - | - |
| Start an agent session and wait for its answer | `empirical session --execute "<prompt>"` | [Tasks](https://empirical.run/docs/platform/tasks.md) |
| Clone the test repository | `empirical clone` | [Test repository](https://empirical.run/docs/platform/repository) |
| Trigger a test run | `empirical api api/test-runs --method PUT --field environment=production` | [Ad-hoc runs](https://empirical.run/docs/triggers/ad-hoc.md) |
| Read or write the KV store | `empirical kv get <key>` | [KV store](https://empirical.run/docs/features/kv-store.md) |
| Call any API endpoint | `empirical api <endpoint>` | [API reference](https://empirical.run/docs/api-reference/introduction.md) |

Run `empirical --help` to list every command, and `empirical <command> --help` for its arguments, options and examples.

## Telemetry

The CLI sends usage telemetry to help improve the product. To opt out, set the
[`DO_NOT_TRACK`](https://consoledonottrack.com/) environment variable.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.