miu-code
AI coding agent with CLI and TUI. Provides an intelligent assistant for code exploration, generation, and manipulation through both command-line and terminal UI interfaces.
Quick Start
Installation
uv add miu-code
Usage
CLI Mode (one-shot query):
miu "read package.json"
miu -q "what's in the main.py file?"
miu --model openai:gpt-4o "help me debug this"
CLI Mode (interactive REPL):
miu
TUI Mode (Terminal UI):
miu-tui
Features
Code Tools
- Read - View file contents
- Write - Create new files
- Edit - Modify specific lines in files
- Glob - Pattern-based file discovery
- Grep - Content-based search
- Bash - Execute shell commands
Intelligence
- Powered by Claude Sonnet (or your chosen model)
- Multi-model support: Anthropic, OpenAI, Google, etc.
- ReAct reasoning with up to 20 iterations
- Session persistence across conversations
Interfaces
-
TUI - Responsive terminal UI with Textual framework
- Real-time streaming with auto-scroll
- Interruptible agent (Escape key)
- Mode system (ASK, NORMAL, PLAN) with safety levels
- Tool approval dialogs
- Message history navigation
-
CLI - Fast, scriptable command-line interface
- One-shot queries for automation
- Interactive REPL for exploration
- Slash command support (/cook, /commit, /plan)
- ACP server mode for editor integration
Architecture
miu-code/
├── agent/ → CodingAgent with ReAct reasoning
├── tools/ → Code manipulation tools (read, write, edit, etc.)
├── cli/ → asyncclick-based CLI entry point
├── tui/ → Textual-based Terminal UI
├── acp/ → Agent Communication Protocol server
├── session/ → Conversation persistence
└── commands/ → Slash command handlers
Configuration
Model Selection
Default: anthropic:claude-sonnet-4-20250514
Supported providers:
miu -m "anthropic:claude-opus-4-20251105" -q "your query"
miu -m "openai:gpt-4o" -q "your query"
miu -m "google:gemini-2.0-flash" -q "your query"
Session Management
miu -s session-123 # Resume session
miu --session new-id # Create new session
ACP Integration
miu --acp # Start ACP server for editor integration
TUI Key Bindings
| Key | Action |
|---|---|
| Ctrl+C | Quit |
| Ctrl+N | New session |
| Ctrl+L | Clear chat |
| Escape | Interrupt / Focus input |
| Shift+Tab | Cycle mode |
| Shift+Up/Down | Scroll chat |
| Up/Down (in input) | History navigation |
| Enter | Submit message |
Safety & Security
- Path traversal protection for file operations
- Tool approval system in TUI mode
- Configurable safety modes:
- ASK - Request approval for all tool use
- NORMAL - Auto-approve safe tools
- PLAN - Planning mode with warnings
Documentation
- Project Overview & PDR
- Code Standards
- System Architecture
- Codebase Summary
- TUI Design Guide
- Project Roadmap
Development
Python: >=3.11 License: MIT
Key Dependencies
miu-core[anthropic]- Agent frameworktextual>=1.0.0- TUI frameworkasyncclick>=8.1- Async CLIrich>=13.0- Rich terminal outputprompt-toolkit>=3.0- Advanced input handling
Contributing
- Follow Code Standards
- Run tests:
pytest tests/ - Check formatting:
ruff format . - Type check:
mypy miu_code/
Support
- Issues: GitHub issues
- Documentation: See
/docsfolder - Examples: Check
/miu_code/commandsfor slash command patterns
Metadata
Release files for miu-code 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| miu_code-1.0.0.tar.gz | 60.3 kB | Without provenance | Details for miu_code-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| miu_code-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for miu_code-1.0.0-py3-none-any.whl |
Total release size: 106.9 kB
Release files / miu_code-1.0.0.tar.gz
| Download URL | miu_code-1.0.0.tar.gz |
|---|---|
| Size | 60.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d75780488f6c4a20d8f46cf5b28d716716d74321ca083abf437b784082cbb922
|
|
BLAKE2b-256 checksum How to use checksums |
8559649a90e496b7afa54227c5dcabce7646e826dfb5759b1e7bc431174bceb1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / miu_code-1.0.0-py3-none-any.whl
| Download URL | miu_code-1.0.0-py3-none-any.whl |
|---|---|
| Size | 46.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b8e9651547d8a1aa74a33a3e2f6d03a768a73f53ba8585e878e1732e1178eae1
|
|
BLAKE2b-256 checksum How to use checksums |
9ed629bdfdc1b85c4c646dce18ceaee17804f2c934848cf0236593efad085529
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Security for miu-code 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.