Skip to main content

๐Ÿงช CLI PR Agent โ€” For Pull Requests Outside GitHub Actions

The Early CLI for Pull Requests provides AI-powered test generation for teams using Jenkins, CircleCI, Bitbucket Pipelines, and other CI/CD systems outside GitHub Actions. It mirrors the GitHub Action behavior โ€” analyzing PR diffs, generating unit tests, and committing them โ€” but gives you full control over how and where it runs.

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


๐Ÿ“Œ When to Useโ€‹

Use the CLI PR Agent when:

  • Your CI system is not GitHub Actions (e.g., Jenkins, CircleCI)
  • You want to run test generation for pull requests
  • You need custom workflows or enhanced control over timing and environments
  • You're integrating with Bitbucket, GitHub, or other supported SCMs

When to Use Which Agent โ†’


โš™๏ธ How It Worksโ€‹

  1. Triggered from your CI on PR open/update
  2. CLI detects PR-diffed files
  3. Runs coverage using your configured test command
  4. Identifies untested functions
  5. Generates AI-based Jest tests
  6. Commits results (if AUTO_COMMIT=true)
  7. Optionally posts a PR comment or updates the PR summary

Uses the early generate-pr command Configure via CLI flags or environment variables


๐Ÿ” Requirementsโ€‹


๐Ÿงช First Integration Stepโ€‹

Integration Guide โ†’

Start with installing the CLI and passing the required environment variables to your CI.

npm install -g @earlyai/cli
early generate-pr

๐Ÿง  Available Commandsโ€‹

CommandDescription
early generate-prGenerate tests for a pull request
early generate-commitGenerate tests for a specific commit
early generate-folderGenerate tests for an entire folder

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