โ 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_TOKENto install@earlyai/clifrom GitHub PackagesTOKENfor 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 sourcerootFolderโ inside roottests/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?โ
| Command | Use Case | Requires PR Context | Typical Use |
|---|---|---|---|
generate-pr | Per-pull-request generation | โ Yes | GitHub PRs |
generate-commit | For single commits | โ No | GitHub push, Jenkins |
generate-folder | Repo folder-based generation | โ No | Coverage campaigns |
Compare: When to Use Which Agent โ
๐ Still need help?โ
- Email us: support@startearly.ai
- View the Central FAQ โ