Agent IA en ligne de commande avec function calling, skills, sous-agents parallèles et sandbox.
pip install -r requirements.txt
cp ely.yaml.example ely.yaml # édite la clé API
# Linux: filesystem sandbox (optionnel)
sudo apt install bubblewrap # Debian/Ubuntu
sudo dnf install bubblewrap # Fedora
# macOS: sandbox-exec intégré
python cli.pypython cli.py # REPL
python cli.py "explique asyncio" # Single-shot
python cli.py --context code # Contexte
python cli.py --sandbox docker # Sandbox Docker
python cli.py --tui # UI plein écran interactive
python cli.py --telegram # Bot Telegram (long polling)Crée un bot avec @BotFather, puis configure telegram.token (et
telegram.allowed_users pour restreindre l'accès) dans ely.yaml :
telegram:
token: "123456:ABC-DEF..."
allowed_users: "123456789"Le bot supporte : agent complet (mêmes outils que le TUI), permissions
y/n/a en boutons inline, ?question, #bash, toutes les commandes slash,
documents joints, et un historique persistant par conversation.
| Input | Action |
|---|---|
texte |
Envoyé à l'agent |
?question |
LLM rapide sans tools |
#cmd |
Bash direct (pas de LLM) |
/help |
Commandes |
Tab |
Autocomplétion |
Sub-agents : task, task_parallel, plan — parallélisation avec contexte minimal.
Batch : bash_batch, http_batch — 1 tool call pour N commandes.
Skills : dossiers ~/.ely/skills/<nom>/ avec SKILL.md + tools/ + references/. Un seul actif à la fois. Format complet dans SKILLS.md.
File tools : read_file, write_file, edit_file (replace_line, replace_range, replace_text, insert_after, delete_range), list_directory, grep.
Sécurité : .. bloqué en bash, guard anti-injection, sandbox Docker, désactivation de tools par config.
Mémoire : compaction auto tous les 10 cycles. Diary : persistant, user-driven. Contextes : persistés, custom.
MCP : stdio + SSE, ely.yaml → mcp.servers.
provider:
type: openai # openai, ollama, lmstudio
model: gpt-4o-mini
api_key: "sk-..."
tools:
workspace: "."
bash_sandbox: direct
disabled: "" # "bash, bash_batch" → sans shellely/
├── agent.py, tools.py, providers.py # Core
├── subagent.py, planner.py # Sous-agents
├── skills.py, contexts.py, memory.py # Skills & état
├── slash.py # Registre de commandes slash
├── cli_ui.py, tui.py # REPL classique + TUI plein écran
├── telegram.py # Bot Telegram
├── webapp/ # Webapp FastAPI + SSE
├── mcp.py, guard.py, prompts.py # Infra
ely_rust/ # Port Rust
Le port Rust (ely_rust/) offre le REPL, les tools (bash, read_file, write_file,
list_directory, grep, web_search, web_fetch), MCP stdio, les permissions y/n/a
et les skills.
# Installer Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Compiler (binaire dans ely_rust/target/release/ely)
cd ely_rust
cargo build --release
# Utiliser
./target/release/ely # REPL
./target/release/ely "explique asyncio" # Single-shot
./target/release/ely --config ../ely.yaml # Config du projet (provider, workspace…)Les commandes slash, l'historique (~/.ely/chat_history.json) et les skills
sont partagés avec la version Python.