ExplainThisRepo is a CLI developer tool to explain any GitHub repository in plain English
npm install explainthisrepoEXPLAIN.md file for immediate reading.
bash
git clone https://github.com/calchiwo/ExplainThisRepo.git
cd ExplainThisRepo/node_version
`
2. Install Dependencies
`bash
npm install
`
3. Set Up Environment Variables
Create a .env file in the root directory or export the variable directly in your terminal:
`bash
export GEMINI_API_KEY=your_actual_api_key_here
`
4. Build the Project
Compile the TypeScript source code into executable JavaScript:
`bash
npm run build
`
5 Link the command globally:
`bash
npm link
`
Usage
Once the project is built, you can use the CLI tool to analyze any public GitHub repository.
$3
Execute the tool by passing the owner/repo string as an argument:
`bash
node dist/cli.js facebook/react
`
$3
1. The tool fetches the repository description and README from GitHub.
2. It processes the information and sends a structured prompt to the Gemini AI.
3. An EXPLAIN.md file is generated in your current working directory containing:
- Project Overview
- Functional Breakdown
- Target User Identification
- Setup/Execution Instructions
$3
- npm run build: Compiles TypeScript to the dist folder.
- npm run format: Formats the codebase using Prettier.
- npm start`: Runs the tool (requires the repository argument).