# Install

For Koi 1.0 alpha. Install the koi CLI with the shell installer, then run koi setup to add the Junji skill to your coding agent and, optionally, yokai. Check with koi doctor; update with koi update.

These instructions are for Koi 1.0 alpha. Earlier versions were installed from a clone with `./install.sh`; see [Migrate from the Koi CLI](/en/docs/koi/cli) if you used the old project-setup `koi` command.

## What you install

One installer puts the `koi` command on your machine. `koi setup` then installs the rest at the same version:

- The Junji skill goes into your coding agent. It is all you need to plan and run phases yourself with `/junji next`. Its board commands are `koi board status` and `koi board move`, so Junji needs `koi` on your `PATH`.
- The optional Yokai helper skill (sensors, tier assessment, sandbox images).
- The optional `yokai` binary, which runs prepared phases unattended. `koi setup` asks before installing it.

`koi doctor` checks all of it, and `koi update` moves everything to a newer release together.

<figure class="diagram" aria-labelledby="dg-install-caption">
<figcaption id="dg-install-caption">One installer, one setup</figcaption>
<div class="diagram-frame" tabindex="0" role="region" aria-labelledby="dg-install-caption">
<svg viewBox="0 0 560 184" width="560" height="184" role="img" aria-labelledby="dg-install-title dg-install-desc">
<title id="dg-install-title">Installing koi</title>
<desc id="dg-install-desc">The koi installer puts the koi binary on your PATH. koi setup then copies the Junji skill into your coding agent and, optionally, installs the yokai binary from the same release. koi doctor checks both.</desc>
<defs><marker id="dg-install-head" viewBox="0 0 8 8" refX="7" refY="4" markerWidth="8" markerHeight="8" markerUnits="userSpaceOnUse" orient="auto-start-reverse"><path class="dg-head" d="M0 0 8 4 0 8z"/></marker></defs>
<rect class="dg-box" x="0" y="24" width="192" height="48" rx="4"/>
<text class="dg-label" x="96" y="48">koi-installer.sh</text>
<path class="dg-line" d="M196 48H220" marker-end="url(#dg-install-head)"/>
<rect class="dg-box" x="224" y="24" width="144" height="48" rx="4"/>
<text class="dg-label" x="296" y="48">koi binary</text>
<path class="dg-line" d="M372 48H396" marker-end="url(#dg-install-head)"/>
<rect class="dg-box is-solid" x="400" y="24" width="160" height="48" rx="4"/>
<text class="dg-label is-reverse" x="480" y="48">koi setup</text>
<path class="dg-line" d="M416 76V96H296V116" marker-end="url(#dg-install-head)"/>
<rect class="dg-box" x="0" y="120" width="192" height="48" rx="4"/>
<text class="dg-label" x="96" y="144">Coding agent</text>
<path class="dg-line" d="M220 144H196" marker-end="url(#dg-install-head)"/>
<rect class="dg-box" x="224" y="120" width="144" height="48" rx="4"/>
<text class="dg-label" x="296" y="144">Junji skill</text>
<rect class="dg-box" x="400" y="120" width="160" height="48" rx="4"/>
<text class="dg-label" x="480" y="144">yokai binary</text>
<path class="dg-line is-dashed" d="M480 76V116" marker-end="url(#dg-install-head)"/>
<text class="dg-note is-start" x="496" y="96">optional</text>
</svg>
</div>
</figure>

## 1. Install a coding agent

Install and sign in to one of the agents Yokai supports: Claude Code, Codex, Cursor CLI or OpenCode. If you only use Junji, any agent that loads skills works; `koi setup` also knows Gemini CLI.

