matrix-bridge-plugin
A self-hosted Matrix bridge for AI coding CLIs. It mirrors each coding
session into a room on your own Matrix homeserver, so you can watch progress
and chat back — from your phone, a tablet, or any Matrix client — while the
agent keeps working on your machine.
One plugin, matrix-bridge-plugin, installed on each harness from the same
marketplace entry, with three framework variants as packages in this repo:
- claude-code-matrix — for Claude Code
- codex-matrix — for Codex CLI
- antigravity-matrix — for Google Antigravity CLI
They share a common core (matrix-bridge-common) and behave the same way:
one Matrix room per session, named repo/branch, with a per-machine colored
avatar so you can tell rooms apart at a glance.
What it does
- Session rooms. Each coding session gets its own Matrix room, named after
the repo and branch. Assistant messages, tool activity, and completion
notifications are forwarded to the room in near real time.
- Chat from your phone. Reply in the room from any Matrix client. Your reply
is injected into the running CLI via tmux, exactly as if you had typed it
at the terminal — so you can steer or answer prompts without being at your
desk.
- Per-machine identity. Every machine gets a distinct avatar color + letter
and a framework badge, so a room list spanning several machines stays
readable.
- Optional voice. When enabled, the plugin tags the final assistant message
of each turn with
cc.tts. A separate server-side service (see below) turns
that into spoken audio in the room, and transcribes voice notes you send back.
The plugin itself does no audio processing.
Architecture
┌─────────────────────────────┐ ┌──────────────────────┐
│ your machine │ │ Matrix homeserver │
│ │ │ (Conduit family) │
│ Claude Code / Codex / │ events │ │
│ Antigravity ├────────►│ session room │
│ │ hooks + daemon │ │ (repo/branch) │
│ │ │◄────────┤ │
│ ▼ tmux inject │ replies │ │
│ matrix-bridge-plugin │ └───────┬──────────────┘
└─────────────────────────────┘ │ cc.tts tag
▼
┌──────────────────────────────┐
│ matrix-voicehub (optional) │
│ Matrix appservice: TTS out, │
│ STT in │
└───────────────┬───────────────┘
│ HTTP
▼
┌──────────────────────────────┐
│ voice-server (optional) │
│ OpenAI-compatible TTS/STT │
└──────────────────────────────┘
Outbound: hooks in each CLI push session events to a small daemon, which posts
them to the room. Inbound: the daemon watches the room and injects your replies
into the CLI's tmux pane.
The three companion repos
Voice is fully optional and lives in two separate projects, so you can run the
text bridge alone or add spoken voice later:
| Repo | Role |
|---|
| matrix-bridge-plugin (this repo) | The CLI plugin. Session rooms, tmux injection, and cc.tts tagging. Runs on your machine(s). |
| matrix-voicehub | Optional Matrix appservice. Watches for the plugin's cc.tts-tagged messages and posts synthesized audio; transcribes inbound voice notes and re-posts them as text. Runs on/near your homeserver. |
| voice-server | Optional OpenAI-compatible TTS/STT HTTP service that voicehub calls to do the actual synthesis and transcription. |
If you don't deploy voicehub + voice-server, everything text still works; the
cc.tts tag is simply ignored.
Install
The plugin is distributed through this repo's plugin marketplace. Both
harnesses read the same manifest, so install it on each one you use. Claude
Code:
/plugin marketplace add nickfujita/matrix-bridge-plugin
/plugin install matrix-bridge-plugin
Codex:
codex plugin marketplace add nickfujita/matrix-bridge-plugin
codex plugin add matrix-bridge-plugin@matrix-bridge-plugin
Each harness has its own manifest in this repo — .claude-plugin/ for Claude
Code, .agents/plugins/marketplace.json and .codex-plugin/ for Codex — both
pointing at the repo root, so the same hooks/, skills/, and packages ship
to both. Each harness keeps its own copy under its plugin cache and runs its
own daemon from it. Then configure it: