№ 0287GitHub
muse-shim
An unofficial loopback shim that lets Meta Muse Code use OpenAI Responses APIs, OpenRouter, Codex OAuth and the official Claude Code CLI, switchable from Muse's /model menu.
muse-shim
muse-shim is an unofficial local model-provider shim that lets Meta Muse Code use OpenAI-compatible Responses APIs (including OpenRouter), OpenAI Codex OAuth, and the official Claude Code CLI—without changing Muse itself.
It is a loopback protocol shim. Start it with Muse, then switch between Codex and Claude from Muse's built-in /model menu. Codex uses the native Responses API; Claude uses the installed official CLI's non-interactive claude -p mode by default. Direct Anthropic Messages/API-key mode remains available as an explicit option.
Python 3.10+, standard library only (no runtime pip dependencies).
Provider matrix
| Mode | Auth | Upstream wire format | What the shim does |
|---|---|---|---|
auto (default) |
Codex OAuth + Claude Code login | Codex Responses + Claude CLI print mode | Advertises both catalogs to Muse; routes each request from the /model selection |
generic / http |
API key (MUSE_SHIM_API_KEY or Muse’s bearer) |
OpenAI Responses (POST …/responses) |
Flattens Muse namespace tools; optional portable field stripping; streams JSON/SSE through |
codex |
Codex OAuth (CLI auth.json or env token) |
Codex Responses backend | Loads/refreshes OAuth; preflights request; streams Responses events back to Muse |
claude |
Claude Code's existing login | Official claude -p structured output |
Sends each turn on stdin and maps text/tool calls back to Responses for Muse |
Default listen address: http://127.0.0.1:8787 (loopback only unless you explicitly opt out).
Prerequisites
- Python 3.10+
- Meta Muse Code CLI (
muse) installed and runnable on your machine - For generic mode: an upstream that implements OpenAI Responses (
POST /responseswith SSE/streaming and function tools as needed). Chat Completions-only servers need a separate adapter (e.g. LiteLLM) in front. - For codex mode: Codex CLI logged in (
codex login) so~/.codex/auth.json(orCODEX_HOME) exists, or access/refresh tokens in the environment - For claude mode: the official Claude Code CLI (
claude) installed and logged in. Runclaude login(or your normal Claude Code authentication flow) first.
Install
Clone and run from source (no install required):
git clone https://github.com/lu




ChatForm
Tgmlabs