{"id":51040076,"url":"https://github.com/XiaomiMiMo/MiMo-Code","last_synced_at":"2026-06-27T14:00:34.543Z","repository":{"id":363880621,"uuid":"1265025028","full_name":"XiaomiMiMo/MiMo-Code","owner":"XiaomiMiMo","description":"MiMo Code: Where Models and Agents Co-Evolve","archived":false,"fork":false,"pushed_at":"2026-06-25T10:13:11.000Z","size":51810,"stargazers_count":10682,"open_issues_count":590,"forks_count":1007,"subscribers_count":62,"default_branch":"main","last_synced_at":"2026-06-25T10:17:59.791Z","etag":null,"topics":["ai","ai-agents","cli","mimo","mimo-code"],"latest_commit_sha":null,"homepage":"https://mimo.xiaomi.com/mimocode","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/XiaomiMiMo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-06-10T11:52:41.000Z","updated_at":"2026-06-25T10:15:52.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/XiaomiMiMo/MiMo-Code","commit_stats":null,"previous_names":["xiaomimimo/mimo-code"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/XiaomiMiMo/MiMo-Code","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XiaomiMiMo%2FMiMo-Code","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XiaomiMiMo%2FMiMo-Code/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XiaomiMiMo%2FMiMo-Code/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XiaomiMiMo%2FMiMo-Code/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/XiaomiMiMo","download_url":"https://codeload.github.com/XiaomiMiMo/MiMo-Code/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XiaomiMiMo%2FMiMo-Code/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34855826,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-27T02:00:06.362Z","response_time":126,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","ai-agents","cli","mimo","mimo-code"],"created_at":"2026-06-22T10:00:29.163Z","updated_at":"2026-06-27T14:00:34.526Z","avatar_url":"https://github.com/XiaomiMiMo.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eMiMoCode\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/readme/mimocode-banner.png\" alt=\"MiMoCode\" width=\"700\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\u003cstrong\u003eMiMo Code: Where Models and Agents Co-Evolve\u003c/strong\u003e\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"README.zh.md\"\u003e中文\u003c/a\u003e | English\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://mimo.xiaomi.com/coder\"\u003eWebsite\u003c/a\u003e | \u003ca href=\"https://mimo.xiaomi.com/en/blog/mimo-code-long-horizon\"\u003eBlog\u003c/a\u003e\n\u003c/p\u003e\n\n---\n\nMiMoCode is a terminal-native AI coding assistant. It can read and write code, run commands, manage Git, and use a persistent memory system to keep a deep understanding of your project across sessions while continuously improving itself.\n\nMiMo Auto is built in as a free-for-limited-time channel, so you can start with zero configuration. MiMoCode also supports connecting to any mainstream LLM provider API.\n\n---\n\n## Quick Start\n\n```bash\n# One-line install\ncurl -fsSL https://mimo.xiaomi.com/install | bash\n\n# Or install via npm\nnpm install -g @mimo-ai/cli\n\n# Run\nmimo\n```\n\nThe first launch guides you through configuration automatically. Supported options:\n- **MiMo Auto (free for a limited time)** — anonymous channel, zero configuration\n- **Xiaomi MiMo Platform** — OAuth login\n- **Import from Claude Code** — migrate existing authentication in one step\n- **Custom Provider** — add any OpenAI-compatible API in the TUI\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eWSL: clipboard issues\u003c/strong\u003e\u003c/summary\u003e\n\nIf you encounter garbled text when copying on WSL, install `xsel`:\n```bash\nsudo apt install xsel\n```\n\u003c/details\u003e\n\n---\n\n## Core Features\n\n### Multiple Agents\n\n| Agent | Description |\n|--------|------|\n| **build** | Default. Full tool permissions for development |\n| **plan** | Read-only analysis mode for code exploration and solution design |\n| **compose** | Orchestration mode for specs-driven development and skill-driven workflows |\n\nPress `Tab` to switch between primary agents. Subagents are created by the system as needed.\n\n### Persistent Memory\n\nCross-session memory powered by SQLite FTS5 full-text search:\n\n- **Project memory** (`MEMORY.md`) — persistent project knowledge, rules, and architecture decisions\n- **Session checkpoint** (`checkpoint.md`) — structured state snapshots maintained automatically by the checkpoint-writer subagent\n- **Scratch notes** (`notes.md`) — temporary note area for agents\n- **Task progress** (`tasks/\u003cid\u003e/progress.md`) — per-task logs\n\nMemory is injected automatically when a session resumes, so the agent does not need to relearn project context.\n\n### Intelligent Context Management\n\n- **Automatic checkpoints** — decides when to save session state based on the model context window\n- **Context reconstruction** — when context approaches the limit, rebuilds it from the latest checkpoint, project memory, task progress, and retained recent messages so the agent can continue the current task\n- **Budgeted injection** — uses a token budget to control how much checkpoint, memory, and notes content enters context, with importance ranking\n\n### Task Tracking\n\nA tree-shaped task system (`T1`, `T1.1`, `T1.2`, …) that integrates automatically with the checkpoint system, so task progress is preserved when sessions resume.\n\n### Subagent System\n\nThe primary agent can create subagents on demand. Subagents share the current session context and can work in parallel, with lifecycle tracking, cancellation, and background execution.\n\n### Goal / Stop Condition\n\nThe `/goal` command sets a stopping condition for a session. When the agent tries to stop, an independent judge model evaluates the conversation to decide whether the condition is truly satisfied — preventing premature \"optimistic stops\" during autonomous work.\n\n### Compose Mode\n\nCompose mode provides a structured workflow for specs-driven development. It includes built-in skills for planning, execution, code review, TDD, debugging, verification, and merging — orchestrating the full lifecycle from spec to shipped code.\n\n### Voice Input\n\nReal-time streaming voice input powered by TenVAD and MiMo ASR. Activate with `/voice`, then speak — audio is segmented by pauses and transcribed incrementally into the input. Available for MiMo logged-in users. Requires `sox` (`brew install sox` on macOS, other platforms similar).\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eWSLg audio setup\u003c/strong\u003e\u003c/summary\u003e\n\n```bash\nsudo apt install -y sox pulseaudio libasound2-plugins\nexport PULSE_SERVER=unix:/mnt/wslg/PulseServer\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eSSH remote audio (Mac → remote host)\u003c/strong\u003e\u003c/summary\u003e\n\n```bash\n# Mac (local)\nbrew install pulseaudio\npulseaudio --load=\"module-native-protocol-tcp auth-ip-acl=127.0.0.1\" --exit-idle-time=-1 --daemonize\n# Add to ~/.ssh/config: RemoteForward 4713 127.0.0.1:4713\n\n# Remote host\napt install -y pulseaudio pulseaudio-utils sox\nexport PULSE_SERVER=tcp:127.0.0.1:4713\n# Verify: pactl info\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eNon-MiMo voice providers (OpenRouter, internal API, etc.)\u003c/strong\u003e\u003c/summary\u003e\n\nVoice input can route through other OpenAI-compatible providers via the `voice` config field. The ASR model (`mimo-v2.5-asr`) is only available on MiMo's platform; voice control mode (`mimo-v2.5`) is available on OpenRouter and compatible relay platforms.\n\n**OpenRouter (voice control only):**\n\nUse `/connect` to sign in to OpenRouter, then add to your config:\n```jsonc\n{\n  \"voice\": {\n    \"control_model\": \"openrouter/xiaomi/mimo-v2.5\"\n  }\n}\n```\n\n**Internal / self-hosted relay (both ASR and voice control):**\n```jsonc\n{\n  \"provider\": {\n    \"internal\": {\n      \"options\": {\n        \"baseURL\": \"https://your-api-gateway.example.com/v1\",\n        \"apiKey\": \"sk-...\"\n      },\n      \"models\": {\n        \"xiaomi/mimo-v2.5-asr\": { \"name\": \"MiMo-V2.5-ASR\" },\n        \"xiaomi/mimo-v2.5\": { \"name\": \"MiMo-V2.5\" }\n      }\n    }\n  },\n  \"voice\": {\n    \"asr_model\": \"internal/xiaomi/mimo-v2.5-asr\",\n    \"control_model\": \"internal/xiaomi/mimo-v2.5\"\n  }\n}\n```\n\nCustom providers must register at least one model in their `models` field to be recognized. The model names in `voice.*_model` are sent directly to the API — they don't need to match the registered model keys exactly.\n\n\u003e **Note:** Models registered under a custom provider will appear in the model selection list. Don't use ASR-only models (e.g. `mimo-v2.5-asr`) as your primary coding model.\n\n\u003c/details\u003e\n\n### Dream \u0026 Distill\n\n- **`/dream`** — scans recent session traces, extracts persistent knowledge into project memory, and removes outdated entries\n- **`/distill`** — discovers repeated manual workflows in recent work and packages high-confidence candidates into reusable skills, subagents, or commands\n\n---\n\n## Configuration\n\nMiMoCode is configured via `.mimocode/mimocode.json` in the project directory (or `~/.config/mimocode/mimocode.json` globally). Key options include:\n\n- Provider and model selection\n- Agent permissions and custom agents\n- Checkpoint and memory behavior\n- MCP server connections\n- Keybindings and theme\n\nMax Mode (parallel best-of-N reasoning with judge selection) can be enabled via `experimental.maxMode` in the config.\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eAllowing the system temp directory (\u003ccode\u003e/tmp\u003c/code\u003e)\u003c/strong\u003e\u003c/summary\u003e\n\nBy default, reading or writing files outside the project working directory triggers an\n`external_directory` permission prompt — including the system temp directory. This is\nintentional: MiMoCode does not silently widen permissions, so you stay in control of what\nthe model can touch outside your project.\n\nThe temp directory comes up often because most models reach for it as scratch space (e.g.\na quick script, a throwaway data file). If you trust your environment and would rather not\nbe prompted each time, you can opt in by allowing it in your config:\n\n```json title=\".mimocode/mimocode.json\"\n{\n  \"$schema\": \"https://opencode.ai/config.json\",\n  \"permission\": {\n    \"external_directory\": {\n      \"/tmp/**\": \"allow\"\n    }\n  }\n}\n```\n\n**This setting has known risks — use it at your own risk.** The temp directory is\nworld-writable and shared with every other process and user on the machine. Auto-allowing\nit means the model can read and write there without confirmation, which widens your exposure\nto predictable temp-path / symlink tricks (e.g. another process pre-creating `/tmp/foo` as a\nsymlink to a sensitive file). For that reason it is only recommended for single-user,\ncontrolled environments or inside a container. Keep the allowlist as narrow as possible.\n\n\u003c/details\u003e\n\n---\n\n## Development\n\n```bash\nbun install              # Install dependencies\nbun run dev              # Run in development mode\nbun turbo typecheck      # Type check\n```\n\n---\n\n## Relationship to OpenCode\n\nMiMoCode is built as a fork of [OpenCode](https://github.com/anomalyco/opencode). It keeps all core OpenCode capabilities (multiple providers, TUI, LSP, MCP, plugins) and adds persistent memory, intelligent context management, subagent orchestration, goal-driven autonomous loops, compose workflows, and self-improvement via dream/distill.\n\n---\n\n## Community\n\nScan the QR code to join the community group chat:\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/readme/community-qrcode-1.jpg\" alt=\"Community group chat QR code 1\" width=\"240\"\u003e\n  \u0026nbsp;\u0026nbsp;\n  \u003cimg src=\"assets/readme/community-qrcode-2.jpg\" alt=\"Community group chat QR code 2\" width=\"240\"\u003e\n\u003c/p\u003e\n\n---\n\n## License\n\nSource code is licensed under the [MIT License](./LICENSE).\n\nUse of MiMoCode is also subject to the [Use Restrictions](./USE_RESTRICTIONS.md).\nUse of Xiaomi MiMo-hosted services is subject to the [MiMo Terms of Service](https://platform.xiaomimimo.com/docs/terms/user-agreement).\nUse of the MiMo name, logo, and trademarks is subject to the MiMo Trademark Policy.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FXiaomiMiMo%2FMiMo-Code","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FXiaomiMiMo%2FMiMo-Code","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FXiaomiMiMo%2FMiMo-Code/lists"}