Documentation
Connect OpenCode, Codex or Claude Code
Connect OpenCode, Codex or Claude Code and understand what they receive.
Cadralia works with OpenCode, Codex and Claude Code. The local connector is the same for all three: it connects the extension to your agent, on your machine.
Choose an agent
| Agent | How to connect it | What to know |
|---|---|---|
| OpenCode | add the cadralia-bridge/opencode plugin, then restart | the structure appears in the open session |
| Codex | start the connector in the project folder | keep the connector terminal open |
| Claude Code | install the hooks once | the connector starts on its own at the first message |
You can change agents later. The connector, the extension and your account do not change.
OpenCode
Add the plugin to ~/.config/opencode/opencode.jsonc:
{
"$schema": "https://opencode.ai/config.json",
"plugins": ["cadralia-bridge/opencode"]
}
Restart OpenCode. The connector runs in the same process: the delivery appears immediately in the open session.
Codex
cadralia-bridge --agent codex --project /absolute/path/to/project
The connector reads the project sessions and resumes the one you choose. The turn is added to the session and the agent works in the background. Keep the terminal open.
Claude Code
cadralia-bridge install claude-code
The command runs once. The connector starts at the first message and injects the delivery into the session. If Claude Code is not available at that moment, the delivery waits for your next message.
What your agent receives
Your agent receives five things:
- the selected area, as an image;
- the complete hierarchical description: sections, components, layouts, colors, typography, spacing, states and open questions;
- the implementation handoff: tokens, typography and color mappings, components to reuse or create, rules and verification checklist;
- your instruction;
- the visual reference: the lossless crop, its geometry and a command that compares the agent's own render with that crop.
The tree is always written in English. The handoff follows the language of your instruction, with English as the default.
It does not have to guess the layout. It starts from the real structure.
Check and reference
Two capabilities go beyond the delivery, without consuming an extraction:
- Check the render: your agent compares its page with the reference crop;
- Act on a detail: you reference an element or a region on any page and give an instruction.
Both are independent. You can deliver without ever using them.
Your data
The connector stays on your computer. It receives no model key and does not know your Cadralia account. It only accepts requests from your browser.
If it does not work
- No agent detected: check that the connector is running, then click Refresh.
- OpenCode does not load the plugin: check
cadralia-bridge/opencodein~/.config/opencode/opencode.jsonc, then restart OpenCode. - No session: send a first message in the agent. An empty window does not create a session.
- Delivery pending with Claude Code: it will go out at your next message.
- The panel does not respond: restart the connector, then refresh the panel.
Need more details? See Troubleshooting.