🛠️ Troubleshooting — Early Repo CLI (early generate-for-project)
This guide covers problems specific to the Early project CLI used in repo-level test generation. It complements the shared troubleshooting guide → which includes solutions for tokens, memory, Jest, and commit errors.
❌ No Test Files Generated
This can happen for several different reasons, ranging from configuration or permissions issues to already-covered code.
- JavaScript / TypeScript
- Python
Please go through the checklist step by step in 👉 Why No Tests Were Generated
That guide explains every possible cause — including missing CLI installation, coverage command failures, validation errors, SCM permissions, and more — along with how to fix each one.
Common causes for Python projects:
- No
.pyfiles found — Verify that--target-directorypoints to a valid Python file or folder containing.pyfiles - No testable functions — The agent generates tests for top-level functions and class methods. Files with only imports, constants, or type definitions will be skipped
- py-agent not installed — Make sure
py-agentis installed:pip install py-agent - API key or token issues — Verify your
--api-keyand--tokenare valid
🔑 API Key Missing or Invalid
🔐 Token Invalid or SCM Commit Fails
See Token Missing or Insufficient Permissions →
🐍 py-agent Not Found (Python)
If you see an error like py-agent is not installed, install it with:
pip install py-agent
The py-agent package is required in addition to the @earlyai/cli npm package when generating tests for Python projects.
💥 Out of Memory or Crashes
Note: This section applies to JavaScript/TypeScript projects only.
See Concurrency and Performance →
🛑 Git Commit Fails
Note: Auto-commit is currently supported for JavaScript/TypeScript projects only. Python support for auto-commit is coming soon.
Ensure:
GIT_USER_NAMEandGIT_USER_EMAILare set- You're not using a shallow checkout
📚 More Help
👉 Next: Repo CLI FAQ