π§ͺ Repo CLI Agent β For Repository-Wide Coverage
The Early CLI for Repository lets you generate unit tests for individual files or entire folders in your codebase β making it the fastest way to raise coverage across legacy code, specific modules, or large areas of your app.
π When to Useβ
Use the Repo CLI Agent when:
- You want a one-time coverage boost across a folder
- You're onboarding a legacy service or utility layer
- You want to run weekly or monthly coverage maintenance
- Youβre using GitHub, Bitbucket, or another supported SCM
- You want to integrate with Jenkins, CircleCI, or GitHub Actions
β When to Use Which Agent β
βοΈ How It Worksβ
- You specify a target file or folder using
--target-directory ./src/utilsor--target-directory ./src/utils/math.ts - The CLI scans the target recursively if itβs a folder, or focuses on the single file if specified
- Runs your configured coverage command
- Identifies low or zero-covered functions
- Generates tests using AI (Jest, Mocha, etc.)
- Optionally commits results (
AUTO_COMMIT=true)
β Command: early generate-for-project
β Configure via CLI flags or environment variables
π Requirementsβ
To use this agent:
- β Node.js v20+
- β CLI installed from NPM Packages β NPM Installation β
- β
A valid
API_KEY - β
A valid
TOKENwith commit permissions β Token Setup β - β
Set the
SCM_PROVIDERto match your platform β SCM Support β - β Memory-safe defaults β Memory Tuning β
- β Optionally limit parallelism β Concurrency Guide β
π§ͺ First Integration Stepβ
See full setup here β Integration Guide
early generate-for-project \
--target-directory ./src/api \
--token $TOKEN \
--api-key $API_KEY \
--ref-name main
π¦ Supported CI/CD Platformsβ
- β GitHub Actions
- β Jenkins
- β CircleCI
- β GitLab CI
- β Self-hosted CI tools
All platforms must support Node.js 20 and repo access.