Skip to main content

โš™๏ธ Configuration โ€” early generate-for-project

The early generate-for-project CLI command lets you boost coverage across a selected folder or file.
It accepts configuration via CLI flags or environment variables.

For memory, tokens, formatting, or concurrency guidance, refer to:


๐Ÿ”‘ Required Inputsโ€‹

VariableCLI FlagDescriptionRequiredDefault
API_KEY-k, --api-keyEarly API keyโœ… Yesโ€“
TOKEN-t, --tokenSCM token with repo write accessโœ… Yesโ€“
TARGET_DIRECTORY--target-directorydirectory or file to scan for untested codeโœ… Yesโ€“
REF_NAME--ref-nameGit branch name for commitโœ… Yesโ€“

โš™๏ธ Optional Inputsโ€‹

VariableCLI FlagDescriptionDefault
TEST_STRUCTURE-s, --test-structureFolder structure: siblingFolder or rootFolder.siblingFolder
TEST_FRAMEWORK-f, --test-frameworkTest framework: jest, mocha, etc.jest
TEST_FILE_SUFFIX--test-suffixTest file suffix (e.g. test, spec).test
TEST_FILE_NAMING--test-file-namingNaming style: camelCase, snake_case, kebab-case.camelCase
MAX_CONCURRENCY-c, --max-concurrencyParallel workers (1โ€“4). See Concurrency Guide4
AUTO_COMMIT--auto-commitCommit generated files: true or false.true
TEST_COMMAND--test-commandValidate tests via custom commandSee Agent Jest Commands โ†’
COVERAGE_COMMAND--coverage-commandCustom command to collect coverageSee Agent Jest Commands โ†’
CONTINUE-ON_TEST_ERRORS--continue-on-test-errorscontinue the operation if current tests fail.See Agent Jest Commands - tests fail โ†’
LINT_COMMAND--lint-commandLinting command. See Lint & Formatnpx --no eslint $early_filename --fix
PRETTIER_COMMAND--prettier-commandPrettier formatting command. See Lint & Formatnpx --no prettier $early_filename --write
GIT_ORG--git-orgGitHub org or usernameโ€“
GIT_REPO--git-repoGitHub repository nameโ€“
GIT_USER_EMAIL--git-user-emailCommit author email217573370+Early-Agent[bot]@users.noreply.github.com
GIT_USER_NAME--git-user-nameCommit author nameโ€“
SCM_PROVIDER--scm-providergithub, bitbucket, etc. See SCM Support

โš ๏ธ If using MAX_CONCURRENCY=4 (default), set NODE_OPTIONS for memory:

export NODE_OPTIONS="--max-old-space-size=5120"

If your repository enforces linting or formatting rules, you should define custom commands to align with them.

See this guide to see the defaults and how to change them if needed Agent Jest Commands โ†’


๐Ÿ’ก Example: CLI Invocationโ€‹

early generate-for-project \
--api-key <your_api_key> \
--token <your_github_token> \
--target-directory <path_to_file_or_directory> \
--ref-name <branch_name>

โœ… Best Practiceโ€‹

Prefer environment variables in CI for simplicity and safety.
Avoid logging secrets in plaintext.


๐Ÿ“š Next Stepsโ€‹