neta_cli
v0.1.2
Published
Next.js Exhaustive Testing Agent
Maintainers
Readme
NETA: Next.js Exhaustive Testing Agent
NETA is a CLI tool that automates the testing workflow for Next.js (App Router) projects. It generates unit, integration, and E2E tests using LLMs, sets up testing infrastructure, and enforces coverage thresholds.
Features
- Auto-Setup: Installs Vitest, Playwright, and configures them automatically.
- LLM-Powered Generation: Write tests for your Components, Pages, and Actions using local or cloud LLMs.
- Coverage Enforcement: Ensures your project meets specific coverage goals.
Installation
npm install -g neta_cliOr run directly with npx:
npx neta_cli --helpQuick Start
Initialize NETA in your Next.js project root:
npx neta initConfigure LLM Settings (Optional but recommended):
npx neta configFollow the prompts to select a provider (Local/OpenAI/Anthropic) and set your API key.
Generate Tests:
npx neta generate --mode changedCurrently supported modes:
changed(stub),all,file.Run Checks:
npx neta check
Configuration
NETA stores configuration in .neta.config.json.
Supported LLM Providers:
- Local: Uses local models (e.g., via Ollama/LocalAI). No API key required.
- OpenAI: Requires
OPENAI_API_KEY. - Anthropic: Requires
ANTHROPIC_API_KEY.
Note: Ensure
.neta.config.jsonis in your.gitignoreif you store API keys in it.
Commands
neta init: Scaffolds testing infrastructure.neta config: Interactively configure LLM provider and keys.neta generate: Generates tests.-m, --mode <mode>:all|file|changed-f, --file <path>: Specific file to test.--e2e: Enable E2E test generation (Playwright).--dry-run: Print generated code without writing.
neta check: Runs tests and validates coverage.
License
MIT
