Review, test and document your Python code with Google Gemini — three developer agents in one clean CLI.
AI Dev Copilot bundles three focused agents behind a single command:
| Agent | What it does |
|---|---|
| 🔍 Reviewer | Structured review — bugs, security, performance, style, with concrete fixes |
| 🧪 Tester | Generates a ready-to-run pytest suite (happy paths, edge cases, errors) |
| 📝 Documenter | Writes a professional README and adds Google-style docstrings |
Run them individually, or run all to review + test + document a file in one pass.
Most "AI agent" demos are single throwaway scripts, each reinventing its own LLM plumbing. AI Dev Copilot is built like a small product instead:
- One shared Gemini client (
llm.py) — consistent config, one place to change models. - Pure, tested helpers — AST-based structure extraction and fence-stripping are unit-tested with no API key required, so CI stays green and free.
- Zero-setup demo — every command falls back to a bundled example file, so you can try it before wiring up your own code.
- Proper packaging — installable, with a
devcopilotentry point,rufflinting and CI across Python 3.10–3.12.
git clone https://github.com/Meriam-Inoubli/ai-dev-copilot.git
cd ai-dev-copilot
python -m venv .venv && source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -e .
cp .env.example .env # then paste your free Gemini keyGet a free key at aistudio.google.com/app/apikey.
# Try it instantly on the bundled demo (no --file needed)
devcopilot review
# Point it at your own code
devcopilot review --file path/to/app.py
devcopilot test --file path/to/app.py --output tests/test_app.py
devcopilot doc --file path/to/app.py --mode readme
devcopilot all --file path/to/app.pyfrom ai_dev_copilot import review_code, generate_tests, generate_readme
code = open("app.py").read()
print(review_code(code)) # markdown review
open("test_app.py", "w").write(generate_tests(code, "app"))
open("README_app.md", "w").write(generate_readme(code, "app.py"))src/ai_dev_copilot/
├── llm.py # single Gemini client (system + user prompt → text)
├── utils.py # pure helpers: AST outline, code-fence stripping (unit-tested)
├── reviewer.py # 🔍 review_code()
├── tester.py # 🧪 generate_tests()
├── documenter.py # 📄 generate_readme() + add_docstrings()
└── cli.py # devcopilot: review | test | doc | all
Each agent is just a focused prompt over the shared client — easy to read, extend, or swap the model.
| Variable | Default | Description |
|---|---|---|
GEMINI_API_KEY |
— | Your Gemini API key (required for live calls) |
GEMINI_MODEL |
gemini-2.0-flash |
Model override |
pip install -e ".[dev]"
pytest -v # runs offline — no API key needed
ruff check .The three agent ideas were inspired by the excellent 500 AI Agents Projects collection (MIT). This project reimplements them from scratch on Gemini, unified into one tested, installable package.
MIT © 2026 Meriam Inoubli