Overview
Muse Code is Meta’s terminal-based AI coding agent. By default, each Muse Code session starts with a blank slate — it has no memory of previous sessions, architectural decisions, or project conventions. The Memwyre Muse Plugin bridges this gap:- Context Injection (
SessionStart): When you launch Muse Code, the plugin automatically retrieves relevant past memories matching your current project folder and injects them as start context. - Session Archival (
Stop): When you exit Muse Code, the plugin parses your session transcript and automatically uploads it to Memwyre, saving new insights for future sessions. - MCP Tools: The plugin connects Muse to the Memwyre MCP server, giving it in-session tools to search, save, and manage your memory vault on demand.
Installation
The plugin uses pure Node.js built-ins for its hooks — zero npm dependencies and no installation bloat.Option A: One-Line Installer (recommended)
Run the official Memwyre interactive CLI to automatically install the plugin, configure hooks, and store credentials:Option B: Muse Plugin Marketplace
Option C: Local Install
Configuration
Step 1: Set Up Credentials
Important: Muse Code clears the shell environment before running hooks. export MEMWYRE_API_KEY will not work. You must run the one-time login script:
~/.muse-memwyre/credentials.json, where hooks can always read it regardless of the shell environment state.
Get your API key from Settings → API Keys in the Memwyre web app.
Step 2 (Optional): Self-Hosted Instance
How the Hooks Work
The plugin registers two deterministic shell hooks inhooks.json:
SessionStart: Fires when a Muse session begins. It reads the current workspace directory, fetches relevant memories from Memwyre, and injects them into theadditionalContextof the system prompt.Stop: Fires when the session ends or the agent pauses. It reads thesession.jsonltranscript (located at~/.local/share/muse/sessions/YYYY/MM/DD/<session-uuid>/session.jsonl) and posts it to the Memwyre extraction backend.
0) and will silently fail open if the API is unreachable, ensuring your Muse workflow is never interrupted.

