convez.ai
AgenteAutomaçãoIntermediário
Ahmedmk11

SpecGen

Ahmedmk11/spec-gen

Gerador automático de testes pytest com análise e refinamento via multi-agentes

Ver no GitHub
InicialPluginScore · de 0 a 100

Sistema multi-agente que gera, analisa e refina suites de testes pytest para código Python automaticamente. Integra-se ao VS Code oferecendo geração de testes com um clique, usando pipeline de múltiplos agentes LLM para garantir qualidade e cobertura.

Instalação

$npx convez-ai Ahmedmk11/spec-gen

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
1
Forks
0
Acompanhando
0
Saúde
42%
Último commit
há 7 meses
Versão
—
Issues abertas
0
Contribuidores
1

Casos de uso

  • Gerar suites de testes para funções e classes Python existentes
  • Aumentar cobertura de testes em projetos legados
  • Validar qualidade de testes através de análise automática

Veredito

Ferramenta prática que reduz boilerplate de testes através de automação inteligente. A abordagem multi-agente (gerar → analisar → refinar) é robusta, mas depende da qualidade da API Anthropic e requer VS Code para máximo proveito.

README

A tradução para o português deste README ainda está na fila.

SpecGen

An AI-powered test generation tool for Python. Point it at any Python file and get a complete pytest test suite — generated, analyzed, and refined automatically.

Python License Anthropic


Table of Contents


Screenshots

CodeLens Button on Functions and Classes

Output Test File


Prerequisites

  • Python 3.13+
  • An Anthropic API key
  • VS Code with the SpecGen extension installed

Installation

Backend

# macOS / Linux
git clone https://github.com/Ahmedmk11/spec-gen.git
cd spec-gen
python -m venv .venv
source .venv/bin/activate
pip install -e .

# Windows (PowerShell)
git clone https://github.com/Ahmedmk11/spec-gen.git
cd spec-gen
python -m venv .venv
.venv\Scripts\Activate.ps1
pip install -e .

VS Code Extension

Clone the extension repo and run:

git clone https://github.com/Ahmedmk11/spec-gen-vscode.git
cd spec-gen-vscode
npm install
npm run compile
code --extensionDevelopmentPath=$(pwd)

Configuration

Create a .env file in the project root:

ANTHROPIC_API_KEY=your_api_key_here
ANTHROPIC_MODEL=claude-sonnet-4-6

Usage

  1. Start the backend server:
cd spec-gen
uv run uvicorn src.main:app --reload
  1. Open any Python project in VS Code
  2. Click the ⚡ Generate Tests button above any function or class, or right-click a .py file and select Generate Tests with SpecGen
  3. Enter the path where the test file should be saved
  4. Wait for the tests to be generated and written to your project

How It Works

SpecGen uses a multi-agent pipeline to produce high-quality tests:

  1. Generate — an LLM generates a pytest test suite for the provided code
  2. Analyze — a second LLM reviews the tests for correctness, coverage, and meaningful assertions
  3. Refine — if the tests are lacking, a third LLM fixes the specific issues identified
  4. The analyze → refine loop runs up to 3 times until the tests are accepted
Ver o original no GitHub

Bom para

Relacionados