📝 Tutorials
· 7 min read

How to Install and Set Up MiMo Code: Mac, Linux, and Windows


MiMo Code installs in under a minute. One command on Mac and Linux, npm on Windows. But getting it configured properly for your workflow takes a few more steps. This guide walks through the full setup, from installation to your first coding task to switching model backends.

If you are not sure what MiMo Code is yet, read our MiMo Code complete guide first. If you want to understand how it compares to alternatives, check MiMo Code vs Claude Code.

Prerequisites

Before installing, make sure you have:

  • A terminal (any shell works: bash, zsh, fish, PowerShell)
  • Node.js 18+ (for Windows install, or if you prefer npm on Mac/Linux)
  • An internet connection (the agent calls model APIs)
  • A project directory you want to work in

You do not need:

  • An API key (MiMo V2.5 Pro access is free by default)
  • Docker
  • Any specific editor or IDE

Installing on Mac and Linux

Open your terminal and run:

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

This downloads the MiMo Code binary, places it in your PATH, and sets up the configuration directory at ~/.mimo-code/.

After installation, verify it works:

mimo-code --version

You should see something like MiMo Code v0.1.0.

What the installer does

The curl script:

  1. Detects your OS and architecture (Intel Mac, Apple Silicon, x86_64 Linux, ARM Linux)
  2. Downloads the appropriate binary
  3. Places it in /usr/local/bin/ (or ~/.local/bin/ if you lack root)
  4. Creates the config directory at ~/.mimo-code/
  5. Initializes an empty memory database

No hidden services. No daemons. No background processes installed.

Installing on Windows

On Windows, use npm:

npm install -g @xiaomi/mimo-code

This installs MiMo Code globally. Run it from PowerShell, Windows Terminal, or CMD:

mimo-code --version

If you prefer WSL (Windows Subsystem for Linux), you can use the curl method instead, which works identically to native Linux.

First Run

Navigate to any project directory and launch MiMo Code:

cd ~/projects/my-app
mimo-code

On first launch, MiMo Code will:

  1. Authenticate with Xiaomi’s API (opens a browser for login, or use an email verification)
  2. Scan your project directory structure
  3. Initialize the persistent memory database for this project
  4. Present you with the interactive prompt

The first scan takes a few seconds for small projects, up to a minute for very large monorepos. Subsequent launches are instant because the memory system already has your project indexed.

Your First Task

With MiMo Code running, try a simple task:

> Explain the structure of this project and identify the main entry point

MiMo Code will read your files, analyze the structure, and respond with a description. This confirms everything is working: the agent can read your filesystem, communicate with the model, and return results.

For a more practical first task:

> Find any TODO comments in this project and list them with file locations

Or start with something productive:

> Write unit tests for the auth module

The agent reads relevant files, understands context, writes tests, and saves them to your project. You can review changes with your regular git workflow.

Configuring the Model Backend

MiMo Code defaults to MiMo V2.5 Pro. To check or change your model configuration:

mimo-code config

This shows your current settings. To switch models:

Using MiMo V2.5 Pro (Default)

No configuration needed. This is the default. Free access, 1M context window, 1T parameters. For details on this model, see our MiMo V2.5 Pro guide.

Switching to DeepSeek

mimo-code config set model.provider deepseek
mimo-code config set model.api_key YOUR_DEEPSEEK_KEY

You need a DeepSeek API key for this. Visit deepseek.com to get one.

Switching to GLM

mimo-code config set model.provider glm
mimo-code config set model.api_key YOUR_GLM_KEY

This uses Zhipu AI’s GLM models. If you are interested in GLM-5.2 specifically, see our GLM-5.2 complete guide.

Switching to Kimi

mimo-code config set model.provider kimi
mimo-code config set model.api_key YOUR_KIMI_KEY

Kimi (by Moonshot AI) is another strong option, especially for Chinese-language codebases.

Switching back to default

mimo-code config set model.provider mimo

No API key needed for the default MiMo V2.5 Pro backend.

Workflow Modes

MiMo Code has different modes optimized for different tasks. Switch between them during a session:

/mode code

Available modes:

  • code: Standard coding, feature implementation, refactoring
  • debug: Focus on diagnosing and fixing bugs
  • review: Code review and improvement suggestions
  • plan: Architecture discussions and planning without code changes

