# Installing the CLI (https://docs.vitrinka.ai/dev/cli/install)



## Install [#install]

`vitrinka setup` builds one plan — sign in, agent plugins + MCP, this repository, the index, agent hooks — ticks what is already done and applies the rest after one review (Enter). While it applies, the machine-wide extras no flag answered — the journey-recorder extension, the ACP adapters `work listen` hosts, a default workspace, your operator name — are still asked one by one.

```bash
npm i -g @vitrinka/cli
vitrinka setup
```

Setup also wires the work loop: SessionStart, SessionEnd, Stop and PreToolUse hooks for Claude Code (and Codex's `hooks.json` — trust them once with `/hooks`), which bind a session to its task and cue ripe todos, and a per-repository git `prepare-commit-msg` hook that adds the `Vitrinka-Task` trailer (a foreign hook is chained, never replaced) — [hooks and commit trailers](/dev/cli/setup#hooks), [session hooks](/pm/work-loop#hooks).

## Install flags [#flags]

| Flag                             | What it does                                                                                                                                                                                |
| -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--yes`                          | Accept the proposed plan. Off a terminal it applies straight away (on one, the review screen still shows); the extras no flag pre-answers are skipped with their manual command printed.    |
| `--no-input`                     | Never prompt (also `VITRINKA_NO_INPUT=1` or `CI`); a plan that needs consent exits 5.                                                                                                       |
| `--local`                        | Project scope: no shim or completion, harness project files only, no Claude Code or Codex registry writes (both are global).                                                                |
| `--mcp` / `--no-mcp`             | Register or skip the MCP endpoints without asking.                                                                                                                                          |
| `--harness`                      | Harness project files to render: `claude,codex,cursor,opencode,vscode,gemini` or `all` (default: Claude Code plus every harness detected) — [MCP for any client](/dev/mcp/clients#install). |
| `--no-acp`                       | Skip the ACP adapters `work listen` hosts.                                                                                                                                                  |
| `--extension` / `--no-extension` | Install or skip the journey-recorder extension.                                                                                                                                             |
| `--no-completion`                | Skip shell completion.                                                                                                                                                                      |
| `--operator`                     | Set the board-attribution operator persona.                                                                                                                                                 |
| `--project`                      | Project name. Default: the project that declares this origin, else the repository name.                                                                                                     |
| `--advanced`                     | Show the index noise table, the directory picker and the exact manifest.                                                                                                                    |
| `--runners` / `--check`          | Declare where the repo's test runners write results (`runners[]` in `vitrinka.config.json`) — only that step runs; with `--check` it reports drift, writes nothing and exits 1 on drift.    |
| `--base`                         | Deployment URL — overrides `$VITRINKA_URL` and the stored default.                                                                                                                          |

<Callout type="warn">
  Without a terminal (a pipe, `--no-input`, `CI`) and without `--yes`, setup applies nothing: it exits 5 with the plan in the `--json` envelope and the `--yes` rerun in `next[]`. A machine that is not signed in exits 4 and points at `vitrinka auth login`, even with `--yes`.
</Callout>

## Check and repair [#check]

Three verbs keep a machine healthy after the first run.

```bash
vitrinka doctor
vitrinka update            # CLI + every installed surface
vitrinka setup uninstall   # remove everything setup put here
```

### doctor [#doctor]

Reports what this machine and this repository can and cannot do, and why. Each failing check names the exact command that repairs it, rather than telling you something is wrong and leaving you to find out what.

```bash
vitrinka doctor
vitrinka doctor --fix   # review the repairs, apply after one confirm
vitrinka doctor --all   # also every other checkout registered on this machine
```

<Callout type="warn">
  Plain `doctor` never prompts and never touches your token or operator persona. `doctor --fix` shows a target · before · after plan and applies it after one confirm (`--yes` in scripts); `--all` also checks every other checkout registered on this machine.
</Callout>

### update and uninstall [#update]

`update` refreshes the CLI through whichever channel installed it — package manager, git checkout or release artifact — and then the agent plugins. What changed in each release: the [CLI changelog](/reference/changelog).

```bash
vitrinka update
vitrinka setup uninstall --yes
vitrinka setup uninstall --purge --yes   # also removes token + operator
```

* **`update` never asks new consent questions** — that is `setup`'s job.
* **`uninstall` leaves credentials alone** — the token and operator persona survive unless you pass `--purge` — credentials are not installation.
* **`--local`** — project scope for `setup`: no shim or shell completion, harness project files only (Cursor, OpenCode, VS Code, Gemini), and no Claude Code or Codex registry writes, since both are global.
