Quickstart
Install Mate, link a companion, and launch OpenCode.
Mate uses two repositories:
- companion repository: stores Mate configuration, skills, and capability output
- working repository: stores the project code agents should edit
Install the published CLI once:
npm install -g @uniqbit/mateThen use this default flow in the repository you want an agent to edit:
mate install
mate companion link
mate opencode- Install
npm install -g @uniqbit/matemate installOnce per machine, then in the working repository.
- Link
mate companion linkPick or clone a companion and install what it selects.
- Launch
mate claudemate opencodeStart an agent with the companion context wired in.
Every launch runs
- 1Resolve
Find the companion linked to this working repository.
- 2Sync
Copy companion instructions, skills, and capabilities into place.
- 3Index
Refresh enabled code indexes such as TokenSave and Graphify.
- 4Launch
Start Claude Code or OpenCode in the working repository.
1. Install Mate Requirements
Move to the working repository and initialize Mate’s core requirements:
cd /path/to/working-repo
mate installThe first install does not require a companion. It verifies Mate’s core runtime and records the installation state for the current environment.
2. Link A Companion
From the same working repository, run:
mate companion linkMate opens the TUI flow. Use it to select an existing companion, paste a local companion path, or clone one from Git. A cloned companion is configured when necessary. No companion yet? See Create A Companion.
The link is stored in the working repository’s local .mate registry. Mate
also adds that directory to Git’s local exclude file so the link metadata is
not committed to the working repository. Linking also verifies and installs the
requirements selected by the companion, so no second mate install is needed.
3. Launch OpenCode
Start OpenCode:
mate opencodeIf the companion’s allowed agents include Claude, you can launch it instead:
mate claudeMate resolves the linked project, syncs the companion instructions and capabilities, refreshes enabled indexes, then launches the selected agent in the working repository context.
mate opencode also wraps the working repository for OpenCode: it writes Mate’s
regions into .opencode/opencode.json and copies the companion’s .opencode/
files as git-excluded files. After that, plain opencode in the repository
loads the companion as well. See Wrapping.
Run mate install again after updating Mate or changing a companion’s selected
package managers or capabilities. Any mate run also refreshes
~/.mate/runtime/, which wrapped repositories load Mate through.
See Capabilities for the optional tools Mate can wire into the flow.