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

# CLI reference

> Inlay terminal commands and options for chat, hardware scripts, dashboards, Perforce QAC, benches, the daemon, MCP servers, and skills.

Run these commands in a terminal. For commands you type inside a chat, see [Slash commands](/docs/core-concepts/slash-commands-reference.md). For installation and the terminal UI, see [Use Inlay in the terminal](/docs/cli/overview.md).

| Command | What it does | Details |
| - | - | - |
| `inlay` | Start the terminal UI in the current project. | [Interactive chat](#interactive-chat) |
| `inlay script <file>` | Run a hardware script from `.inlay/hardware/`. | [Hardware scripts](#hardware-scripts) |
| `inlay start daemon` | Start the daemon that handles GitHub and Slack tasks. Benches are replacing it. | [Daemon commands](#daemon-commands) |
| `inlay stop daemon` | Stop the daemon. | [Daemon commands](#daemon-commands) |
| `inlay monitor` | Open the Daemon Monitor. | [Daemon commands](#daemon-commands) |
| `inlay dashboard` | Serve the project's dashboards in a local browser viewer. | [Dashboard viewer](#dashboard-viewer) |
| `inlay qac` | Work with Perforce QAC findings, Validate, and verification evidence. | [Perforce QAC commands](#perforce-qac-commands) |
| `inlay mcp` | Add, list, or remove MCP servers. | [MCP commands](#mcp-commands) |
| `inlay bench` | Set up, share, check, and use benches, and manage their jobs. | [Bench commands](#bench-commands) |
| `inlay service` | Check, restart, or stop the bench service on this machine. | [Service commands](#service-commands) |
| `inlay skill install` | Install a skill from a file, folder, or HTTPS URL. | [Install a skill](#install-a-skill) |
| `inlay logs submit` | Send recent log files to Inlay support. | [Send logs to support](#send-logs-to-support) |
| `inlay connect <url>` | Use a self-hosted Inlay instance. | [Connect to a self-hosted instance](#connect-to-a-self-hosted-instance) |
| `inlay disconnect` | Return to the hosted service. | [Connect to a self-hosted instance](#connect-to-a-self-hosted-instance) |

Environment variables are listed with the commands they affect: the daemon's under [Daemon commands](#daemon-commands), the QAC token under [Perforce QAC commands](#perforce-qac-commands), and `NODE_EXTRA_CA_CERTS` under [Connect to a self-hosted instance](#connect-to-a-self-hosted-instance).

## Interactive chat

```bash theme={"theme":"css-variables"}
inlay
inlay --help
inlay --version
```

Start `inlay` from the firmware project directory.

| Option | Effect |
| - | - |
| `-h`, `--help` | Show the command list. |
| `-v`, `--version` | Print the installed version. |

## Hardware scripts

Run a saved Python hardware script without opening the chat:

```bash theme={"theme":"css-variables"}
inlay script boot_check.py
inlay script cases/uart-drift/soak.py --timeout 120000 --json
```

The script path is relative to `.inlay/hardware/` in the current project.

| Option | Effect |
| - | - |
| `--project-root <path>` | Use a different project directory. |
| `--timeout <ms>` | Set the run timeout. The default is `60000` (one minute). |
| `--description <text>` | Record a short description with the run. |
| `--profile <json>` | Pass a JSON object to the script as its capture profile. Use `@path` to read it from a file. |
| `--json` | Print the final result as JSON on stdout, and send script output to stderr. |
| `--any-path` | Run a script from anywhere on disk. Scripts outside `.inlay/hardware/` skip Inlay's script checks, such as syntax warnings and fix suggestions. |

Without `--profile`, Inlay uses `<script>.profile.json` next to the script, if it exists. See [Hardware scripts](/docs/debug-mode/hardware-scripts.md) for examples and setup.

Script output streams to the terminal. Press `Ctrl+C` to cancel.

If the script needs a Python package that is not installed, Inlay asks before installing it. Runs without an interactive terminal deny the install, and the error tells you to run the command again in a terminal.

| Exit code | Meaning |
| - | - |
| `0` | The script succeeded, or exited normally without printing a result line. |
| `1` | The script failed: it printed `"success": false`, raised an uncaught error, exited nonzero, or timed out. |
| `2` | Usage error, such as a missing script name, an unknown option, or a path outside `.inlay/hardware/`. |

## Daemon commands

```bash theme={"theme":"css-variables"}
inlay start daemon
inlay start daemon --team "Firmware Team" --project "sensor-hub"
inlay monitor
inlay stop daemon
inlay stop daemon --pid 21004
```

Benches are replacing the daemon. To take GitHub and Slack jobs on a machine as a bench instead, run `inlay bench start --jobs`. See [Bench commands](#bench-commands).

`inlay start daemon` starts the daemon in the background and prints its process ID. Without `--team` and `--project`, it handles work for all linked repositories. It uses `INLAY_API_KEY` if set, then a key saved by an earlier start. Otherwise it creates a key from your CLI sign-in, or asks you to paste one, and saves it for later starts. See [Operate the daemon](/docs/headless/daemon.md#start-the-daemon).

| Option | Effect |
| - | - |
| `--team <name>` | Limit work to one team. Use it together with `--project`. Names aren't case-sensitive. |
| `--project <name>` | Limit work to one project. Use it together with `--team`. |
| `--pid <pid>` | With `stop daemon`, stop a specific daemon when several are running. |

| Environment variable | Effect |
| - | - |
| `INLAY_API_KEY` | API token for unattended sign-in. |
| `INLAY_TEAM`, `INLAY_PROJECT` | Same as `--team` and `--project`. Set both. |
| `INLAY_DAEMON_CONCURRENCY` | How many tasks run at once. The default is `4`. |
| `INLAY_GH_PATH` | Absolute path to a GitHub CLI (`gh`) for GitHub work, when the host can't download one. |

To create an API token, open **Settings** in [the Inlay app](/app). Under **Access tokens**, choose **Create token**, enter a **Name**, choose an **Expiration**, and choose **Create token**. Copy the token; it isn't shown again.

`inlay --daemon` runs the daemon in the foreground of the current terminal instead. It uses `INLAY_API_KEY`, or the key saved by an earlier `inlay start daemon`, and accepts `--team` and `--project`. Prefer `inlay start daemon` for guided setup.

`inlay monitor` opens the Daemon Monitor, which shows each running daemon's connection, work, and hardware. See [Operate the daemon](/docs/headless/daemon.md#monitor-work) for its sections and keys, and for troubleshooting.

## Dashboard viewer

```bash theme={"theme":"css-variables"}
inlay dashboard
inlay dashboard motor-bringup
```

Run it from the project directory, then open the local address it prints. Without a name, the page lists every dashboard in `.inlay/dashboards/`. With a name, it opens that dashboard.

The browser viewer shows layout and static content only. Live data and device controls need the Monitor, in VS Code or opened with `/monitor` in the terminal UI. Press `Ctrl+C` to stop the viewer.

## Perforce QAC commands

Work with Perforce QAC results, Perforce Validate, and verification evidence without opening the chat:

```bash theme={"theme":"css-variables"}
inlay qac readiness
inlay qac findings --query "MISRA" --limit 20 --server https://validate.example.com:8080
inlay qac upload --build 1.4.0 --yes --server https://validate.example.com:8080
inlay qac verify --build 1.4.0 --artifact build/app.elf --hil .inlay/qac/hil/<run-id>.json --pack --server https://validate.example.com:8080
```

Run it from the project directory. Each command prints JSON on stdout and sends QAC progress to stderr. Run `inlay qac` without a command to print the usage. For setup and the full workflow, see [Perforce QAC](/docs/integrations/static-analysis.md#perforce-qac).

| Command | What it does |
| - | - |
| `readiness` | Check saved setup evidence and licenses. It doesn't run an analysis. |
| `diagnostics` | Publish the uploaded build's open findings to the editor's **Problems** panel. Needs an uploaded build whose sources still match, and `--server`. |
| `dashboard` | Refresh the local `qac-compliance` dashboard. |
| `findings` | Search Validate findings. Accepts `--query`, `--limit`, `--offset`, and `--build`. |
| `finding <id>` | Show one Validate finding. |
| `builds` | List Validate builds. |
| `report` | Summarize findings along two axes with `--x` and `--y`. Accepts `--query` and `--build`. |
| `diff` | Summarize the finding states for a build relative to the preceding build. Uses the latest build unless you add `--build`. |
| `connect` | Create any missing Validate project and connect the QAC project to it. |
| `upload --build <name>` | Analyze and upload a build to Validate. Add `--ci` for a CI upload and `--tag <tag>` (repeatable) to tag it. |
| `deviation <id>` | Record a deviation for a finding. Requires `--rationale`, `--risk`, and `--verification`, each at least 10 characters. |
| `baseline --build <name>` | Draft or approve a baseline of the build's findings. The build must be the latest one on Validate. Requires `--rationale`. |
| `build --build <name>` | Run `--command` and record digests of the sources and the `--artifact` firmware file. |
| `verify --build <name>` | Run the verification gate with `--artifact` and `--hil`. Add `--coverage <path>` to include coverage, and `--pack` to create an evidence pack. |

`connect`, `upload`, `deviation`, and `baseline` are dry runs. They print the planned change until you add `--yes`.

| Option | Effect |
| - | - |
| `--server <url>` | Allow Inlay to send the Validate token to this server. It must match the origin of **Validate server URL**. Without it, Inlay doesn't send the token. |
| `--project-dir <path>` | Use a different QAC project directory. |
| `--configuration <name>` | Limit the command to a QAC project configuration. `diagnostics`, `dashboard`, `baseline`, and `verify` accept it more than once. `findings`, `finding`, `builds`, `report`, `diff`, and `deviation` use one configuration: the first one you give, or the project's first configuration. |
| `--yes` | Apply a Validate change instead of printing the plan. |

Inlay reads the token from the environment variable named in **Validate token variable**. The default is `QAC_VALIDATE_TOKEN`.

| Exit code | Meaning |
| - | - |
| `0` | The command succeeded. |
| `1` | The command failed, `readiness` found missing setup, or `verify` failed the gate. |
| `2` | Usage error, such as an unknown command, a missing required option, or a `--rationale`, `--risk`, or `--verification` value shorter than 10 characters. |

## MCP commands

```bash theme={"theme":"css-variables"}
inlay mcp add <name> <command-or-url> [options]
inlay mcp list
inlay mcp remove <name> [--scope global|project]
```

Options for `add`:

| Option | Values | Effect |
| - | - | - |
| `-t`, `--transport` | `stdio` (default), `http`, `sse` | How Inlay talks to the server. Use `stdio` for a local program. |
| `-s`, `--scope` | `global` (default), `project` | Save to `~/.inlay/mcp.json` or the project's `.inlay/mcp.json`. |
| `-e`, `--env` | `KEY=VALUE` | Environment variable for a local server. Repeat as needed. |
| `-H`, `--header` | `KEY=VALUE` | Request header for a remote server. Repeat as needed. |

For a local server, everything after the name that is not an option is the command and its arguments:

```bash theme={"theme":"css-variables"}
inlay mcp add my-server npx -y @example/mcp-server
inlay mcp add lab https://lab.example.com/mcp \
  --transport http --scope project \
  --header 'Authorization=Bearer ${LAB_MCP_TOKEN}'
```

Replace the example URL with your server. Inlay replaces `${LAB_MCP_TOKEN}` with the environment variable when it connects. If the server's own arguments include `-t`, `-s`, `-e`, or `-H`, add it in `mcp.json` instead.

`ls` is an alias for `list`, and `rm` is an alias for `remove`. `remove` uses global scope unless you add `--scope project`.

See [Connect MCP servers](/docs/integrations/mcp-servers.md) for setup and tool controls.

## Bench commands

`inlay bridge` is the same command as `inlay bench`. See [Benches](/docs/integrations/benches.md) and [Run jobs on a bench](/docs/headless/bench-jobs.md).

On the bench machine, the machine with the hardware:

```bash theme={"theme":"css-variables"}
inlay bench start [options]
inlay bench doctor
inlay bench jobs <command> [options]
inlay bench code
inlay bench queue [--clear]
inlay bench reclaim --confirm
```

| Command | Effect |
| - | - |
| `start` (`setup`) | Sign in, check the machine, install the bench service, add the bench to your account, and report whether GitHub and Slack requests can reach it. Running it again repairs the bench and keeps its settings. See [Set up a bench](/docs/integrations/benches.md#set-up-a-bench) for its options. |
| `doctor` | Check the bench service, your account, the network, the board, serial access, flashing tools, toolchains, and the Python runtime. |
| `jobs` | Turn jobs `on` or `off`, `pause` them, show `list` or `status`, or change a setting with `set`. See [Turn jobs on](/docs/headless/bench-jobs.md#turn-jobs-on). |
| `code` | Print a code that lasts 15 minutes and an `inlay bench add` line, for a bench that isn't in an account yet. |
| `queue` | List who holds and who waits for each probe or board. `--clear` drops every waiting request. |
| `reclaim --confirm` | Give the bench a new enrollment and print a new code. This disconnects it from its team. Running work finishes first; add `--now` to stop it at once. |

On your computer:

```bash theme={"theme":"css-variables"}
inlay bench list [--team <name>]
inlay bench verify [name]
inlay bench share <name> --team <name> [--yes]
inlay bench unshare <name> [--team <name>]
inlay bench add <code> [--name <name>] [--fp <fingerprint>]
inlay bench exec [--shell] [--timeout <ms>] <name> <command> [args...]
inlay bench watch [name|job-id] [--once]
inlay bench takeover [job] [--bench <name>] [--dir <clone>]
inlay bench remove <name> [--yes]
```

| Command | Effect |
| - | - |
| `list` (`ls`, `status`) | Show your benches, whether each is online, and who can use it. |
| `verify [name]` | Check a bench end to end: connection, serial ports, flashing tools, GDB server, and file transfer. Leave the name out when you have one bench online. |
| `share` | Let everyone on a team use the bench fully, including running any program on it. With jobs on, their GitHub and Slack requests can run on it. |
| `unshare` | Make the bench personal again, or take it out of one team with `--team`. |
| `add` (`claim`) | Add a bench with the code or the whole add line it printed, and choose who can use it. |
| `exec` | Run a command on the bench and stream its output. Put `exec` options before the bench name. Everything after the name goes to the command. |
| `watch` | Follow what the bench's hardware is doing. `--once` prints it once. |
| `takeover` | Stop a bench job at its next stopping point and continue it on your computer, with its branch and conversation. |
| `remove` (`rm`) | Remove the bench for everyone who uses it. |

## Service commands

The bench service runs the bench on this machine. `inlay bench start` installs it.

```bash theme={"theme":"css-variables"}
inlay service status
inlay service restart [--now]
inlay service stop
inlay service start
inlay service logs [--lines <n>] [-f]
inlay service uninstall
```

| Command | Effect |
| - | - |
| `status` | Show the service, the bench, and anything that could stop it, such as sleep or signing out. |
| `restart` | Let running work finish, for up to 30 minutes, then restart. `--now` restarts at once. |
| `stop` | Stop the service now, including running work. |
| `start` | Start the service. |
| `logs` | Show the last 100 lines of the service log. `--lines <n>` shows more, and `-f` follows it. |
| `uninstall` | Stop the service from starting at login. |

## Install a skill

```bash theme={"theme":"css-variables"}
inlay skill install <SKILL.md|folder|https-url> \
  [--user] [--overwrite] [--project-root <path>]
```

| Source | What is installed |
| - | - |
| A `SKILL.md` file | That file. |
| A folder | The folder, which must contain a top-level `SKILL.md`. |
| An HTTPS URL | The `SKILL.md` at that address. A GitHub folder URL installs the whole folder. |

| Option | Effect |
| - | - |
| `--user` | Install into `~/.inlay/skills/` so the skill is available in all your projects. Without it, the skill goes into the project's `.inlay/skills/`. |
| `--overwrite` | Replace an existing skill with the same name. |
| `--project-root <path>` | Install into a different project. |

The skill's `name` in `SKILL.md` must use lowercase letters, digits, and hyphens. See [Skills](/docs/core-concepts/skills.md) for the file format and examples.

## Send logs to support

```bash theme={"theme":"css-variables"}
inlay logs preview
inlay logs submit
echo '{"description": "The daemon stops after sign-in"}' | inlay logs submit
```

`inlay logs preview` lists the recent log files that `inlay logs submit` would send. `inlay logs submit` sends them to Inlay support. Sign in with `inlay` first. To add a note, pass a JSON object with a `description` on standard input.

Both commands print JSON. A successful `submit` prints a `reportId`; give it to [Inlay support](/docs/core-concepts/get-help.md#contact-support). Both exit with `0` on success and `1` on failure.

## Connect to a self-hosted instance

Use these commands when your organization runs its own Inlay instance.

```bash theme={"theme":"css-variables"}
inlay connect inlay.example.internal
inlay disconnect
```

`inlay connect <url>` checks that the instance responds, then points the CLI and the VS Code extension on this machine at it. A bare host name gets `https://` added. The instance must use HTTPS.

On success, the command prints the instance address. Sign in the next time you start Inlay. Sign-ins for different instances are kept separate. Links to the web app open on the connected instance.

| Exit code | Meaning |
| - | - |
| `0` | Connected. |
| `1` | The instance did not respond correctly. The message says what failed. |
| `2` | The URL is missing, invalid, or not HTTPS. |

> [!NOTE]
>
> If the instance uses a certificate from an internal certificate authority, set `NODE_EXTRA_CA_CERTS` to that CA bundle before you run `inlay connect`.

`inlay disconnect` returns this machine to the hosted service. It prints the instance it disconnected from, or reports that none was connected.


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