XM

xiaomimimo/mimo-code

开发工具
1.2万 stars 质量 85 趋势 85

MiMo Code: Where Models and Agents Co-Evolve

概览

MiMo Code: Where Models and Agents Co-Evolve MiMoCode 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. MiMo 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. The first launch guides you through configuration automatically. Supported options: - — anonymous channel, zero configuration - — OAuth login - — migrate existing authentication in one step - — add any OpenAI-compatible API in the TUI If you encounter garbled text when copying on WSL, install xsel: Windows: garbled CJK (Chinese/Japanese/Korean) output in the shell On Windows with a non-UTF-8 system locale (e.g. zh-CN, whose active code page is 936/GBK), command output containing CJK characters may appear garbled (mojibake).

README

MiMoCode

MiMo Code: Where Models and Agents Co-Evolve

中文 | English

Website | Blog


MiMoCode 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.

MiMo 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.


Quick Start

# One-line install (macOS / Linux)
curl -fsSL https://mimo.xiaomi.com/install | bash

# One-line install (Windows PowerShell)
powershell -ep Bypass -c "irm https://mimo.xiaomi.com/install.ps1 | iex"

# Or install via npm (all platforms)
npm install -g @mimo-ai/cli

# Run
mimo

The first launch guides you through configuration automatically. Supported options:

  • MiMo Auto (free for a limited time) — anonymous channel, zero configuration
  • Xiaomi MiMo Platform — OAuth login
  • Import from Claude Code — migrate existing authentication in one step
  • Custom Provider — add any OpenAI-compatible API in the TUI

MiMo Ecosystem

Beyond MiMoCode, Xiaomi MiMo models also work in other agents and coding tools like Cursor, Cline, and Zed.

awesome-mimo-agent collects setup guides for using MiMo in those tools — worth a look if you want to try MiMo elsewhere. Contributions welcome: open a PR to add your own setup.


Core Features

Multiple Agents

Agent Description
build Default. Full tool permissions for development
plan Read-only analysis mode for code exploration and solution design
compose Orchestration mode for specs-driven development and skill-driven workflows

Press Tab to switch between primary agents. Subagents are created by the system as needed.

Persistent Memory