For Yokai, Claude Code and Codex also need Node.js. Yokai starts their ACP adapter (`claude-agent-acp` or `codex-acp`) from your `PATH` if it is installed, and otherwise through `npx -y`. [Yokai commands](/en/docs/yokai/cli#agent-login) lists how each agent signs in.

## 2. Install koi

On macOS or Linux, run the shell installer for this release:

<!-- x-release-please-start-version -->
```bash
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/getkoi/koi/releases/download/v1.0.0-alpha.6/koi-installer.sh | sh
```
<!-- x-release-please-end -->

The installer puts `koi` in `$CARGO_HOME/bin`, which is `~/.cargo/bin` unless you changed it, and ends by telling you to run `koi setup`. Make sure that directory is on your `PATH`.

## 3. Run koi setup

```bash
koi setup
```

The setup finds the coding agents on your machine (Claude Code, Codex, Cursor, OpenCode, Gemini CLI) and asks:

1. Which agents get the Junji skill. Detected agents are preselected.
2. Whether to add the optional Yokai helper skill.
3. Where the skills come from: the `koi-skills.tar.gz` archive of this koi's release (the default, so the skills always match the binary), or `npx skills add getkoi/koi` when Node is installed.
4. Whether to install `yokai` (default yes). It runs the same release's `yokai-installer.sh`, so `yokai` lands next to `koi` at the same version.

Restart your agent, or reload its skills, if it was already open. Type `/junji` in the agent to confirm it sees the skill.

For scripts and CI, accept the defaults without questions: `koi setup --yes`. Choose agents with `--agent claude --agent codex`, skip parts with `--no-helper-skill` or `--no-yokai`, and point at a local archive with `--skills-archive <path>`. Without a terminal, `koi setup` refuses to guess and asks for `--yes`. Setup only installs for agents it detected or that you named: if it finds none (no `~/.claude`, `~/.codex`, `~/.cursor`, `~/.config/opencode` or `~/.gemini`, and no agent program on `PATH`), the wizard still lets you pick, while `koi setup --yes` stops and asks for `--agent`, for example `koi setup --yes --agent claude`.

In Claude Code you can still install the skills as plugins. Junji, Yokai and this site all live in one repository, [getkoi/koi](https://github.com/getkoi/koi), which is also the plugin marketplace:

```text
/plugin marketplace add getkoi/koi
/plugin install junji@getkoi
```

`npx skills add getkoi/koi --skill junji` (or `--skill yokai`) also works for any agent. Junji still needs `koi` for its board commands: when `koi` is missing, the skill stops and shows you the install command above, and edits the board by hand only if you decline.

## 4. Check the setup

```bash
koi doctor
```

It reports the `koi` and `yokai` versions and whether they match, every agent's installed skills and their versions against `koi`, and `PATH` problems such as an older copy shadowing the new one. Inside a Junji project it also shows the board's progress and runs `yokai doctor`, which checks Git, the agent and its adapter, the run files and the gate review. Nothing is changed. Add a sign-in check with:

```bash
yokai doctor --probe
```

In a repository with no Junji run yet, `koi doctor` skips the project checks. Run `/junji begin` in your agent first.

## Updates

```bash
koi update
```

`koi update` installs the newest release of `koi` and `yokai`, the same version for both, and re-copies the skills `koi setup` installed so they match. While Koi is in alpha, beta or release candidate, it follows prereleases. `koi` and `yokai` mention a newer release at most once a day ("koi X available — run `koi update`"); they never update on their own, and stay quiet in CI, headless runs and the sandbox.

## Sandbox mode

Sandbox mode needs nothing extra from you. On the first sandbox launch, Yokai downloads the Linux `yokai` for its own version from the GitHub release, checks its sha256 and caches it. `yokai doctor` shows which copy it will use. See [Sandbox mode](/en/docs/architecture/sandbox#linux-binaries).

## What can go wrong

- `koi: command not found` after the shell installer. Add `~/.cargo/bin` to your `PATH` and open a new terminal.
- The agent does not recognize `/junji`. The skill was installed for a different agent, or the agent was not restarted. `koi doctor` lists where each agent's skills are.
- `koi doctor` says a skill's version differs from `koi`. Run `koi update`, or `koi setup --sync` to re-copy the skills at the current version.
- `yokai doctor --probe` fails for Claude Code or Codex with an adapter error. Install Node.js so `npx` is available, then try again.
- The doctor says the agent is not configured. Sign in through the agent itself, for example `claude auth login` or `/connect` in OpenCode. Yokai has no login of its own.

Next: [First run](/en/docs/koi/quickstart).
