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
- macOS (Apple Silicon or Intel), Linux (x86_64 or arm64), or Windows (WSL2)
- Internet connection for first-time setup
- A MiMo API key (free tier available)
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
| Command | What It Does | Example |
|---|---|---|
/ask | Reads code and answers questions | /ask "How does the routing work?" |
/edit | Generates and applies code changes | /edit "Add pagination to the user list endpoint" |
/run | Executes a command and interprets output | /run "Find all TypeScript errors" |
/debug | Analyzes error output and suggests fixes | /debug "Tests fail with: [paste output]" |
/architect | Designs 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:
/askactivates the research agent/editactivates the implementation agent/debugactivates the debug agent/architectactivates the design agent
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:
- Project structure and key files
- Architecture decisions
- Previously discovered bugs and fixes
- User preferences (your preferred coding style)
The memory persists across sessions. You can commit .mimo/memory.json to Git for team-wide context sharing.
Advanced Tips
- Pin context:
/pin src/core/*.tsβ keep specific files always in context - Change model mid-session:
/model mimo-v2.5-proβ switch to the flagship model for complex tasks - Custom instructions: Create
.mimo/instructions.mdβ MiMo reads this file at session start for project-specific conventions - Verbose mode:
mimo --verboseβ shows which files are loaded and model tokens used
Next Steps
- Read the MiMo Code deep dive for architecture details
- Set up Claude Code + MiMo for an alternative coding agent experience
- Browse the FAQ for troubleshooting