Skip to main content

โ“ Frequently Asked Questions โ€” Repo CLI

This page covers common questions about using the early generate-folder command to generate tests across an entire folder.


๐Ÿ”‘ Where do I get my API key?โ€‹

Contact support@startearly.ai to obtain your API key.
Store it securely in your CI system (e.g., EARLY_API_KEY in GitHub Actions or Jenkins).

See: Central FAQ โ†’


๐Ÿ” What tokens are required?โ€‹

You need:

  • NPM_TOKEN to install @earlyai/cli from GitHub Packages
  • TOKEN for Git access (reading files, committing, commenting)

Details and permissions: Token Guide โ†’
FAQ reference: Central FAQ SCM โ†’ and Central FAQ SCM โ†’


๐Ÿงช Do I need to configure coverage myself?โ€‹

No. The CLI runs your test framework (e.g., Jest) to collect coverage.
You can customize the command via --coverage-command and --test-command.

See: Optional inputs โ†’

More: Central FAQ Test Frameworks โ†’


๐Ÿ“ฆ Can I use this in Jenkins or other CI/CD?โ€‹

Yes โ€” the CLI supports GitHub Actions, Jenkins, CircleCI, GitLab, and more.

See CI examples Integration Guide - GitHub example โ†’ and Jenkins example โ†’


๐Ÿ“ Where are test files placed?โ€‹

You control this via --test-structure:

  • siblingFolder โ†’ next to source
  • rootFolder โ†’ inside root tests/ folder

๐Ÿงช Can I run this manually?โ€‹

Yes โ€” you can run it locally or via npx:

npx @earlyai/cli generate-folder \
--folder ./src \
--ref-name main \
--token $TOKEN \
--api-key $API_KEY

Your machine needs to be configured to work with git and your SCM.


๐Ÿงน What about Prettier or ESLint?โ€‹

Define:

LINT_COMMAND="npx --no eslint $early_filename --fix"
PRETTIER_COMMAND="npx --no prettier $early_filename --write"

Reference: Central FAQ - Lint Formatting โ†’


๐Ÿงต How is this different from generate-pr or generate-commit?โ€‹

CommandUse CaseRequires PR ContextTypical Use
generate-prPer-pull-request generationโœ… YesGitHub PRs
generate-commitFor single commitsโŒ NoGitHub push, Jenkins
generate-folderRepo folder-based generationโŒ NoCoverage campaigns

Compare: When to Use Which Agent โ†’


๐Ÿ†˜ Still need help?โ€‹