mate
Getting Started

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/mate

Then use this default flow in the repository you want an agent to edit:

mate install
mate companion link
mate opencode
  1. Install
    npm install -g @uniqbit/matemate install

    Once per machine, then in the working repository.

  2. Link
    mate companion link

    Pick or clone a companion and install what it selects.

  3. Launch
    mate claudemate opencode

    Start an agent with the companion context wired in.

Every launch runs

  1. 1Resolve

    Find the companion linked to this working repository.

  2. 2Sync

    Copy companion instructions, skills, and capabilities into place.

  3. 3Index

    Refresh enabled code indexes such as TokenSave and Graphify.

  4. 4Launch

    Start Claude Code or OpenCode in the working repository.

Install once, link a companion, then launch from the working repository

1. Install Mate Requirements

Move to the working repository and initialize Mate’s core requirements:

cd /path/to/working-repo
mate install

The first install does not require a companion. It verifies Mate’s core runtime and records the installation state for the current environment.

From the same working repository, run:

mate companion link

Mate 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 opencode

If the companion’s allowed agents include Claude, you can launch it instead:

mate claude

Mate 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.