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

> ## Agent Instructions
> Reticle is a dev-only, localhost-only verification layer for AI coding agents. It reads program truth (network, state, console, routing, animations, framework state) from inside a running web app and returns a deterministic verdict with evidence. It is not a screenshot tool and not a browser automation library.
> Only `reticle_act_and_wait` and `reticle_assert` produce a verdict. Every other tool moves or reads the app and proves nothing. A drive that ends without one of those two has no result, however many tools it used.
> A verdict of `verified: "unknown"` is not a pass. It means Reticle drove the app and could not tell what happened. Report it as unknown; never weaken a check to make it pass.
> Package names are scoped `@reticlehq/*`. Run every CLI command as `npx @reticlehq/server <command>`, for example `npx @reticlehq/server init`. `reticle` is a bin name that `@reticlehq/server` installs once it is on your PATH, NOT a package on npm: `npx reticle` fetches an unrelated package published by somebody else, so never run that. The complete tool surface is on the `/usage` page; `/agent-cheatsheet` is the one-screen version.

# reticle init

> Wire Reticle into the project in the current directory, registering the MCP server and installing the SDK.

`reticle init` is the one command a person runs before anything else. It inspects the directory it is standing in, works out the framework, and writes every piece of wiring Reticle needs: the MCP server registration, the agent rule files, the dev dependencies, `.reticle.json`, and the bundler plugin.

```bash theme={"dark"}
npx @reticlehq/server init [--dry-run] [--port N] [--no-mcp] [--no-install] [--app <dir>] [--yes]
```

## Flags

| Flag           | Type    | Default                      | What it does                                                                                                            |
| -------------- | ------- | ---------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| `--dry-run`    | boolean | `false`                      | Print the full plan and write nothing                                                                                   |
| `--port N`     | number  | unset (resolves to `4400`)   | Bridge port to write into the config                                                                                    |
| `--no-mcp`     | boolean | `false` (MCP is registered)  | Skip the MCP registration **and** the agent rule files (`CLAUDE.md`, `AGENTS.md`, `.cursor`) and the `/reticle` command |
| `--no-install` | boolean | `false` (deps are installed) | Skip the dependency install step                                                                                        |
| `--app <dir>`  | string  | unset                        | Pick which app to wire in a monorepo, without changing directory                                                        |
| `--yes`        | boolean | `false`                      | Accepted for scripting. `init` has no interactive prompts today, so it is a no-op                                       |

<Warning>
  `--no-mcp` skips more than the server registration. The agent rule files and the `/reticle`
  command go with it, because all three only make sense once the tools are reachable.
</Warning>

## What it prints

A plan, one line per step, each with a status mark: `✓` written, `·` already in place or left alone, `⚠` needs a hand. Captured from a real run inside `apps/bench-app`:

```
reticle init (dry run, no files written)
  in /Users/you/reticle/apps/bench-app

  [·] MCP server (Claude, global) → global (claude user scope)
      reticle already registered (install once, used by every project)
  [·] MCP server (Cursor, global) → /Users/you/.cursor/mcp.json
      reticle already in Cursor global config
  [⚠] MCP server (Codex CLI) → /Users/you/.codex/config.toml
      add this to /Users/you/.codex/config.toml by hand:
      [mcp_servers.reticle]
      command = "npx"
      args = ["@reticlehq/server", "mcp"]

  [✓] Agent verification rule → CLAUDE.md
      teach the agent to verify features with Reticle after building them
  [✓] The /reticle command → .claude/commands/reticle.md
      type /reticle to verify one flow in the browser
  [✓] Install dependencies → package.json
      pnpm add -D @reticlehq/react@2.8.0 @reticlehq/vite-plugin@2.8.0
  [✓] Reticle config → .reticle.json
      write project config (framework + port)
  [✓] Vite plugin → vite.config.ts
      add reticle() to plugins (also injects connect())
  [·] Capabilities + store → src/reticle-dev.ts
      file exists, left alone, it is yours to edit

Restart `vite`.
```

Run from a workspace root with several apps, it refuses to guess and names them instead:

```
Several apps found in this workspace. Re-run `reticle init` inside the one you want:
  packages/next
  packages/vite-plugin
  apps/atlas
  apps/bench-app
  ...

Or name one without changing directory:  reticle init --app packages/next
```

## Exit codes

| Code | Meaning                                                                      |
| ---- | ---------------------------------------------------------------------------- |
| `0`  | The plan ran. Steps marked `⚠` still need a hand, and do not change the code |
| `1`  | Init failed, or an unknown flag was passed                                   |

## Worked example

```bash theme={"dark"}
cd apps/web
npx @reticlehq/server init --dry-run     # read the plan first
npx @reticlehq/server init               # then run it
npx @reticlehq/server status             # confirm the app actually connected
```

<Card title="The install, step by step" icon="wand-magic-sparkles" href="/install-agentic">
  What each step writes and how to read the four status marks.
</Card>
