Mango Pi Cli
Project description
Mangopi CLI
A lightweight, zero-dependency AI coding assistant running directly in your terminal.
Mangopi CLI is a local-first AI coding assistant inspired by tools like Claude Code, designed for developers who want a fast, hackable, and minimal runtime experience.
It provides an agentic coding workflow with:
- file editing
- shell execution
- tool calling
- autonomous goal execution
- context-aware conversation management
- automatic context compacting
All with instant startup and no heavyweight framework dependencies.
Features
- Zero dependency (Python standard library only)
- Instant startup speed
- Claude Code–style terminal UX
- OpenAI-compatible API support
- Built-in file and shell tools
- Autonomous Goal Mode
- Automatic context compacting
- Persistent local sessions
- Skill system support (
SKILL.md) - Safe shell execution checks
- Fully hackable and easy to extend
- Large-context optimized architecture
Installation
From PyPI
pip install mangopi-cli
Start Mangopi CLI:
mangopi-cli
From Source
git clone git@github.com:w4n9H/mangopi-cli.git
cd mangopi-cli
python mangopi_cli.py
Configuration
Required:
export MANGO_KEY="your_api_key"
Recommended:
export MANGO_API_URL="https://api.deepseek.com"
export MANGO_MODEL="deepseek-v4-flash"
Optional:
export MANGO_MAX_CONTEXT=1000000
export MANGO_LANG=zh
Supported Providers
Mangopi CLI supports:
- DeepSeek
- OpenAI-compatible APIs
- MiniMax
- Custom compatible endpoints
Example:
export MANGO_API_URL="https://api.openai.com/v1"
export MANGO_MODEL="gpt-4o-mini"
Usage
Start the CLI:
mangopi-cli
or:
python mangopi_cli.py
Built-in Commands
| Command | Description |
|---|---|
/q |
Quit |
/n |
Start a new session |
/c |
Compact current session |
/h |
Show help |
/g <goal> |
Autonomous goal execution mode |
Goal Mode
Goal Mode allows Mangopi CLI to autonomously:
- plan
- execute
- verify
- iterate
until the objective is fully completed.
Example:
/g build a fastapi todo app with tests
The agent will continue working until it determines the task is complete.
Built-in Tools
| Tool | Description |
|---|---|
read |
Read files |
write |
Write or overwrite files |
edit |
Replace exact strings in files |
search |
Search files using glob patterns |
grep |
Regex search through project files |
bash |
Execute shell commands |
use_skill |
Load installed skills |
attempt_completion |
Finish the current task |
Mangopi CLI can autonomously inspect files, modify code, search projects, and execute shell commands.
Skill System
Mangopi CLI supports reusable workflow skills.
Example structure:
~/.mangocli/skills/python_backend/
├── SKILL.md
├── scripts/
└── references/
Example SKILL.md:
---
description: Python backend workflow
tags: ["python", "backend"]
---
Use pytest for tests.
Prefer small functions.
The model can automatically discover and load relevant skills during execution.
Session Persistence
Sessions are stored locally:
.mangocli/session/session.json
Mangopi CLI automatically:
- restores previous sessions
- preserves important context
- compacts old conversations
- manages long-running workflows
Context Compacting
Mangopi CLI includes multiple compacting strategies:
- micro compact
- session memory compact
- conversation compact
- full LLM summary compact
This enables extremely long-running coding sessions while staying within model context limits.
Safety
Dangerous shell commands require confirmation before execution.
Examples include:
rm -rfmkfschmod 777sudo rm- destructive system operations
Architecture
Core components:
| Component | Responsibility |
|---|---|
Printer |
Terminal UI rendering |
ContextManager |
Conversation memory & compacting |
ToolBase |
Tool framework |
Provider |
API abstraction layer |
SystemPrompt |
Runtime prompt assembly |
SkillManager |
Skill discovery & loading |
Philosophy
Mangopi CLI focuses on:
- fast startup
- zero dependency
- local-first workflows
- terminal-native AI interaction
- lightweight runtime design
- simplicity over abstraction
- hackability over frameworks
No Electron. No Docker. No Redis. No heavyweight AI frameworks.
Just a fast and hackable AI coding assistant for the terminal.
License
Apache License 2.0
Author
Created by moofs.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mangopi_cli-0.1.17.tar.gz.
File metadata
- Download URL: mangopi_cli-0.1.17.tar.gz
- Upload date:
- Size: 43.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
37ec5b5122f6b4f4f34b772f221b63ca393d41758f00d9ff278333318256733d
|
|
| MD5 |
553ae27c2b0997662dccb6df4c625a06
|
|
| BLAKE2b-256 |
21992eca68cf22c28b800d19c864a8ccb00df1299cbfcbe472ba70407218d223
|
File details
Details for the file mangopi_cli-0.1.17-py3-none-any.whl.
File metadata
- Download URL: mangopi_cli-0.1.17-py3-none-any.whl
- Upload date:
- Size: 25.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c32576bfbdbda402e90def28dd7bc46635598c37efde61662cf4a6f2f3b55c46
|
|
| MD5 |
d79ec63b4ae18947eb41afafca247c47
|
|
| BLAKE2b-256 |
858b4529469f784ef53639dcfe2403f1732b19e88b94ef871b44af39ddf93ebd
|