Codebase Summary
Technical overview of the miu-mono monorepo structure and implementation.Project Structure
miu-core Modules
- Agents
- Providers
- Tools
- Patterns
miu_core.agents - Agent framework base classesmiu-code Tools
| Tool | Purpose | Parameters |
|---|---|---|
read | Read file contents | path: str |
write | Write new file | path: str, content: str |
edit | Modify existing file | path: str, old: str, new: str |
bash | Execute shell command | command: str |
glob | Find files by pattern | pattern: str |
grep | Search file contents | pattern: str, path: str |
TUI Components
Location:miu_code/tui/
StatusBar
StatusBar
Footer showing mode, path, and token usage with real-time updates during streaming.
Mode Management
Mode Management
Keyboard cycling through NORMAL → PLAN → ASK modes via shift+tab.
Session Control
Session Control
ctrl+n- New sessionctrl+l- Clear chatctrl+c- Quit
Usage Tracking
Mode Management
Dependencies
Core Framework
| Package | Purpose |
|---|---|
| pydantic≥2.0 | Data validation |
| httpx≥0.27 | Async HTTP |
| aiofiles≥23.0 | Async file ops |
| packaging≥24.0 | Version management |
Optional Providers
| Package | Provider |
|---|---|
| anthropic≥0.40 | Claude |
| openai≥1.50 | GPT |
| google-genai≥0.8 | Gemini |
| mcp≥1.0 | MCP support |
CLI/TUI
| Package | Purpose |
|---|---|
| textual≥1.0.0 | TUI framework |
| rich | Terminal formatting |
| asyncclick | CLI framework |
Development Setup
Build System
- Package Manager: UV with workspace management
- Build Backend: hatchling
- Type Checking: MyPy (strict mode)
- Linting: Ruff
- Testing: Pytest with asyncio