Skip to main content

๐Ÿงช 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.

Supported languages: JavaScript, TypeScript, and Python. The CLI auto-detects the project language from the target directory.


๐Ÿ“Œ 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โ€‹

  1. You specify a target file or folder using --target-directory ./src/utils or --target-directory ./src/utils/math.ts
  2. The CLI scans the target recursively if it's a folder, or focuses on the single file if specified
  3. Runs your configured coverage command
  4. Identifies low or zero-covered functions
  5. Generates tests using AI (Jest, Mocha, etc.)
  6. Optionally commits results (AUTO_COMMIT=true)

Command: early generate-for-project Configure via CLI flags or environment variables


๐Ÿ” Requirementsโ€‹


๐Ÿงช 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. Python projects additionally require pip install py-agent in the CI environment.


โญ๏ธ What's Next?โ€‹