VS Code / Cursor sidebar chat that drives Meta’s Muse Code CLI (muse exec --json). The agent harness stays Muse; this extension is only the IDE UI.
Not affiliated with Meta. Muse Code, Muse Spark, and related marks belong to Meta. Install and authenticate Muse separately: Muse Code docs.
Privacy and security: PRIVACY.md · SECURITY.md
- macOS or Linux (Muse Code CLI does not support Windows yet)
- Muse Code installed and signed in (or
META_API_KEYset) - VS Code or Cursor
- An open workspace folder that is not a symlink root (Muse rejects reparse points)
curl -fsSL https://dev.meta.ai/install.sh | sh
muse login
# or: export META_API_KEY=... # must be visible to the editor processThe sidebar treats Muse as ready only when the CLI is present and credentials are visible (META_API_KEY in the editor env, ~/.config/muse/auth.json with an inline key/token or a Keychain-backed muse login, or muse.useEchoProvider). A key set only in your terminal shell does not reach Cursor/VS Code unless you launch the app from that shell or set it in the GUI environment.
After this extension is on a marketplace:
- VS Code Marketplace: search “Muse CLI Chat” (publisher
codemarc) - Open VSX / Cursor: same extension id
codemarc.muse-cli-chat
Or install a local .vsix:
git clone https://github.com/codemarc/muse-code.git
cd muse-code
bun install
bun run package
code --install-extension muse-cli-chat-0.1.8.vsix
# Cursor: cursor --install-extension muse-cli-chat-0.1.8.vsixgit clone https://github.com/codemarc/muse-code.git
cd muse-code
bun install
bun run compileOpen this folder in VS Code/Cursor and press F5 (Run Muse CLI Chat Extension). That runs bun run compile first (Bun must be on your PATH). Optional: Run Muse CLI Chat Extension (watch) for bun run watch. In the Extension Development Host:
- Open a real directory (not a symlink)
- Command Palette → Muse CLI Chat: Open Chat (or click the Muse activity icon)
- Optional: set
muse.useEchoProvidertotruefor offline JSONL UI testing - Send a prompt (⌘Enter on macOS, Ctrl+Enter on Linux, or the Send button). Enter inserts a newline. Type
@to attach a file with contents, or + Attach for the current file, open editors, Problems, or terminal output.
| Command | Action |
|---|---|
| Muse CLI Chat: Open Chat | Open the configured native chat surface |
| Muse CLI Chat: Open in Editor Panel | Open the native chat in an editor panel (default shortcut ⌘⇧R on macOS, Ctrl+Shift+R on Linux; rebind in Keyboard Shortcuts) |
| Muse CLI Chat: Open in Sidebar | Open the native chat in the sidebar |
| Muse CLI Chat: Open in New Window | Reopen the current workspace with Muse ready |
| Muse CLI Chat: Send Selection | Send the editor selection as context |
| Muse CLI Chat: New Session | New --session-id |
| Muse CLI Chat: Stop | SIGINT the running muse exec |
| Muse CLI Chat: Open Interactive Terminal | Full Muse TUI (approvals, slash commands) |
| Muse CLI Chat: Copy Session and Open Muse.ai | Copy the current session as markdown, then open muse.ai |
| Muse CLI Chat: Open Website | Muse Code product page |
| Muse CLI Chat: Open Billing | Meta AI billing |
| Muse CLI Chat: Check Installation | muse --version |
| Muse CLI Chat: Select Workspace Folder | Pick which root to use (multi-root) |
| Muse CLI Chat: Resume Session | Pick a retained Muse --session-id for this folder and reload history |
| Muse CLI Chat: Clean Up Sessions | Multi-select delete of old Muse sessions for this folder (local index + logs) |
| Muse CLI Chat: Open Last Tool Result in Canvas | Reveal the canvas panel with the last opened tool result |
| Setting | Default | Notes |
|---|---|---|
executablePath |
muse |
"muse" on PATH, or absolute path to the binary (application-scoped) |
model |
empty | Optional --model |
reasoningEffort |
empty | Optional --reasoning-effort |
trustWorkspace |
true |
Loads project skills/rules |
disableApproval |
false |
First send prompts to enable for headless (application-scoped) |
yolo |
false |
Disables approval and sandbox (dangerous, application-scoped) |
useEchoProvider |
false |
Offline UI smoke tests |
extraArgs |
[] |
Extra argv; --yolo / --disable-sandbox blocked (application-scoped) |
toolOutputFormat |
readable |
Default tool result view: readable (terminal-style for exec) or json (raw payload). Each card can toggle. |
toolDisplay |
compact |
Initial tool-card disclosure: minimal shows dense static one-liners (silent runs collapse to a working pulse), compact folds all results, balanced opens only short results, and detailed opens all results. |
chatFormat |
markdown |
Assistant messages in the sidebar: markdown (sanitized) or plain text. |
preferredLocation |
secondarySidebar |
Where Open Chat opens the native UI: secondarySidebar, panel, or terminal. |
useTerminal |
false |
Open Chat launches the full Muse interactive terminal instead of the native UI. |
executionMode |
headless |
headless keeps native chat on muse exec --json; interactive opens the integrated Muse terminal so approvals and interactive input are available. MSP is reserved for a future host-backed mode. |
The sidebar keeps Muse’s --session-id in workspace state. History / the session id chip opens a picker of retained sessions for the current folder (from Muse’s local session index). Choosing one resumes that id for later muse exec calls and hydrates the transcript from the session log (with muse export as fallback). A small local cache paints instantly while hydration runs. Clean up sessions (also in that picker) permanently deletes selected sessions for this folder from Muse’s local index and removes their log directories under ~/.local/share/muse/sessions (close interactive Muse if the delete fails due to a DB lock).
Tool calls appear as one-line disclosure rows by default. Open a row to reveal
Readable / Raw output, file chips, and Open in canvas. The toolDisplay
setting chooses Minimal, Compact, Balanced, or Detailed initial disclosure;
Minimal rows are dense and static (no chevron, no success badge), and runs with
nothing sensible to show collapse to a working… pulse every five tools.
Failed calls keep a red exit badge and stay expandable in every mode. The
canvas shows the full tool output beside the editor and adds Preview when
stdout looks like a document.
Type @ in the composer to attach a file (open editors, git changes, then workspace search). The pick becomes a context chip and the file contents are sent inline with your prompt, so the model does not need a round trip to read it. + Attach adds the current file, all open editors, workspace Problems/diagnostics, or recent integrated-terminal output the same way (terminal output is captured via shell integration after the extension activates). The sidebar shows the compact prompt with chips; the full contents travel in the muse exec prompt and the session log. After a turn, files that changed in the git working tree appear as a Changed files card and open in canvas as a diff. That is a review of writes Muse already made, not an accept/reject patch flow.
The chat is mode-aware. Headless is the default native-chat path and cannot answer interactive approval prompts. Interactive uses the integrated Muse terminal for workflows that need approvals or other interactive input. muse.useTerminal remains a compatible alias for opening the interactive path. MSP is planned as a future execution backend, not a 2.0 setting.
Paths to .md, .html, .json/.jsonl, .yml/.yaml, .toon, .csv/.tsv, and .txt appear as file chips. Chips are verified on the extension host, so only paths that exist on disk get one. Clicking a chip or a path in chat opens it in the main editor area: the canvas (Preview / Source) for files it can render from the workspace or Muse's data directory (512 KB cap), and a regular editor tab for everything else, including images and files outside those roots. Web URLs open in the browser, as do .xls(x), .pdf, and Office documents, which have no in-app renderer. Open externally in the canvas still hands the current file to the OS, so an HTML report goes to the system browser.
Headless muse exec cannot answer interactive approval prompts. disableApproval defaults off; on first send the extension asks before enabling --disable-approval (sandbox stays on). For staged shell approvals, use Muse CLI Chat: Open Interactive Terminal (launches Muse as the terminal process, not via a shell string).
Dangerous settings (executablePath, extraArgs, yolo, disableApproval) are application-scoped so a workspace cannot override them. Untrusted workspaces are not supported.
Never enable muse.yolo on a machine with real credentials unless you fully trust the workspace. Enabling it shows a one-time warning.
bun test
bun run checkCI runs the same checks plus vsce package on every push/PR to main (see .github/workflows/ci.yml).
- Create publisher
codemarcon VS Code Marketplace and/or Open VSX (changepublisherinpackage.jsonif you use another id). bun installthenbun run package(producesmuse-cli-chat-<version>.vsix).- Open VSX (good for Cursor):
npx ovsx publish muse-cli-chat-<version>.vsix -p <token> - VS Code Marketplace:
bunx vsce publish --no-dependencies(aftervsce login)
Production compile minify: NODE_ENV=production bun run compile.