dt-cli: 100% Open Source RAG/MAF/LLM Development System
A comprehensive development assistance system combining Retrieval-Augmented Generation (RAG), Multi-Agent Framework (MAF), and configurable LLM backends - completely open source and free.

Overview
dt-cli is a powerful development assistant that provides:
- Intelligent code search using semantic RAG with AST-based chunking
- Automated debugging with multi-agent error analysis
- Code review with security checks and quality scoring
- Knowledge graph for dependency tracking and impact analysis
- Quality evaluation using RAGAS metrics
- Hybrid search combining semantic and keyword algorithms
- Three interaction modes: Claude Code plugin, Interactive TUI, or REST API
100% Free & Open Source - No API keys required for local LLMs (Ollama, vLLM)
Key Features
Advanced RAG System
- AST-Based Chunking: Intelligent code parsing using tree-sitter for Python, JavaScript, TypeScript
- BGE Embeddings: Instruction-aware embeddings for better code understanding
- Auto-Trigger: Automatic determination of when to use RAG vs. direct LLM
- Intent Classification: Semantic routing based on query intent
Agentic Debugging
- Error Analysis: Automatic root cause identification from stack traces
- Fix Suggestions: Multi-step reasoning for proposed fixes
- Security Checks: Detection of SQL injection, XSS, and OWASP Top 10 vulnerabilities
- Code Review: Quality scoring (0-10) with severity-categorized issues
Knowledge Graph
- Dependency Tracking: What does this code depend on?
- Impact Analysis: What breaks if I change this?
- Usage Finding: Where is this function/class used?
- Relationship Mapping: Full code relationship graph
Quality Evaluation
- RAGAS Metrics: Context relevance, answer faithfulness, answer relevance
- Hybrid Search: BM25 + semantic search with tunable weights
- A/B Testing: Compare different RAG configurations
- Performance Metrics: Query time, cache hit rate, confidence scores
Three Interaction Modes
1. Claude Code Plugin (MCP)
# Auto-configured via .claude/mcp-config.json
# Use dt-cli tools seamlessly in Claude Code conversations
2. Intelligent Interactive CLI ⭐ ENHANCED
python src/cli/interactive.py
# Natural language interface with intelligent context awareness
# Hierarchical session memory across CLI restarts
# Auto-discovers project files for enhanced context
# 10+ slash commands for power users
NEW Features in Interactive CLI:
- Session History with Hierarchical Memory - Conversations persist across sessions with intelligent compression
- Context-Aware Queries - Automatically includes relevant project files in queries
- Smart File Discovery - Indexes your project automatically for better context
- Natural Language Input - Just type what you need, no menu navigation required
- Conversation Continuity - Resume from where you left off, even days later
- Importance Scoring - Critical conversations are never forgotten
3. REST API
# Start server
python src/mcp_server/standalone_server.py
# Use API
curl http://localhost:8765/query -X POST -d '{"query": "..."}'
Quick Start
Prerequisites
Installation
Quick Setup (Recommended - Uses Virtual Environment)
# Clone repository
git clone https://github.com/ItMeDiaTech/dt-cli.git
cd dt-cli
# Run automated setup script
./setup-venv.sh
# Activate virtual environment
source venv/bin/activate
# Start interactive TUI
python dt-cli.py
Alternative: Manual Installation
On modern Linux distributions (Ubuntu 24.04+, Debian 12+), you must use a virtual environment due to PEP 668:
# Option A: Use the automated script (recommended)
./setup-venv.sh
# Option B: Manual virtual environment setup
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
That's it! The system is ready to use.
Note: Always activate the virtual environment with source venv/bin/activate before running dt-cli.
First Steps
Option 1: Interactive TUI
python dt-cli.py
# Choose from the menu:
# 1. Ask a Question
# 2. Debug an Error
# 3. Review Code
# etc.
Option 2: Start Server for API/Claude Code
# Start the server
python src/mcp_server/standalone_server.py
# Server runs on http://localhost:8765
# Claude Code will auto-detect via .claude/mcp-config.json