QA Agent CLI
AI-powered code quality analysis tool for local repositories.
Features
- 🔍 Scan local codebases for bugs, security vulnerabilities, and maintainability issues
- 🤖 AI-powered analysis using Google Gemini
- 📊 Quality score calculation
- 📄 Export reports as JSON or PDF
- 🎯 Risk explanations with "What can go wrong?" analysis
Installation
# 1. Clone or download this folder
cd qa-agent
# 2. Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# 3. Install dependencies
pip install -r requirements.txt
# 4. Set your Gemini API key
export GEMINI_API_KEY="your-api-key-here"
# On Windows: set GEMINI_API_KEY=your-api-key-here
Usage
Basic Scan
python qa_agent.py scan ./path/to/your/repo
With Options
# Export JSON report
python qa_agent.py scan ./repo --output report.json
# Export PDF report
python qa_agent.py scan ./repo --pdf report.pdf
# Scan specific file types only
python qa_agent.py scan ./repo --extensions py,js,ts
# Set quality threshold (exit code 1 if below)
python qa_agent.py scan ./repo --threshold 70
# Verbose output
python qa_agent.py scan ./repo --verbose
CI/CD Integration
# Use as quality gate (fails if score < threshold)
python qa_agent.py scan ./repo --threshold 80 --output report.json
echo $? # 0 = passed, 1 = failed
Get Your API Key
- Go to Google AI Studio
- Create a new API key
- Set it as environment variable:
export GEMINI_API_KEY="your-key"
Supported File Types
- Python:
.py - JavaScript:
.js,.jsx - TypeScript:
.ts,.tsx - Config files:
.json,.yaml,.yml,.env - Web:
.html,.css
Output Example
╔══════════════════════════════════════════════════════════════╗
║ QA AGENT SCAN REPORT ║
╠══════════════════════════════════════════════════════════════╣
║ Repository: ./my-project ║
║ Files Scanned: 24 ║
║ Quality Score: 73/100 ║
╠══════════════════════════════════════════════════════════════╣
║ Issues Found: 8 ║
║ 🔴 High: 2 | 🟡 Medium: 4 | 🟢 Low: 2 ║
╚══════════════════════════════════════════════════════════════╝
License
MIT
Metadata
Release files for qa-agent-cli 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| qa_agent_cli-1.0.0.tar.gz | 13.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| qa_agent_cli-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 25.8 kB
Release files / qa_agent_cli-1.0.0.tar.gz
| Download URL | qa_agent_cli-1.0.0.tar.gz |
|---|---|
| Size | 13.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7352aef843006bdfe133fdd7b46cb20b1f6acadb2a6834b0e86c6abc62b4a89f
|
|
BLAKE2b-256 checksum How to use checksums |
9a11e3bcf2ebe6f59edcf5e38aa42ff593be3130a23545a631b6fc9c117a28ba
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|
Release files / qa_agent_cli-1.0.0-py3-none-any.whl
| Download URL | qa_agent_cli-1.0.0-py3-none-any.whl |
|---|---|
| Size | 12.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ae712cf4bf531e44bb777d79b2b03d44370980e4336767615d7bc6b091122535
|
|
BLAKE2b-256 checksum How to use checksums |
7fc9660e34e46c083df30210026d2bb3d2c73b09d9e5a1d2ce691e3533279fcf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|