Install
Every install path for the Sightmap toolchain. Pick the one that matches your role.
Packages
Section titled “Packages”| Package | Install | What it gives you |
|---|---|---|
@sightmap/sightmap | pnpm add -D @sightmap/sightmap | Core library + sightmap CLI. Parse, validate, merge, match, explain, lint. |
@sightmap/react | pnpm add @sightmap/react @sightmap/sightmap | React Router 7 adapter. <SightmapProvider>, Vite plugin, sightmap-react CLI. |
@sightmap/mcp | pnpm add -D @sightmap/mcp | MCP server with browser tools and curation tools. Wraps @playwright/mcp. |
@sightmap/plugin | symlink — see below | Claude Code plugin (advisory hooks). Marketplace install in WI-3. |
@sightmap/sightmap is a peer dep of @sightmap/react — install it alongside.
CLI bins
Section titled “CLI bins”The packages ship two CLIs:
| Bin | Ships in | Commands |
|---|---|---|
sightmap | @sightmap/sightmap | validate, lint, check, match, explain, check-conventions |
sightmap-react | @sightmap/react | gen, gen --check, gen --diff, validate |
All commands accept --json for machine-readable output and --cwd <dir> to run from outside the project. See CLI reference for the full command list.
Claude Code plugin
Section titled “Claude Code plugin”The plugin will ship as a marketplace listing in WI-3. For local development:
git clone https://github.com/sightmap/sightmap-jscd sightmap-js/packages/pluginmkdir -p ~/.claude/plugins/sightmapln -sf "$(pwd)/bin" ~/.claude/plugins/sightmap/binln -sf "$(pwd)/hooks" ~/.claude/plugins/sightmap/hooksThen add sightmap to your ~/.claude/settings.json enabledPlugins.
The hook scripts shell out to npx --no-install sightmap by default. Override with SIGHTMAP_BIN if you need a pinned binary path.
Editor schema validation
Section titled “Editor schema validation”Add this header to your .sightmap/ YAML files for in-editor validation in VS Code (yaml-language-server):
# yaml-language-server: $schema=https://raw.githubusercontent.com/sightmap/spec/main/spec/v1/sightmap.schema.jsonRequirements
Section titled “Requirements”- Node 20+
- pnpm 10+ (or npm / yarn — pnpm is what we test against)
- TypeScript ~5.7 if you’re consuming the library types
- Quickstart (React) —
@sightmap/reactend to end. - Quickstart (agent-authored) —
@sightmap/mcpor the Claude Code plugin. - Authoring overview — once everything is installed.