I Put My Muse Agent in My Terminal: Building muse-cli-bridge
Contents
muse-cli-bridge is a small bridge that puts my own personal Muse agent, the one from muse.ai, with its memory and context, in my terminal, inside a complete harness: a tool loop, context loaded from my project, and permission gates I control, in the harness I prefer (OpenCode, Goose, Pi, or Aider). In short: it’s Muse in your terminal leveraging the harness you prefer. The agent can do real work on my computer through that harness, not just chat.
Unofficial project: muse-cli-bridge is not affiliated with, endorsed by, or supported by Meta. Muse is a product of Meta. This bridge is an independent community tool, and it depends on unofficial interfaces that may break at any time.
Muse is my personal agent. It lives at muse.ai, it knows my context, it remembers what I am working on, and I talk to it all day. But my actual work does not happen in a chat window. It happens in a terminal and in an editor, in real projects, with real files.
That gap bugged me. I could chat with my agent about the work, or I could work in my terminal with tools that knew nothing about me. I wanted both at once: my Muse personal assistant in the CLI, with tool calling and full context, working in the harness I prefer.
So I built the piece that was missing.
This is not Muse
Meta already has a terminal product, Muse Code. It is a different thing. Muse does not reach your personal muse.ai agent, the one with your memory and your context.
What I wanted was the assistant itself, not a model with the same name. A raw model API gives you a stateless endpoint that knows nothing about you. My Muse agent is the opposite of that: it has history with me. The question was how to bring that agent to where the work is.
The missing piece was a harness
The harness is the part that did not exist. A harness is the program that sits in your terminal and gives an AI its hands: a tool loop, context loading from your project, and permission gates you control. OpenCode, Goose, Pi, and Aider are all harnesses. They are good at the hands. What they normally plug into is a raw model.
muse-cli-bridge connects the two. Your harness keeps doing its job locally. Your Muse agent does the thinking. The bridge sits between them.
How it works
Everything runs on your one machine. There are three parts:
- The harness (OpenCode by default, also Goose, Pi, or Aider) runs the tool loop on your computer: shell commands, file read/write/edit, search, and process info, all under your permission gates.
- The bridge is a small local shim that listens only on localhost, at
127.0.0.1:8787. It presents an OpenAI-compatible endpoint with a model namedmuse-personal, so any harness that accepts a custom OpenAI-compatible base URL can point at it. - muse-cli (pinned, so the setup is reproducible) holds your Muse login and is the transport. It sends each turn into a real, persistent Muse thread, where your actual personal agent, with its memory and context, reads it and replies.
The flow looks like this:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Your computer muse.ai
┌────────────────────────────┐
│ OpenCode / Goose / Pi / │
│ Aider │
│ (local tools: shell, │
│ files, search, processes) │
└──────┬──────────────▲──────┘
│ requests │ tool calls run locally,
│ │ results go back
▼ │
┌────────────────────────────┐ ┌─────────────────────────┐
│ muse-cli-bridge (shim) │ │ Your personal Muse │
│ 127.0.0.1:8787, model ├─────►│ agent, in a real Muse │
│ muse-personal │ │ thread, with its memory │
└────────────────────────────┘ │ and context │
via muse-cli └─────────────────────────┘
When the agent wants to act instead of answer, it calls a tool. The bridge hands that call to the harness, the harness runs it on your machine and returns the result, and the agent continues from there. The reply streams back token by token, like a normal model response.
One point worth stating plainly: no Tailscale, no VPN, no extra server, no port forwarding. The shim binds to localhost only. The only network connection in the whole setup is muse-cli signing in to muse.ai, the same as using Muse in a browser.
The setup is a prompt
My favorite part: you do not have to do the setup yourself. The repo includes a copy-paste setup prompt, SETUP-PROMPT.md. Hand it to your own Muse agent and it walks the install for you: install the pinned muse-cli, authenticate, install the bridge, start the shim, configure your harness, and verify with a plain reply test and a real tool-call test.
There is something fitting about that. The agent sets up its own bridge into your terminal.
If you would rather do it by hand, the short version is:
1
2
3
4
5
uv tool install muse-cli==0.3.14 # or: pipx install muse-cli==0.3.14
muse-cli auth export # uses your muse.ai browser login
git clone https://github.com/RyanShook/muse-cli-bridge.git
cd muse-cli-bridge && ./install.sh
opencode-muse # or: goose-muse / pi-muse / aider-muse
The full steps, including the security warning about the login cookie file (treat it like a password, because it is one), are in the README.
Honest limits
- It is unofficial, twice over. The bridge is a community project built on muse-cli, an unofficial client that uses reverse-engineered, unversioned internal interfaces of muse.ai. If those interfaces change, this breaks until it is updated. If Meta ships an official API or CLI for personal Muse agents, prefer that.
- It is chat-paced, not API-paced. Every turn is a real message to your agent in a real chat. Expect seconds to first token, not milliseconds.
- One lane. Every harness shares one Muse thread, so run one harness at a time.
- It only works with your own agent, on your own login and your own Muse plan. The bridge and muse-cli are free and open source; the turns run on your existing plan.
Why it was worth building
I did not need another model in my terminal. I have plenty of those. I needed my agent in my terminal: the one that already knows the projects, the context, and how I work, now able to read the files, run the commands, and do the work in the same place I do.
If that sounds useful, the repo is here: github.com/RyanShook/muse-cli-bridge. MIT licensed. Credit where it is due: the bridge stands on muse-cli by nikships, and on the harness projects (OpenCode, Goose, Pi, Aider), each its own independent work.
Resources:
- muse-cli-bridge: https://github.com/RyanShook/muse-cli-bridge
- Setup prompt: https://github.com/RyanShook/muse-cli-bridge/blob/main/SETUP-PROMPT.md
- muse-cli: https://github.com/nikships/muse-cli
- Muse: https://muse.ai
