Thanks for contributing.
ExplainThisRepo is a CLI that explains codebases using real project signals, not blind AI guessing.
The architecture is not symmetric.
- Python is the core system and source of truth
- PyInstaller builds the native binaries
- Node is a thin launcher for npm distribution
- .NET is also a thin launcher for dotnet tool distribution
If you misunderstand this, you will break the system.
All logic lives in Python. Node and .NET layer must remain a launcher.
This is the product.
It handles:
- Repository analysis (GitHub + local)
- Signal extraction (entrypoints, configs, manifests, structure)
- Dependency graph understanding
- Prompt construction
- LLM provider routing
- Output generation (
EXPLAIN.md, stdout, custom formats) - CLI flags and behavior
- Config and initialization (
init) - Diagnostics (
--doctor)
If behavior changes, it happens here.
Python is compiled into platform-specific executables:
- macOS
- Linux
- Windows
These binaries are what users actually run via npm.
This is distribution only.
Node does:
- Detect platform
- Select correct bundeled binary
- Execute it with user arguments
Node does NOT:
- Analyze repositories
- Read files
- Call LLMs
- Build prompts
- Detect stacks
- Handle config
If you add logic here, you are doing it wrong.
This is distribution only.
.NET does:
- Detect platform
- Select correct bundeled binary
- Execute it with user arguments
.NET does NOT:
- Analyze repositories
- Read files
- Call LLMs
- Build prompts
- Detect stacks
- Handle config
If behavior changes, it belongs in Python, not in the launchers.
Focus on the actual system, not the launchers.
- Improve signal extraction accuracy
- Better entrypoint detection
- Better handling of monorepos
- Reduce hallucination via stronger grounding
- Improve prompt construction
- Improve output clarity and structure
- Add or improve LLM providers
- Performance improvements (IO, parsing, API usage)
- Error handling and diagnostics
- Test coverage
- Adding logic to Node launcher
- Cosmetic abstractions that increase complexity
- Features that rely on guessing instead of signals
- Check existing issues or open one
- Keep PRs small and surgical
- Prefer correctness over cleverness
- Reduce edge cases, don't multiply them
- Don't introduce unnecessary dependencies
- Python 3.9+
- Node.js 18+
- .NET 8, 9, or 10
- pip
- npm
- make
git clone https://github.com/calchiwo/ExplainThisRepo.git
cd ExplainThisRepoThis is where you work.
make installmake devThis allows running the CLI directly from the local sourc
pip install -e .python -m explain_this_repo facebook/reactmake doctorEquivalent:
python -m explain_this_repo --doctormake testmake lintmake formatRuns:
blackisort
make buildMaintainers only:
Any change to core logic requires rebuilding binaries for all shipped targets.
Use the project build scripts and release workflow. Do not hand-edit bundled binaries
Use PyInstaller via project scripts:
make build-binariesRelease builds produce native binaries for npm, .NET, and GitHub Release assets from the same PyInstaller output.
The Node and .NET launchers both rely on bundled binaries, so release artifacts must match the target platform exactly.
- Platform detection fixes
- Binary resolution fixes
- Packaging improvements
- Business logic
- Feature additions
- CLI behavior changes
If you need any of those:
→ change Python
→ rebuild binaries
Providers are pluggable.
Each provider:
- Implements a common interface
- Is resolved via provider registry
- Must be deterministic in structure, not prompt guessing
Current providers include:
- Gemini
- OpenAI
- Ollama
- Anthropic
- Groq
- OpenRouter
- No provider-specific hacks leaking into core logic
- Keep interface clean and consistent
- Fail loudly and clearly
- Small, focused functions
- Explicit logic over cleverness
- Deterministic behavior > heuristic guessing
- Clear error messages
- Stable CLI output
Before submitting a PR, ensure::
- Change is necessary and scoped
- Tested locally
- Binaries rebuilt if core changed
- No logic added to Node or .NET layer
- Docs updated if behavior changed
Use Conventional Commits:
feat: add feature
fix: resolve bug
docs: update docs
refactor: internal change
chore: maintenance
Include:
- OS (Windows / macOS / Linux / Termux)
- Python version (if using pip)
- Node version (if using npm)
- Command executed
- Full error output
- Target repo (
owner/repo)
- Logic added to Node launcher
- Logic added to .NET launcher
- Features that bypass signal extraction
- Prompt hacks instead of system fixes
- Over-engineering simple paths
- Breaking CLI output consistency