CLI tool
XiaomiMiMo/MiMo-Code avatar
XiaomiMiMo/MiMo-Code

MiMoCode: Xiaomi's Terminal Coding Agent, and How to Install It

MiMo Code: Where Models and Agents Co-Evolve. MiMoCode also supports connecting to any mainstream LLM provider API.

13,555 stars1,410 forksTypeScriptMIT

At a glance

What is it?
MiMoCode is a terminal-native AI coding assistant from Xiaomi with persistent SQLite-backed memory, three agent modes, and support for any mainstream LLM provider. It is early software, and the README is honest about where it breaks.
Who is it for?
Adopt MiMoCode if you already work in a terminal, want a coding agent that carries project memory across sessions, and are willing to run v0.1.x software with a documented list of terminal caveats. Skip it if you need a GUI-first tool, a stable plugin API, or a guarantee about which models the free tier will keep serving.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 1 day ago.
What is it written in?
Mainly TypeScript, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 29, 2026, and from our analysis. They are not legal advice.

Editorial analysis

What MiMoCode actually is, and who it is for

MiMoCode is a terminal-native AI coding assistant published by Xiaomi under the XiaomiMiMo organization. The README describes it as able to read and write code, run commands, manage Git, and use a persistent memory system to keep an understanding of your project across sessions. It is written in TypeScript, ships under the MIT licence, and the repository's package.json names the workspace root opencode, which tells you something about its lineage: the package tree, the bun workspace catalog, and the monorepo layout all point at a fork or derivative of the OpenCode codebase rather than a from-scratch implementation.

The intended user is a developer who lives in a terminal and wants an agent that remembers. The README's framing is co-evolution: models and agents improving together, with the memory layer as the mechanism. That is a design position, not a benchmark claim, and the README does not publish evaluation numbers to back it. Treat the slogan as a description of intent.

The other half of the pitch is provider neutrality. MiMoCode "supports connecting to any mainstream LLM provider API," and the first-launch flow offers Xiaomi's own MiMo Platform by OAuth, Codex via ChatGPT Pro or Plus OAuth, an import path from Claude Code, a catalog of providers by API key, and a Custom Provider entry for any OpenAI-compatible endpoint. If you already pay for one of those subscriptions, that matters more than the memory system does.

Three agents, a locked mode, and why Compose isolates itself

MiMoCode exposes three primary agents, switched with Tab. build is the default and carries full tool permissions. plan is read-only, meant for exploring a codebase and designing a solution before anything is written. compose is an orchestration mode for specs-driven development and skill-driven workflows.

The interesting constraint is what happens after the first message. The mode locks. Build and plan can still switch between each other, but compose is isolated once entered. The README's stated reason is that keeping the skill and tool set fixed from session start "significantly improves tool-call reliability." That is a real trade-off, and it cuts both ways: you get more predictable tool calls, and you lose the ability to change your mind mid-session without starting over.

The README also carves out an exception. For frontier models it calls Fable/Sol-class, the recommended way to do compose-style work is the build agent with the /compose-next skill rather than the compose agent itself. So the three-agent table is not the whole story: for the strongest models, the project's own guidance routes you back to build. If you are on a frontier model, start there.

Subagents are created by the system as needed rather than by you. The checkpoint-writer is one of them, and it is what maintains the session checkpoint described below.

Persistent memory: SQLite FTS5, four file types, and budgeted injection

The memory system is the part of MiMoCode with the most concrete mechanism behind it, so it is worth reading closely. It is powered by SQLite FTS5 full-text search and split across four artifacts. Project memory lives in MEMORY.md and holds project knowledge, rules, and architecture decisions. A session checkpoint lives in checkpoint.md and is a structured state snapshot maintained automatically by the checkpoint-writer subagent. Scratch notes go in notes.md as a temporary area for agents. Task progress is written per task at tasks/<id>/progress.md.

The retrieval side is where the design decisions are. Memory is injected automatically when a session resumes, so the agent does not have to relearn context. Injection is budgeted: a token budget controls how much checkpoint, memory, and notes content enters the context, with importance ranking deciding what makes the cut. When context approaches the limit, the system reconstructs it from the latest checkpoint, project memory, task progress, and retained recent messages so the agent can continue the current task.

Budgeted injection with importance ranking is a reasonable answer to a hard problem, but it means retrieval is lossy by construction. The README does not document how importance is scored, and it does not document what happens when the ranking discards something the agent needed. That is the first thing I would want to verify against a real project before trusting the memory layer with architecture decisions.