Each mode adjusts the agent’s behavior. In debug mode, it asks more diagnostic questions and avoids premature fixes. In review mode, it focuses on suggestions without modifying files. In plan mode, it discusses architecture without writing code.

Voice Control

Enable voice input with:

/voice on

Your system microphone activates. Speak your instructions naturally. MiMo Code transcribes and processes them like typed input. Say “stop listening” or press Ctrl+V to toggle voice off.

This works well for quick commands while your hands are on the keyboard for something else. It is also useful for accessibility.

Memory Management

MiMo Code’s persistent memory works automatically. But you can interact with it:

View stored memory

/memory list

Shows what the agent remembers about your project.

Manually add context

/memory add "This project uses a custom ORM. Never suggest Prisma or TypeORM."

Clear memory for a project

/memory clear

Resets the project memory. Use this if stored context has become unhelpful.

Trigger /dream manually

/dream

Runs the maintenance cycle immediately instead of waiting for the 7-day schedule. Useful after major refactors that invalidate lots of stored paths.

For the full deep dive on how memory works under the hood, read MiMo Code’s persistent memory explained.

Configuration File

All settings live in ~/.mimo-code/config.toml. You can edit this directly:

[model]
provider = "mimo"
# api_key = "your-key-here"  # only needed for non-default providers

[memory]
auto_compress = true
dream_interval_days = 7

[voice]
enabled = false
language = "en"

[ui]
theme = "dark"
show_token_count = true

Tips for Daily Use

Start with context: When beginning work on a specific feature, tell MiMo Code what you are doing. “I am working on the payment integration this session.” This helps the memory system prioritize relevant context.

Use modes appropriately: Switch to debug mode before diagnosing issues. Switch to plan mode before discussing architecture. The mode-specific behaviors make a real difference.

Let memory build naturally: Do not try to front-load all project context manually. Use MiMo Code normally for a few sessions and let the memory system learn your project organically.

Run /dream after big refactors: If you rename directories, move files, or restructure your project significantly, trigger /dream to clean up stale paths in memory.

Check the cheat sheet: For Claude Code users transitioning to MiMo Code, the interaction patterns are similar. Our Claude Code cheat sheet covers terminal agent workflows that apply to both tools.

Troubleshooting

”Connection refused” on first run

The MiMo V2.5 Pro servers may be under heavy load. Wait a minute and retry. If persistent, check status.xiaomi.com or switch to an alternative backend temporarily.

Slow responses

Large context windows (1M tokens) mean bigger payloads. If responses are slow:

  • Close unnecessary files from context with /forget filename
  • Check your internet connection
  • Consider whether you need the full 1M context for your current task

Memory taking too much disk space

The SQLite database grows with usage. Run /dream to compress. If it is still too large, use /memory clear to reset and start fresh.

Voice not working

Ensure your terminal has microphone permissions (macOS System Settings or Linux PulseAudio/PipeWire config). Voice requires an active internet connection for transcription.

Uninstalling

If you decide MiMo Code is not for you:

Mac/Linux:

rm /usr/local/bin/mimo-code
rm -rf ~/.mimo-code/

Windows:

npm uninstall -g @xiaomi/mimo-code

This removes the binary and all stored configuration and memory data.

What Next

Once you are set up:

FAQ

Do I need an API key to use MiMo Code?

Not for the default setup. MiMo V2.5 Pro access is included free. You only need an API key if you switch to DeepSeek, Kimi, or GLM backends.

How much disk space does MiMo Code use?

The binary is around 50MB. The memory database grows with usage but typically stays under 100MB even for large projects. Running /dream compresses it regularly.

Can I use MiMo Code alongside Claude Code?

Absolutely. They are independent terminal tools. Use MiMo Code for some projects and Claude Code for others, or even switch between them on the same project. They do not conflict.

Does it work offline?

No. MiMo Code requires an internet connection to communicate with the model backend. The persistent memory is stored locally, but inference happens server-side.

How do I update MiMo Code?

Re-run the install command. On Mac/Linux, the curl script detects and updates existing installations. On Windows, npm update -g @xiaomi/mimo-code handles it.