╔══════════════════════════════════════════════╗
║ ║
║ ⟩⟨ S A R M A D ⟩⟨ ║
║ Self-Learning CLI Orchestrator ║
║ GitHub Copilot Engine · RAG · Multi-Model ║
║ v1.0.0 ║
╚══════════════════════════════════════════════╝
The first CLI orchestrator that learns from every command it runs.
Powered by GitHub Copilot CLI · Built for power users who live in the terminal.
Sarmad (⟩⟨) is a self-learning CLI orchestrator that sits on top of GitHub Copilot CLI and amplifies it into a fully autonomous multi-model command pipeline. It learns your codebase, organizes terminal operations with RAG context injection, chains multiple Copilot invocations intelligently, and delivers a premium branded experience — all from a single command.
$ sarmad
PS C:\Users\ssl55> ⟩⟨ build a REST API with auth and tests, deploy to Docker
[⟩⟨] ⟩▸────────────────────⟨ invoking copilot (claude-sonnet-4.6) · 3s ↑
╔══ Analysis ════════════════════════════════════╗
║ RAG context: 4 relevant files found ║
║ Plan: 7 steps · estimated 2 min ║
╚════════════════════════════════════════════════╝
✓ Created src/routes/auth.js
✓ Created src/middleware/jwt.js
✓ Created tests/auth.test.js
✓ Generated Dockerfile + docker-compose.yml
✓ Opened http://localhost:3000 in browser
[⟩⟨ done · 87.3s]
| Feature | Sarmad ⟩⟨ | Aider | Continue | Shell GPT |
|---|---|---|---|---|
| GitHub Copilot as engine | ✅ | ❌ | ❌ | ❌ |
| RAG codebase awareness | ✅ | ✅ | ✅ | ❌ |
| Multi-model pipeline | ✅ | ❌ | ✅ | ❌ |
| Auto-open HTML/URLs | ✅ | ❌ | ❌ | ❌ |
| Inline clipboard image paste | ✅ | ❌ | ❌ | ❌ |
| Branded REPL with animations | ✅ | ❌ | ❌ | ❌ |
| Windows-native (no WSL) | ✅ | |||
| Zero token cost | ✅ | ❌ | ❌ | ❌ |
| Abort mid-stream (ESC) | ✅ | ❌ | ❌ | ❌ |
| Self-learning via session history | ✅ | ❌ | ❌ | ❌ |
- Best-in-class models: Claude Sonnet 4.6, GPT-5.3-Codex, GPT-5.2 — all accessible via one subscription
- Native tool use: file read/write, shell commands, web fetch — all built-in, no custom wiring
- Managed safety: permission model, path verification, URL allowlisting — enterprise-grade
- No token metering anxiety: GitHub Copilot subscription = unlimited orchestration calls through Sarmad
- Infinite chaining: Sarmad can invoke Copilot CLI multiple times per user request, coordinating multiple specialist models (Analyzer → Executor → Visual Runner) with clean output merging
┌─────────────────────────────────────────────────────────┐
│ User Terminal │
│ PS C:\Users\ssl55> ⟩⟨ <your natural language> │
└────────────────────┬────────────────────────────────────┘
│
┌────────▼────────┐
│ REPL + Input │ ← Bracketed paste, raw mode
│ (input.js) │ ← Inline /img tokens
└────────┬────────┘ ← Double Ctrl+C, ESC abort
│
┌────────▼────────┐
│ RAG Engine │ ← Scans codebase in cwd
│ (rag.js) │ ← Injects relevant context
└────────┬────────┘ ← Learns from history
│
┌────────▼────────┐
│ Orchestrator │ ← Multi-model pipelines
│(orchestrator.js)│ ← Compliance testing
└────────┬────────┘ ← Specialist model routing
│
┌────────▼────────┐
│ Executor │ ← Windows-safe PS encoding
│ (executor.js) │ ← Animated streaming output
└────────┬────────┘ ← ESC-abortable processes
│
┌────────▼────────┐
│ GitHub Copilot │ ← copilot --allow-all
│ CLI Engine │ ← Any model, any tool
└─────────────────┘
User prompt
↓
RAG scans ~/.sarmad/history.json + codebase files
↓
Relevant context injected into Copilot system prompt
↓
Copilot executes (with tools: write, shell, web_fetch…)
↓
Result returned → stored in session history
↓
Next prompt benefits from this context (self-improving)
Prerequisites: Node.js 18+, GitHub Copilot CLI (npm install -g @github/copilot-cli or winget install GitHub.GitHubCopilotCLI)
git clone https://github.com/sbay-dev/sarmad.git
cd sarmad
npm install
npm link # makes `sarmad` available globallyVerify:
sarmad --version # ⟩⟨ Sarmad v1.0.0sarmadType any natural language request at the ⟩⟨ prompt.
sarmad -p "fix all TypeScript errors in src/"| Command | Description |
|---|---|
/help |
Show all commands |
/img |
Paste clipboard image as context (ASCII preview shown) |
/rag <query> |
Show RAG context for a query |
/model <name> |
Switch model (e.g. gpt-5.3-codex, claude-sonnet-4.6) |
/run <cmd> |
Run shell command directly |
/history |
Show recent session history |
/status |
Show current config |
/orchestrate <task> |
Run multi-model pipeline |
/exit |
Exit cleanly |
| Key | Action |
|---|---|
Enter |
Submit prompt |
ESC |
Abort running Copilot invocation |
Ctrl+C |
Clear line / hint |
Ctrl+C × 2 |
Exit |
↑ / ↓ |
Navigate history |
/img (typed) |
Inline image token from clipboard |
⟩⟨ the layout breaks like this /img please fix itSarmad replaces /img with a 4-char token [img:K3XM], shows a live ASCII preview above the line, and injects the full image context into Copilot when you press Enter.
Sarmad can chain specialized models for complex tasks:
/orchestrate build and deploy a microservice with full test coverage
Stage 1 — Analyzer (claude-sonnet-4.6) → Architecture plan
Stage 2 — Executor (gpt-5.3-codex) → Code generation + tests
Stage 3 — Reviewer (claude-sonnet-4.6) → Security + quality check
Each stage receives the previous stage's output as context, forming an intelligent pipeline where models critique and improve each other's work.
Config stored at ~/.sarmad/config.json:
{
"defaultModel": "gpt-5.3-codex",
"useRag": true,
"ragDepth": 5,
"copilotFlags": "--allow-all"
}See the Sarmad Project Board for full Kanban tracking.
Upcoming:
- Web UI dashboard for session history
- Plugin system (custom model providers)
- MCP server mode (expose Sarmad as an MCP tool)
- Cross-session learning with vector embeddings
- Team collaboration: shared RAG context
This project follows the Sarmad Contribution Guidelines.
All PRs require passing compliance tests: /orchestrate compliance.
MIT © sbay-dev
"The best CLI is the one that learns with you."
⟩⟨ S A R M A D ⟩⟨