Installing MiMoCode and running a first real session

There are three install paths in the README, and they are equivalent in outcome. On macOS and Linux the one-line script is the shortest route. It downloads and runs an installer from mimo.xiaomi.com.

bash
curl -fsSL https://mimo.xiaomi.com/install | bash

On Windows PowerShell the equivalent is a remote script piped into Invoke-Expression, run with the execution policy bypassed.

bash
powershell -ep Bypass -c "irm https://mimo.xiaomi.com/install.ps1 | iex"

If you would rather manage the binary through a package manager, npm works on all platforms. The published package name is @mimo-ai/cli, which is not the same string as the repository name, so copy it exactly.

bash
npm install -g @mimo-ai/cli

Whichever path you took, the command you run afterwards is the same, and the first launch walks you through configuration.

bash
mimo

The configuration step offers Xiaomi MiMo Platform by OAuth login, Codex via ChatGPT Pro or Plus OAuth, a one-step import from an existing Claude Code install, a provider list you connect by API key or by OAuth where supported (the README names xAI/Grok as an OAuth example), and a Custom Provider entry for any OpenAI-compatible API, added inside the TUI. You should end up back at a prompt with an agent selected and a model bound to it.

If you are on WSL and copying produces garbled text, the README's fix is to install xsel.

bash
sudo apt install xsel

One more practical note before you judge the interface: MiMoCode does not support the built-in macOS Terminal (Terminal.app). If the UI is misaligned or flickers, the README points at iTerm2 or the VS Code integrated terminal instead.

Running the server over SSH when the TUI lags

The README treats TUI lag over SSH as a known problem with a documented workaround, and the shape of that workaround tells you how the architecture is split. Rather than rendering the interface on the remote machine, you run only the MiMoCode server there and render locally, forwarding the port over SSH.

bash
# Remote host
mimo serve --port 4096

# Local host: create the SSH port forward
ssh -N -L 4096:127.0.0.1:4096 user@remote-host

# Local host: connect from another terminal
mimo attach http://127.0.0.1:4096

The serve and attach split is the useful detail here. It means the agent process and the interface are separable, which is also why the project can ship a desktop and web surface alongside the CLI. If you only ever run MiMoCode locally, you will never touch this path.

There is a second, cheaper lever for the same problem. If decorative animation is what is causing the lag, /vivid switches between Vivid and Minimal visuals, and the same setting is reachable as Vivid visuals in the ctrl+p command palette. Try that before you set up port forwarding.

Compaction, cost tiers, and the /context-limit setting

Compaction normally fires just below the model's context window. MiMoCode lets you pull that point earlier per model with /context-limit, which writes a compaction.max_context entry into configuration. The README's example uses jsonc and supports absolute token counts, values like 300K or 1M, and percentages of the window, with wildcards where the longest matching pattern wins.

jsonc
{
  "compaction": {
    "max_context": {
      "openai/gpt-5.6": "272K", // token count, "300K", "1M", or "50%" of the window
      "anthropic/*": "300K" // wildcards allowed, longest pattern wins
    }
  }
}

The README gives two reasons you would want this. The first is pricing tiers: it states that OpenAI prices GPT-5.6 prompts above 272K input at 2x input and 1.5x output for the whole request, so compacting below that threshold changes what you pay. The second is that the advertised window is not always what you get. The same model can have a different usable window depending on how you reach it, whether through a ChatGPT/Codex subscription or a direct API key.

The safety property is worth noting: the value is always clamped to what the provider actually accepts, so it can only lower the compaction point, never raise it. Setting 0 restores the model's own window. This is a well-scoped knob, and the clamping behaviour means a wrong number degrades rather than breaks.

Where MiMoCode breaks, and when it is the wrong tool

The README is unusually candid about platform problems, and that candour is useful. Built-in macOS Terminal is unsupported outright. On WSL, clipboard copying can garble without xsel. On Windows with a non-UTF-8 system locale such as zh-CN, whose active code page is 936/GBK, command output containing Chinese, Japanese or Korean characters can appear as mojibake. MiMoCode forces UTF-8 output for spawned PowerShell and cmd subprocesses, but the README admits there are cases this does not yet cover, and the fallback is a system-wide Windows Beta toggle that switches the active code page to UTF-8 for all programs. The README itself calls that a workaround and warns it may break older non-Unicode programs. If you are on a zh-CN Windows machine and cannot enable that toggle, expect friction.

