Skip to main content

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

  1. Go to Google AI Studio
  2. Create a new API key
  3. 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


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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

qa_agent_cli-1.0.0-py3-none-any.whl (12.3 kB view details)

Uploaded Python 3

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

Hashes for qa_agent_cli-1.0.0.tar.gz
Algorithm Hash digest
SHA256 7352aef843006bdfe133fdd7b46cb20b1f6acadb2a6834b0e86c6abc62b4a89f
MD5 e3816b93d12c13329e4d767a9c96a1be
BLAKE2b-256 9a11e3bcf2ebe6f59edcf5e38aa42ff593be3130a23545a631b6fc9c117a28ba

See more details on using hashes here.

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

Hashes for qa_agent_cli-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ae712cf4bf531e44bb777d79b2b03d44370980e4336767615d7bc6b091122535
MD5 7d0605918e94f7eb9460c6120916b977
BLAKE2b-256 7fc9660e34e46c083df30210026d2bb3d2c73b09d9e5a1d2ce691e3533279fcf

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page