QGo

QGo Logo # QGo โ€” The Most Advanced AI Coding Assistant **Created by [Rahul Chaube](https://github.com/Rahulchaube1)** **More powerful than Cursor. Smarter than Aider. Multi-Agent AI that lives in your terminal.** [![CI](https://github.com/Rahulchaube1/QGo/actions/workflows/ci.yml/badge.svg)](https://github.com/Rahulchaube1/QGo/actions/workflows/ci.yml) [![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/) [![License: Apache-2.0](https://img.shields.io/badge/License-Apache--2.0-green.svg)](LICENSE) [![Models: 50+](https://img.shields.io/badge/models-50+-purple.svg)](#-supported-models) [![Agents: 8](https://img.shields.io/badge/agents-8-orange.svg)](#-multi-agent-system) [![Copyright: Rahul Chaube](https://img.shields.io/badge/copyright-Rahul%20Chaube-blueviolet.svg)](#-copyright) > *"The AI coding assistant that thinks like a team of senior engineers."* > โ€” Rahul Chaube

โœจ Features

Feature Description
๐Ÿค– Multi-LLM OpenAI, Anthropic Claude, DeepSeek, Gemini, Groq, Mistral, Ollama (local), and any litellm-supported model
๐Ÿ—บ๏ธ Repo Map Automatically maps your entire codebase so the AI understands structure and context
โœ๏ธ Smart Editing 4 editing formats: SEARCH/REPLACE blocks, whole-file, unified diffs, architect mode
๐Ÿ—๏ธ Architect Mode Two-pass: strong model plans โ†’ fast model implements
๐Ÿ‘ฅ Multi-Agent System 8 specialist agents (Planner, Coder, Reviewer, Tester, Debugger, DocWriter, Security, Refactor) work collaboratively
๐Ÿ”€ Git Integration Auto-commits, diffs, undo, branch management
๐ŸŽจ Beautiful UI Rich terminal output with syntax highlighting, Markdown rendering, live streaming
๐Ÿ’ฌ Interactive REPL Full-featured REPL with history, tab completion, multi-line input
๐ŸŒ Web Context Fetch any URL and add it as context (/web https://...)
๐Ÿ“Ž Clipboard Paste clipboard content into the conversation (/paste)
๐Ÿ” Auto Lint Automatically run your linter after each edit; ask AI to fix errors
๐Ÿงช Auto Test Run your test suite and fix failures automatically
๐Ÿ”’ Security Audit Dedicated security agent audits your code for vulnerabilities
โš™๏ธ Configurable Project-level .qgo.conf + user-level ~/.qgo.conf + env vars
๐Ÿ”Œ Local Models Full Ollama support โ€” run llama3, codellama, mistral, qwen locally
๐Ÿ“ฆ 100+ Languages Python, JS/TS, Go, Rust, Java, C/C++, Ruby, PHP, Swift, Kotlin, and more

๐Ÿ‘ฅ Multi-Agent System

QGoโ€™s multi-agent system is what sets it apart. Instead of a single AI trying to do everything, QGo orchestrates a team of 8 specialist agents that collaborate like a real engineering team:

User Request
     โ”‚
     โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     Plans sub-tasks
โ”‚ ๐Ÿ“‹ PLANNER  โ”‚โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                                              โ”‚
                                                             โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚โš™๏ธ CODER โ”‚  โ”‚๐Ÿ” REVIEW โ”‚  โ”‚๐Ÿงช TEST โ”‚  โ”‚๐Ÿ› DEBUG  โ”‚  โ”‚๐Ÿ”’ SECURI-โ”‚
โ”‚         โ”‚  โ”‚          โ”‚  โ”‚        โ”‚  โ”‚          โ”‚  โ”‚   TY     โ”‚
โ””โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”˜
     โ”‚             โ”‚            โ”‚             โ”‚              โ”‚
     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                     โ”‚
                              โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”
                              โ”‚ ๐Ÿ“ DOC +    โ”‚
                              โ”‚ โ™ป๏ธ REFACTOR  โ”‚
                              โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                     โ”‚
                              โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”
                              โ”‚  Final      โ”‚
                              โ”‚  Report     โ”‚
                              โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
Agent Icon Speciality
Planner ๐Ÿ“‹ Decomposes tasks into ordered sub-tasks, assigns to specialists
Coder โš™๏ธ Writes clean, production-quality code with type hints
Reviewer ๐Ÿ” Reviews for correctness, performance, and best practices
Tester ๐Ÿงช Writes comprehensive pytest suites with edge cases
Debugger ๐Ÿ› Root-cause analysis and minimal bug fixes
DocWriter ๐Ÿ“ Google-style docstrings, README sections, inline comments
Security ๐Ÿ”’ Audits for injections, path traversal, exposed secrets, CVEs
Refactor โ™ป๏ธ Improves structure (DRY, SRP, naming) without breaking behaviour

Multi-Agent Usage

# Run full multi-agent pipeline (auto-plans and executes)
qgo agent "add authentication to the Flask API"

# Run a specific agent directly
qgo agent --agent coder "implement pagination for list_users()"
qgo agent --agent security "audit auth.py for vulnerabilities"
qgo agent --agent tester "write tests for the payment module"

# Interactive: use /agent command in REPL
[QGo] > /agent add rate limiting to the API

๐Ÿš€ Installation

pip install qgo

Or install from source for the latest features:

git clone https://github.com/Rahulchaube1/QGo
cd QGo
pip install -e .

โšก Quick Start

# Interactive session (most common)
qgo

# One-shot command
qgo "add docstrings to all functions in utils.py"

# Add specific files to context
qgo --file main.py --file utils.py "refactor the error handling"

# Use a specific model
qgo --model claude-3-7-sonnet-20250219
qgo --model deepseek/deepseek-chat
qgo --model ollama/llama3.2 --api-base http://localhost:11434

๐Ÿ”‘ Setting Your API Key

# OpenAI
export OPENAI_API_KEY=sk-...

# Anthropic
export ANTHROPIC_API_KEY=sk-ant-...

# DeepSeek
export DEEPSEEK_API_KEY=sk-...

# Google Gemini
export GEMINI_API_KEY=...

# Or pass directly
qgo --api-key sk-... --model gpt-4o

๐Ÿ’ป Usage

Interactive Mode

[QGo] > /add src/main.py src/utils.py
โœ“ Added: src/main.py
โœ“ Added: src/utils.py

[QGo] > add type hints to all functions

QGo is thinking...

# ... AI edits the files with SEARCH/REPLACE blocks ...
๐Ÿ“ฆ Committed: a1b2c3d4  add type hints to all functions

[QGo] > /diff
# shows the diff...

[QGo] > /undo
โœ“ Undid last commit (changes kept in working tree)

One-Shot Mode

# Fix a bug
qgo --file main.py "fix the null pointer exception in parse_config()"

# Add a feature
qgo --file api.py --file models.py "add pagination to the list_users endpoint"

# Write tests
qgo --file calculator.py "write comprehensive pytest tests for all functions"

# Explain code
qgo --file complex_algo.py "explain what this algorithm does"

Architect Mode (for large tasks)

# Uses a strong model to plan, then a fast model to implement
qgo --edit-format architect "implement a REST API with authentication"

๐Ÿ“ Edit Formats

Format Flag Best For
editblock --edit-format editblock Default. Most reliable. SEARCH/REPLACE blocks
whole --edit-format whole Small files. Complete file replacement
udiff --edit-format udiff When you need standard unified diffs
architect --edit-format architect Complex multi-file changes. Two-pass approach

๐Ÿค– Supported Models

Provider Models
OpenAI gpt-4o, gpt-4o-mini, gpt-4-turbo, o1, o1-mini, o3-mini
Anthropic claude-3-7-sonnet, claude-3-5-sonnet, claude-3-opus, claude-3-haiku
DeepSeek deepseek-chat, deepseek-coder, deepseek-r1
Google gemini-1.5-pro, gemini-1.5-flash, gemini-2.0-flash
Groq llama3-8b, llama3-70b, mixtral-8x7b (ultra-fast)
Mistral mistral-large, codestral
Cohere command-r, command-r-plus
Ollama llama3.2, codellama, mistral, qwen2.5-coder, deepseek-coder-v2 (local)
# List all models
qgo models

# List by provider
qgo models --provider anthropic

๐ŸŽฎ REPL Commands

Command Description
/add <files> Add files to context (supports globs: /add src/*.py)
/drop <files> Remove files from context
/files List files currently in context
/diff Show uncommitted git diff
/commit [msg] Manually commit changes
/undo Undo last git commit (keeps changes)
/clear Clear conversation history
/model <name> Switch to a different model
/models List all available models
/tokens Show token usage estimate
/map Show repository map
/run <cmd> Run a shell command, add output to context
/web <url> Fetch a URL and add content to context
/git <cmd> Run any git command
/paste Paste clipboard content into conversation
/ls [path] List directory contents
/config Show current configuration
/help Show help
/exit Exit QGo

โš™๏ธ Configuration

QGo reads configuration from (highest priority first):

  1. CLI flags
  2. Environment variables (QGO_*)
  3. Project-level .qgo.conf
  4. User-level ~/.qgo.conf

.qgo.conf Example

model: claude-3-7-sonnet-20250219
edit_format: editblock
auto_commits: true
show_diffs: true
map_tokens: 2048
auto_lint: true
lint_cmd: ruff check
auto_test: false
test_cmd: pytest
stream: true

Environment Variables

Variable Description
QGO_MODEL Default model
QGO_API_KEY API key
QGO_API_BASE Custom API base URL
QGO_EDIT_FORMAT Edit format
QGO_AUTO_COMMITS Enable/disable auto-commits
QGO_MAP_TOKENS Max tokens for repo map
QGO_AUTO_LINT Enable auto-linting
QGO_LINT_CMD Linter command
QGO_AUTO_TEST Enable auto-testing
QGO_TEST_CMD Test command

๐Ÿ—๏ธ Architecture

qgo/
โ”œโ”€โ”€ agents/                 # Multi-agent orchestration system
โ”‚   โ”œโ”€โ”€ orchestrator.py     # Coordinates all agents (AgentOrchestrator)
โ”‚   โ”œโ”€โ”€ base_agent.py       # Abstract BaseAgent, AgentMessage, AgentResult
โ”‚   โ””โ”€โ”€ specialist_agents.py # Planner, Coder, Reviewer, Tester, Debugger, DocWriter, Security, Refactor
โ”œโ”€โ”€ llm/                    # Universal LLM backends
โ”‚   โ”œโ”€โ”€ litellm_provider.py # 100+ models via litellm
โ”‚   โ”œโ”€โ”€ model_info.py       # Model metadata & costs
โ”‚   โ””โ”€โ”€ streaming.py        # Streaming response handling
โ”œโ”€โ”€ coders/                 # Code editing engines
โ”‚   โ”œโ”€โ”€ base_coder.py       # Core chat+edit loop
โ”‚   โ”œโ”€โ”€ editblock_coder.py  # SEARCH/REPLACE (default)
โ”‚   โ”œโ”€โ”€ whole_coder.py      # Full file replacement
โ”‚   โ”œโ”€โ”€ udiff_coder.py      # Unified diff
โ”‚   โ””โ”€โ”€ architect_coder.py  # Two-pass plan+implement
โ”œโ”€โ”€ repo/                   # Repository understanding
โ”‚   โ”œโ”€โ”€ repo_map.py         # Codebase symbol mapping
โ”‚   โ”œโ”€โ”€ git_repo.py         # Git operations
โ”‚   โ””โ”€โ”€ file_watcher.py     # Live file watching
โ”œโ”€โ”€ ui/                     # Terminal user interface
โ”‚   โ”œโ”€โ”€ terminal.py         # Rich-based I/O
โ”‚   โ”œโ”€โ”€ repl.py             # Interactive REPL
โ”‚   โ””โ”€โ”€ commands.py         # Slash-command handler
โ”œโ”€โ”€ utils/                  # Utilities
โ”‚   โ”œโ”€โ”€ file_utils.py       # File operations + diffs
โ”‚   โ”œโ”€โ”€ token_counter.py    # tiktoken-based counting
โ”‚   โ””โ”€โ”€ web_scraper.py      # URL fetching
โ”œโ”€โ”€ config.py               # Configuration management
โ”œโ”€โ”€ models.py               # Data types
โ””โ”€โ”€ main.py                 # CLI entry point

๐Ÿ”ง Development

# Clone and install dev dependencies
git clone https://github.com/Rahulchaube1/QGo
cd QGo
pip install -e ".[dev]"

# Run tests
pytest tests/ -v

# Lint
ruff check qgo/

# Format
black qgo/ tests/

๐Ÿค Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Add tests for new features
  4. Run ruff check and pytest before submitting
  5. Open a pull request

๐Ÿ“„ License

Apache 2.0 โ€” see LICENSE for details.


QGo is created and maintained by Rahul Chaube.

Copyright (c) 2024 Rahul Chaube. All Rights Reserved.

Licensed under the Apache License, Version 2.0.
You may obtain a copy of the License at:
    http://www.apache.org/licenses/LICENSE-2.0

Author:  Rahul Chaube
GitHub:  https://github.com/Rahulchaube1
Project: https://github.com/Rahulchaube1/QGo

All source files, documentation, assets, and configuration in this repository are the intellectual property of Rahul Chaube. The QGo name, logo, and branding are owned by Rahul Chaube.


QGo
**QGo โ€” The AI coding assistant built by Rahul Chaube.** *ยฉ 2024 Rahul Chaube. All Rights Reserved.*