# CLI Reference

The `seed-agent` CLI provides the package-consumption surface for SEED Harness:
`install`, `doctor`, and `run`.

Current runtime support is Linux only. The npm package and CLI guard reject
Windows and macOS for this release.

## Commands

| Command | Purpose |
| --- | --- |
| `install` | Register the plugin in OpenCode config and create SEED config |
| `doctor` | Check OpenCode, plugin registration, SEED config, provider visibility, and optionally agents |
| `run <message>` | Execute `opencode run --command seed` with Lab-Representative by default |
| `version` | Print package version |

## install

```bash
seed-agent install
seed-agent install --local --project
seed-agent install --plugin @seed-lab/opencode-seed-agent
```

Options:

- `--local`: register the current package root as a file plugin.
- `--project`: write `.opencode/opencode.jsonc` and `.opencode/seed-agent.jsonc` in the current repository.
- `--config <path>`: override the OpenCode config path.
- `--seed-config <path>`: override the SEED config path.
- `--plugin <spec>`: register a specific OpenCode plugin spec.
- `--model <provider/model>`: optional pin that writes the same explicit model
  into every generated SEED model profile. Omit this to inherit OpenCode's
  selected model at runtime.
- `--variant <name>`: optional variant paired with `--model`.
- `--provider <name>`: optional login-hint compatibility flag. It does not
  create or pin a SEED model by itself.
- `--skip-auth`: do not print provider login guidance.
- `--dry-run`: compute the install result without writing files.
- `--json`: print machine-readable output.

## doctor

```bash
seed-agent doctor
seed-agent doctor --project --agents
seed-agent doctor --json
```

`doctor` never prints API keys. It only checks whether OpenCode reports provider availability.
It also checks OpenCode CLI compatibility and fails when the installed CLI is
older than the supported minimum, currently `>=1.15.6`.

Options:

- `--project`: inspect current project `.opencode` config instead of user config.
- `--agents`: also run `opencode agent list` and check that SEED agents are visible.
- `--config <path>`: override the OpenCode config path.
- `--seed-config <path>`: override the SEED config path.
- `--directory <path>`: run checks from a specific working directory.
- `--json`: print machine-readable output.

## run

```bash
seed-agent run "Implement the professor goal."
seed-agent run --model anthropic/claude-sonnet-4-5 --variant high "Implement the professor goal."
seed-agent run --agent lab-representative --model openai/gpt-5.4 --variant medium "Run the smoke test."
```

`run` builds this OpenCode command:

```bash
opencode run --command seed --agent lab-representative --model <provider/model> --variant <name> "..."
```

Options:

- `-a, --agent <name>`: agent to use. Default: `lab-representative`, the primary id for Lab-Representative.
- `-m, --model <provider/model>`: optional OpenCode model, for example
  `anthropic/claude-sonnet-4-5` or `openai/gpt-5.4`. If omitted, OpenCode's
  selected/default model applies.
- `--variant <name>`: model variant, for example `high` or `medium`.
- `-d, --directory <path>`: run in another project directory.
- `--json`: pass `--format json` to OpenCode.
- `--`: pass remaining args through to `opencode run`.
