---
title: "CLI"
description: "The oms command, its subcommands and flags."
url: https://barestate.xyz/docs/reference/cli
---

# CLI

> The oms command, its subcommands and flags.

This page lists everything you can do with the `oms` command outside the terminal app: health checks, toolchain checks, reviews, tasks and headless runs. Use it when you are scripting OMS or need the exact name of a flag.

The package is `@barestate/oms`. You can run it with `npx @barestate/oms`, or as `oms` if you installed it. Bare `oms` starts the terminal app, and `oms --version` prints the installed version, which is 0.1.0 for the first public release.

## Subcommands

| Subcommand | What it does |
|---|---|
| `oms doctor` | Health check. Add `--install` to download Surfpool 1.7.0 |
| `oms toolchain check\|fix` | Compare a project with the pinned toolchain |
| `oms review` | Offline Phase A security review |
| `oms workspace init` | Create a workspace |
| `oms task create` | Create a task from a requirements file |
| `oms run` | Run a task. `--headless` for non-interactive runs |

## `oms doctor`

```sh
oms doctor [--install] [--json] [--programs] [--rpc <url>] [--surfpool-binary <path>]
```

| Flag | What it does |
|---|---|
| `--install` | Downloads Surfpool 1.7.0, verifies the SHA-256, installs it |
| `--json` | Machine-readable output |
| `--programs` | Makes the Anchor check blocking |
| `--rpc <url>` | Also checks that a Surfnet RPC answers `getHealth` |
| `--surfpool-binary <path>` | Use a specific Surfpool binary |

The [quickstart](https://barestate.xyz/docs/quickstart#what-doctor-checks) lists each check and its severity.

## `oms toolchain`

```sh
oms toolchain check|fix [--project <path>] [--apply] [--verify]
```

[Check your toolchain](https://barestate.xyz/docs/guides/check-your-toolchain) explains what each flag does and when to use it.

## `oms run`

```sh
oms run --headless ...
```

By default, a headless run denies host shell commands and has no web tools. The flags and variables below set host approval, web access, the caps and the sandbox mode.

| Flag or variable | What it does |
|---|---|
| `--bounded` | Applies the caps to the whole session |
| `--sandbox docker`, `OMS_SANDBOX=docker` | Docker mode instead of host mode |
| `--host-approval deny` | Default in headless runs. Denies host shell commands |
| `--web` | Headless runs have no web tools unless you pass this |
| `--no-web` | Starts without web tools |

## Defaults

These are the default caps:

| Cap | Default |
|---|---|
| Tokens | 2,000,000 |
| API spend | $5 |
| Time | 30 minutes |
| Output tokens | 32,768 |

A normal launch is interactive and has no idle expiry.

## Platforms

OMS runs on macOS and Linux, and Windows needs WSL 2. You also need Node 22.19.0 or newer and Git.
