AI-powered code quality analysis tool using Groq Llama
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
qa_agent_cli-1.0.0.tar.gz
(13.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file qa_agent_cli-1.0.0.tar.gz.
File metadata
- Download URL: qa_agent_cli-1.0.0.tar.gz
- Upload date:
- Size: 13.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7352aef843006bdfe133fdd7b46cb20b1f6acadb2a6834b0e86c6abc62b4a89f
|
|
| MD5 |
e3816b93d12c13329e4d767a9c96a1be
|
|
| BLAKE2b-256 |
9a11e3bcf2ebe6f59edcf5e38aa42ff593be3130a23545a631b6fc9c117a28ba
|
File details
Details for the file qa_agent_cli-1.0.0-py3-none-any.whl.
File metadata
- Download URL: qa_agent_cli-1.0.0-py3-none-any.whl
- Upload date:
- Size: 12.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ae712cf4bf531e44bb777d79b2b03d44370980e4336767615d7bc6b091122535
|
|
| MD5 |
7d0605918e94f7eb9460c6120916b977
|
|
| BLAKE2b-256 |
7fc9660e34e46c083df30210026d2bb3d2c73b09d9e5a1d2ce691e3533279fcf
|