Get started
For agents
Claude Code, Cursor, Codex and the shadcn CLI can read Ochre directly: the registry, a Markdown file per component and an llms.txt. They sign in with a token you create.
1. Create a token
Tokens act as you, so keep them out of your repository. Make one per machine or tool from your account page, and revoke any you stop using.
OCHRE_TOKEN=ochre_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
2. Add the @ochre registry
Add Ochre to components.json as a namespaced registry. The CLI swaps in ${OCHRE_TOKEN} from your environment and sends it with every request.
{
"registries": {
"@ochre": {
"url": "http://localhost:3800/r/{name}.json",
"headers": { "Authorization": "Bearer ${OCHRE_TOKEN}" }
}
}
}
Now you, or your agent, can add any component. Its Ochre imports and the theme come with it:
npx shadcn@latest add @ochre/modal @ochre/table @ochre/dropdown-menu
shadcn MCP server
shadcn's MCP server reads the same registries from components.json, so an agent can browse, search and install Ochre components by name. Set it up for Claude Code with:
npx shadcn@latest mcp init --client claude
Markdown and llms.txt
Every component has a Markdown version with its guidance, props, React, Vue and HTML code and examples. Agents that fetch pages can use it with the same token. Each component page also has a Copy as Markdown button for pasting into a chat.
curl -H "Authorization: Bearer $OCHRE_TOKEN" http://localhost:3800/r/modal.md
curl -H "Authorization: Bearer $OCHRE_TOKEN" http://localhost:3800/llms-full.txt
3. Tell your agent the rules
Paste this into your project's AGENTS.md or CLAUDE.md so generated screens stay on the system:
## UI: Ochre
- Build UI from Ochre components in components/ochre. Add missing ones with `npx shadcn@latest add @ochre/<name>`.
- Read http://localhost:3800/llms.txt for the list; fetch http://localhost:3800/r/<name>.md (Authorization: Bearer $OCHRE_TOKEN) before using a component.
- Colours only through Ochre tokens (bg-surface-card, text-text-muted, border-border-default). No hex, no default Tailwind palette, no dark: colour overrides.
- One Primary (orange) button per view. Flat only: no gradients, glass or glows.
- Controls on one ladder: S 32, M 40 (desktop), L 48 (touch), XL 56, XXL 64.
- Trays only for floating UI (menus, dialogs, toasts, panels); page content is a flat card with a hairline.
- Sentence case. Mono capitals only for ids, counts, times and metadata labels.
The full system for agents, with every token and component, ships with your Figma download as ochre.md. See also Foundations.