> ## 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 verification layer for AI coding agents. Its SDK runs in development builds, and in staging or production only through the signed activate loader (see /production-mode). 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. For a desktop application, the computer realm (`@reticlehq/computer`) reads the app through the accessibility tree of the operating system on macOS, Windows and Linux (X11), with no SDK; an agent can use it for a check or for any other task in the app.
> Verdicts come from `reticle_act_and_wait`, `reticle_assert`, `reticle_act { steps }` when a step declares `expect`, and `reticle_verify` (`change`/`flows`). Everything else moves or reads the app and proves nothing. Only `verified: "yes"` is a pass: `unknown` means Reticle could not tell, and `no-fault` means nothing was declared to prove. A drive that ends without a verdict has no result, however many tools it used. 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.

# @reticlehq/init

> The project scaffolder behind reticle init. It detects the framework, writes the files, and registers the MCP server. It runs at build time and has no runtime.

`@reticlehq/init` is the code behind `reticle init`. It detects the framework and the package manager, writes `.reticle.json`, patches the build config, writes the connect snippet and the agent rules, and registers the MCP server with the agents on the machine.

**Apache 2.0. Depends on [`@reticlehq/core`](https://docs.reticle.sh/packages/core) only.**

## Why it is a separate package

Nothing in it observes a running app. It runs once, at build time. It writes files and runs the package manager. It never opens a socket and imports nothing from `@reticlehq/server`. The version it stamps, the tracer, the outcome reporter and the pairing token come in through one injected `InitHost`.

## Exports

One entry point. The module layout inside the package is not a contract.

| Export | What it is |
| - | - |
| `runInit`, `InitIo`, `InitOptions`, `InitResult` | Run `init` with the IO you give it. |
| `buildNodeIo`, `probeCli`, `InitHost`, `SILENT_HOST` | The Node IO, and the host that the daemon gives to `init`. |
| `detectPackageManager`, `Framework`, `PackageManager`, `installCommandParts`, `parseMajor` | Detect the framework and the package manager. |
| `findWorkspaceApps`, `enclosingWorkspaceRoot`, `workspacePackageDirs`, `isWebApp` | Find the apps of a monorepo. |
| `DEV_SERVER_PORTS`, `frameworkDevPort`, `isLikelyDevServerPort`, `devServerPortWarning` | The dev server ports of each framework. |
| `diagnoseDesktop`, `isDesktopProject`, `desktopLaunch` | Detect an Electron or Tauri project, and how to start it. |
| `diagnoseWebCsp`, `diagnoseObservedWebCsp`, `resolveWebCspFindings`, `webCspOptionsFor` | Find a Content Security Policy that blocks the SDK. |
| `connectArg`, `reticleConfigContent`, `withStaticSnippet` | The connect snippet and the config file. |
| `McpClient`, `MCP_CLIENTS`, `mergeClientConfig`, `detectMcpClients`, `serverInvocation` | Register the MCP server with each agent. `reticle setup mcp` uses them too. |
| `installPromptHook`, `uninstallPromptHook`, `promptHookInstalled`, `PROMPT_HOOK_AGENTS` | The prompt-capture hook, for `reticle hook install`, `uninstall` and `status`. |
| `RETICLE_VERSION`, `RETICLE_NPM_PACKAGE`, `InitFailure`, `NodePlatform` | The version, the package name, the failure reasons and the platform names. |

## Do you install it?

No. `@reticlehq/server` depends on it at the same version, and the `reticle` CLI runs it. Run it with:

```bash theme={"dark"}
npx @reticlehq/server init
```

See [`reticle init`](https://docs.reticle.sh/cli/init).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.