Cross-session memory powered by SQLite FTS5 full-text search:

  • Project memory (MEMORY.md) — persistent project knowledge, rules, and architecture decisions
  • Session checkpoint (checkpoint.md) — structured state snapshots maintained automatically by the checkpoint-writer subagent
  • Scratch notes (notes.md) — temporary note area for agents
  • Task progress (tasks//progress.md) — per-task logs

Memory is injected automatically when a session resumes, so the agent does not need to relearn project context.

Intelligent Context Management

  • Automatic checkpoints — decides when to save session state based on the model context window
  • 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
  • Budgeted injection — uses a token budget to control how much checkpoint, memory, and notes content enters context, with importance ranking

Task Tracking

A tree-shaped task system (T1, T1.1, T1.2, …) that integrates automatically with the checkpoint system, so task progress is preserved when sessions resume.

Subagent System

The 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.

Goal / Stop Condition

The /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.

Compose Mode

Compose 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.

Workflows

Workflows are deterministic JavaScript scripts that orchestrate multiple agents in a sandboxed runtime. Unlike agent conversations, workflows encode fixed phase sequences with bounded retries and automatic parallelization — fire-and-forget execution with no user interaction required.

MiMoCode ships with three built-in workflows:

Workflow Phases Description
compose Brainstorm → Design → Implement → Verify → Review → Report → Merge Full development pipeline. Auto-parallelizes independent tasks into isolated git worktrees, applies TDD per task, chains structured output between phases. Best for well-defined tasks that decompose into independent subtasks.
deep-research Brief → Plan → Research → Reflect → Write → Review Multi-source deep research report generator. Plans independent research angles, runs parallel sub-agents to collect cited findings, reflects on gaps, writes a single coherent Markdown report, then cold-reviews citations. Convergent: resumable via file checkpoints.
fact-check Plan → Search → Extract → Group → Crosscheck → Report Adversarial fact verification. Runs parallel web searches, extracts checkable facts, groups duplicates, then cross-checks each with a 3-juror adversarial vote. Best for precise claims (“Is X true?”).

The compose workflow complements the compose agent: use the workflow when requirements are clear and tasks split cleanly (deterministic, parallel, non-interactive); use the agent when you need to redirect mid-flow or inject judgment between steps (conversational, interactive).

Custom workflows: Place a .js file in .mimocode/workflows/ or .claude/workflows/ to define your own, or override a built-in by using the same name (e.g. .mimocode/workflows/compose.js).

Builtin Skills

Skills are reusable instruction sets that teach agents how to handle specific tasks (e.g. generating PDFs, writing academic papers, searching arXiv). MiMoCode ships with the following builtin skills:

Skill Description
arxiv Search, read, cite, and analyze arXiv papers
docx-official Produce, read, and transform Word (.docx) files
pdf-official Produce, read, fill, and transform PDF files
pptx-official Author and manipulate PowerPoint (.pptx) decks
xlsx-official Build, clean, and transform spreadsheets (.xlsx/.csv)
design-blueprint Produce a design blueprint (DESIGN.md + Decision Trace) before mocking up visuals
frontend-design Visual design guidance for UI work
html-to-video-pipeline HTML-to-MP4 rendering via headless browser + ffmpeg
research-paper-writing Write and polish academic papers (ML/CV/NLP style)
skill-creator Interactive guide for creating and improving agent skills
evolve Total self-modification — rewrite any layer of the agent: tools, behavior hooks, knowledge, workflows, even the UI
loop Schedule recurring prompts on a fixed cadence
mimocode Self-documenting reference for MiMoCode features and config

Overriding a builtin skill: Create a skill with the same name in your project (.mimocode/skills//SKILL.md) or personal skill directory (~/.claude/skills/, ~/.opencode/skills/, etc.). User skills discovered later in the scan order override builtins with the same name.

Voice Input

Real-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).

Dream & Distill

  • /dream — scans recent session traces, extracts persistent knowledge into project memory, and removes outdated entries
  • /distill — discovers repeated manual workflows in recent work and packages high-confidence candidates into reusable skills, subagents, or commands

Configuration

MiMoCode uses JSON/JSONC config files with published JSON Schemas for autocompletion and validation.

File Locations

File Project-level Global
Main config .mimocode/mimocode.jsonc ~/.config/mimocode/mimocode.json
TUI config .mimocode/tui.json ~/.config/mimocode/tui.json
Auth credentials ~/.local/share/mimocode/auth.json

On Windows, XDG paths fall under %LOCALAPPDATA%\mimocode\. You can override all paths with MIMOCODE_HOME.

JSON Schemas

MiMoCode auto-injects a $schema field when it first loads your config, so your editor gets completions and validation out of the box:

Config Schema URL
mimocode.jsonc / mimocode.json https://mimo.xiaomi.com/mimocode/config.json
tui.json https://mimo.xiaomi.com/mimocode/tui.json

Key Options

  • Provider and model selection
  • Agent permissions and custom agents
  • Checkpoint and memory behavior
  • MCP server connections
  • Keybindings and theme

Max Mode (parallel best-of-N reasoning with judge selection) can be enabled via experimental.maxMode in the config.


Development

bun install              # Install dependencies
bun run dev              # Run in development mode
bun turbo typecheck      # Type check

Relationship to OpenCode

MiMoCode is built as a fork of 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.


Community

Scan the QR code to join the community group chat:

  


License

Source code is licensed under the MIT License.

Use of MiMoCode is also subject to the Use Restrictions. Use of Xiaomi MiMo-hosted services is subject to the MiMo Terms of Service. Use of the MiMo name, logo, and trademarks is subject to the MiMo Trademark Policy.

View this README on GitHub

推荐工具

换一个关键词,或者移除筛选条件。

安装

npx skillfish add xiaomimimo/mimo-code