The larger limitation is maturity. The current release line is v0.1.x, with v0.1.13 pushed on 2026-08-19. That is a pre-1.0 project. The repository carries a USE_RESTRICTIONS.md file at the top level alongside the MIT LICENSE, which is worth reading before you build a workflow on top of it, because a restrictions file next to a permissive licence usually narrows what you may do with the hosted service or the branding even when the code itself is MIT.

MiMoCode is also the wrong tool if you want a GUI-first experience, or if you need a published evaluation of coding ability before you switch. The README makes no benchmark claims. And if your work is mostly reviewing diffs in a web UI rather than driving an agent from a shell, the terminal-native design is a cost, not a feature.

MiMoCode against OpenCode, and the Claude Code import path

The package.json workspace root is literally named opencode, and the repository ships a packages/ tree with sdk/js, console, desktop, app, storybook and slack workspaces. That is the OpenCode architecture. The practical difference between the two, judging from the README, is the memory layer and the agent modes: MiMoCode adds MEMORY.md, checkpoint.md, notes.md and per-task progress files on top of a SQLite FTS5 index, plus the build/plan/compose split with its mode lock. OpenCode's own documentation is the place to check what it offers instead; the MiMoCode README does not compare itself to OpenCode at all.

A more concrete migration path is the one the README does document: first-launch configuration includes "Import from Claude Code," which migrates existing authentication in one step. That is aimed at people who already have Claude Code configured and want to point MiMoCode at the same credentials rather than re-authenticate. It is a one-step import of authentication, not a conversion of settings, keybindings or project configuration, and the README does not claim otherwise.

The provider list is the other differentiator worth weighing. Because MiMoCode accepts any mainstream LLM provider API and offers a Custom Provider entry for OpenAI-compatible endpoints, you are not locked to Xiaomi's models. That cuts the other way too: the memory and compaction behaviour has to work across providers with different window sizes and pricing, which is exactly why compaction.max_context exists as a per-model map.

Editorial conclusion

Adopt MiMoCode if you already work in a terminal, want a coding agent that carries project memory across sessions, and are willing to run v0.1.x software with a documented list of terminal caveats. Skip it if you need a GUI-first tool, a stable plugin API, or a guarantee about which models the free tier will keep serving. Before committing, run the one-line installer or npm install -g @mimo-ai/cli, complete the first-launch provider setup, and check that your terminal is not the built-in macOS Terminal.app, which the README says is unsupported.

Frequently asked questions

What is MiMoCode?

MiMoCode is a terminal-native AI coding assistant from Xiaomi that can read and write code, run commands, manage Git, and keep project context across sessions through a persistent memory system. It is written in TypeScript and licensed under MIT.

Is MiMoCode free?

The README does not describe a pricing model for MiMoCode itself, and it does not state that the tool is free. It documents connecting through Xiaomi MiMo Platform, Codex with a ChatGPT Pro or Plus subscription, catalog providers by API key, and any OpenAI-compatible custom provider, so what you pay depends on the provider you connect.

How do I install MiMoCode?

The README gives three paths: a one-line curl script for macOS and Linux, a PowerShell one-liner for Windows, or npm install -g @mimo-ai/cli on any platform. After installing, run the mimo command and the first launch guides you through configuration.

How do I install MiMoCode on Windows?

The README's Windows path is powershell -ep Bypass -c "irm https://mimo.xiaomi.com/install.ps1 | iex", or npm install -g @mimo-ai/cli. Note that on Windows with a non-UTF-8 system locale, CJK command output may be garbled, and the README's fallback is enabling system-wide UTF-8 support in the language and region settings.

Is MiMoCode open source?

The repository is public and carries an MIT LICENSE, and the primary language is TypeScript. The repository also contains a USE_RESTRICTIONS.md file at the top level, which is worth reading alongside the licence before you rely on it.

How is MiMoCode different from OpenCode?

The repository's package.json names the workspace root opencode and the layout mirrors that codebase, so the meaningful additions described in the README are the persistent memory system (MEMORY.md, checkpoint.md, notes.md, tasks/<id>/progress.md on SQLite FTS5) and the build, plan and compose agent modes. The README does not compare MiMoCode to OpenCode directly.

Official sources

  1. Official documentation
  2. Official README
  3. Project repository
  4. Release notes
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/xiaomimimo-mimo-code.svg)](https://hysenlabs.com/projects/xiaomimimo-mimo-code)