MiMo Code Quickstart

This guide gets you from zero to productive with MiMo Code β€” Xiaomi's terminal-native AI coding agent β€” in under 5 minutes.

Prerequisites

Step 1: Install

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

This installs the mimo CLI to /usr/local/bin. Verify it worked:

mimo --version
# mimo-cli v0.1.0

Step 2: Configure API Key

Sign up at platform.xiaomimimo.com and create an API key. Then configure:

mimo config set api_key=miMo-sk-your-key-here

Optionally set your preferred model:

mimo config set model=mimo-v2-flash

Step 3: Launch

cd your-project
mimo

MiMo Code reads your project structure and starts a session. The first load may take 10-20 seconds for large projects as it indexes your codebase.

Basic Commands

CommandWhat It DoesExample
/askReads code and answers questions/ask "How does the routing work?"
/editGenerates and applies code changes/edit "Add pagination to the user list endpoint"
/runExecutes a command and interprets output/run "Find all TypeScript errors"
/debugAnalyzes error output and suggests fixes/debug "Tests fail with: [paste output]"
/architectDesigns architecture and plans refactors/architect "Design a caching layer"

Multi-Agent Switching

MiMo Code uses specialized agents for different task types. You don't need to do anything special β€” just use the right command prefix:

Agents share context and memory, so information discovered by one agent is available to others.

Git Integration

MiMo Code automatically detects your Git repository. Before making edits, it checks if your working tree is clean and can create branches for changes. By default, it creates a backup branch before applying modifications:

# MiMo automatically:
# 1. Checks git status
# 2. Creates branch mimo-edit-{timestamp} if needed
# 3. Applies changes
# 4. Shows a diff before committing

Memory System

MiMo Code maintains persistent memory in .mimo/memory.json. This file records:

The memory persists across sessions. You can commit .mimo/memory.json to Git for team-wide context sharing.

Advanced Tips

FAQ: MiMo CLI Install Questions

How do I install the MiMo CLI?

On macOS (Apple Silicon or Intel), Linux (x86_64 or arm64), or Windows through WSL2, run the one-line installer from Step 1:

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

It copies the mimo binary into /usr/local/bin. Confirm the install with mimo --version before moving on to the API key step.

What if piping the installer into bash is blocked?

Download the script first, read it, then run it — same installer, one extra step:

curl -fsSL https://mimo.xiaomi.com/install -o mimo-install.sh
less mimo-install.sh
bash mimo-install.sh

If mimo --version still says command not found, check that /usr/local/bin is on your PATH and reopen the terminal so the updated shell environment is picked up.

Do I need an API key before installing MiMo CLI?

No. Install and verify the CLI first, then create a key at platform.xiaomimimo.com and register it with mimo config set api_key=miMo-sk-your-key-here. The install itself only needs an internet connection for the first-time setup.

Next Steps