Analyze any GitHub repository and generate a comprehensive AI-ready report in seconds.
One command. Full codebase. Ready for AI.
|
Stop manually copying files to share with AI. This tool scans any GitHub repository and creates a single, well-structured text file containing the entire codebase โ perfectly formatted for ChatGPT, Claude, Gemini, and other AI assistants. ุจุทูู ุชูุณุฎ ุงูู ููุงุช ูุงุญุฏ ูุงุญุฏ. ุงูุฃุฏุงุฉ ุฏู ุจุชุญูู ุฃู ู ุณุชูุฏุน ุนูู GitHub ูุจุชุทูุนูู ู ูู ูุงุญุฏ ููู ูู ุงูุฃููุงุฏ โ ุฌุงูุฒ ุชุจุนุชู ููุฐูุงุก ุงูุงุตุทูุงุนู ู ุจุงุดุฑุฉ. |
One command โ works in Google Colab, Kaggle, or any terminal:
!git clone https://github.com/YousefAutomates/repo-analyzer.git && cd repo-analyzer && pip install -q -r requirements.txt && python run.pyThat's it. The tool will guide you through the rest interactively.
This tool scans any GitHub repository and generates a single comprehensive TXT file containing:
| Section | What's Included |
|---|---|
| ๐ Repository Info | Name, description, stars, forks, license, topics, visibility |
| ๐ณ Project Structure | Complete visual directory tree |
| ๐ Statistics | Total lines of code, file sizes, language breakdown |
| ๐ฆ Dependencies | Parsed from requirements.txt, package.json, go.mod, etc. |
| ๐ ALL Source Code | Full content of every text file with syntax highlighting |
| ๐ฅ Contributors | Who contributed and how many commits |
| ๐ Commit History | Latest changes with authors and dates |
| ๐ค AI Token Estimate | Shows compatibility with GPT-4, Claude, Gemini context windows |
| ๐ AI Prompt Template | Ready-to-use instructions for your AI request |
When you want AI to understand, modify, or build upon an existing project, you need to share the complete codebase. Manually copying dozens of files is:
- โฐ Time-consuming โ especially for large projects
- ๐ต Error-prone โ you might miss important files
- ๐ Unstructured โ AI loses context without proper organization
- ๐ Uncertain โ you don't know if it fits the AI's context window
This tool does everything automatically in seconds:
1. ๐ Run the analyzer on any GitHub repo
2. ๐ Get a single, perfectly structured TXT file
3. ๐ Copy and paste into your AI assistant
4. ๐ฌ Add your request (modify, explain, fix, improve)
5. โจ Get AI-powered results!
| Feature | Description |
|---|---|
| ๐ Secure Token Input | Token is hidden when you type (uses getpass) |
| ๐ Environment Variables | Supports GITHUB_TOKEN env variable |
| ๐งน Memory Cleanup | Token is cleared from memory after use |
| โ Permission Check | Validates token scopes before scanning |
| Feature | Description |
|---|---|
| ๐ Auto Retry | Automatically retries failed API requests (3 attempts) |
| โณ Rate Limit Handling | Detects rate limits and waits automatically |
| ๐ Connection Recovery | Handles network timeouts gracefully |
| Clear, helpful error messages for every situation |
| Feature | Description |
|---|---|
| ๐งฎ Token Estimation | Estimates token count for AI context windows |
| ๐ฆ Dependency Parsing | Analyzes requirements.txt, package.json, go.mod, etc. |
| ๐ซ Smart Filtering | Automatically skips node_modules, pycache, .git, etc. |
| ๐ Size Limits | Configurable max file size (default 500KB) |
| ๐ท๏ธ File Categorization | Groups files by language/type |
| Feature | Description |
|---|---|
| โก Smart Defaults | Optimal settings out of the box โ just press Enter |
| ๐ 3 Modes | Public repo, private repo, or browse your repos |
| ๐ฟ Branch Selection | Analyze any branch, not just main |
| ๐ Repo Browser | Search, filter, and paginate through your repos |
| โฌ๏ธ Auto Download | File downloads automatically in Colab/Kaggle |
| AI Model | Context Window | Status |
|---|---|---|
| GPT-3.5 Turbo | 16K tokens | โ Small projects |
| GPT-4 / GPT-4o | 128K tokens | โ Most projects |
| Claude 3.5 Sonnet | 200K tokens | โ Large projects |
| Gemini 1.5/2.0 | 1M tokens | โ Very large projects |
Choice: 1
Repository: facebook/react
That's it! No authentication needed for public repos.
Choice: 2
Token: ghp_xxxxxxxxxxxx (hidden input)
Repository: mycompany/private-api
Choice: 3
Token: ghp_xxxxxxxxxxxx (hidden input)
โ Shows your repos with search, filter, and pagination
โ Select by number
- Go to github.com/settings/tokens
- Click "Generate new token (classic)"
- Give it a name (e.g., "repo-analyzer")
- Select scopes:
- โ
repoโ Full control (required for private repos) - โ
read:userโ Read user info (optional)
- โ
- Click "Generate token"
- Copy the token immediately (you won't see it again!)
๐ก Tip: For public repos only, you don't need a token at all!
๐ก Tip: You can set the
GITHUB_TOKENenvironment variable to skip the input prompt.
Run the tool and get your TXT file.
Open the TXT file, copy ALL content, and paste it into your AI assistant.
After pasting, add your specific request:
I've shared my complete project above. Please:
1. Explain how the authentication flow works
2. Find any security vulnerabilities
3. Add rate limiting to the API endpoints
4. Write unit tests for the user module
5. Suggest performance improvements
Please provide the modified code for each change.
| Use Case | Description |
|---|---|
| ๐ Code Review | Ask AI to review the entire codebase for bugs and improvements |
| ๐ Documentation | Generate comprehensive docs from the code |
| ๐ Security Audit | Find vulnerabilities and security issues |
| ๐งช Test Generation | Auto-generate unit tests for all modules |
| ๐ Language Conversion | Convert a Python project to JavaScript (or vice versa) |
| ๐ Learning | Understand how an open-source project works |
| ๐ Onboarding | Help new developers understand the codebase quickly |
| ๐๏ธ Architecture Review | Get AI feedback on project structure and design patterns |
| ๐ Comparison | Generate reports for 2 projects and ask AI to compare them |
| โป๏ธ Refactoring | Get suggestions for cleaner, more maintainable code |
repo-analyzer/
โโโ run.py # Entry point with dependency management
โโโ requirements.txt # Python dependencies
โโโ LICENSE # MIT License
โโโ README.md # This file
โโโ .gitignore # Git ignore rules
โโโ analyzer/ # Main package
โโโ __init__.py # Package init (version info)
โโโ github_client.py # GitHub API client with retry & rate limiting
โโโ repo_scanner.py # Repository scanning & file analysis
โโโ report_generator.py # AI-ready report generation
โโโ file_exporter.py # TXT export with auto-download
โโโ main.py # Interactive CLI application
| Setting | Default | Description |
|---|---|---|
| Output Format | TXT | Best for AI consumption |
| Max File Size | 500 KB | Skip files larger than this |
| Max Files | 500 | Limit total files to scan |
| Include Contents | Yes | Include full source code |
| Include Stats | Yes | Include statistics section |
| Include Commits | Yes | Include commit history |
| Include Contributors | Yes | Include contributors list |
| Auto Download | Yes | Download file in Colab/Kaggle |
These directories are automatically excluded from scanning:
node_modules/ __pycache__/ .git/ vendor/
venv/ dist/ build/ .idea/
.vscode/ coverage/ .tox/ .terraform/
| Variable | Description |
|---|---|
GITHUB_TOKEN |
GitHub personal access token (skips input prompt) |
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ RepoAnalyzerApp โ
โ (main.py) โ
โ Interactive CLI Interface โ
โโโโโโโโโโโฌโโโโโโโโโโโฌโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโค
โ GitHub โ Repo โ Report โ File โ
โ Client โ Scanner โ Generator โ Exporter โ
โ โ โ โ โ
โ โข Auth โ โข Tree โ โข Header โ โข TXT Export โ
โ โข Retry โ โข Filter โ โข Stats โ โข Auto-DL โ
โ โข Rate โ โข Scan โ โข Code โ โข Colab โ
โ โข API โ โข Stats โ โข Tokens โ โข Kaggle โ
โโโโโโโโโโโดโโโโโโโโโโโดโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโ
| Authentication | Rate Limit |
|---|---|
| No token | 60 requests/hour |
| With token | 5,000 requests/hour |
The tool automatically handles rate limiting. If you hit the limit, it will wait and retry.
| Package | Purpose |
|---|---|
requests |
HTTP requests to GitHub API |
rich |
Enhanced terminal output (optional) |
Can I analyze private repositories?
Yes! Use Mode 2 or Mode 3 with a GitHub token that has repo scope.
What if the repo is too large for AI?
The tool shows token estimates and compatibility with each AI model. For very large repos, consider:
- Reducing max file size
- The tool automatically skips binary files and common junk directories
- Use a model with a larger context window (Gemini 1.5 Pro supports 1M tokens)
Is my token safe?
Yes. The token is:
- Hidden during input (not displayed on screen)
- Cleared from memory after the scan completes
- Never stored to disk or logged
- You can also use the
GITHUB_TOKENenvironment variable
What file formats are supported?
The tool generates TXT files, which are the most compatible format for AI assistants. The report includes markdown-style code blocks with syntax highlighting hints.
Can I use this on my local machine?
Yes! Clone the repo and run python run.py in your terminal. It works on Windows, macOS, and Linux.
Does it work with GitLab or Bitbucket?
Currently, only GitHub repositories are supported. GitLab and Bitbucket support is planned for future versions.
- Core repository scanning
- AI-ready TXT report generation
- Token estimation & AI compatibility check
- Dependency analysis
- Secure token handling
- Auto retry & rate limit handling
- Smart directory filtering
- Auto-download in Colab/Kaggle
- Local repository analysis (without GitHub)
- Markdown report format
- Custom ignore patterns (.analyzerignore)
- GitLab & Bitbucket support
- Command-line arguments (non-interactive mode)
- Report splitting for very large repos
- Web interface (Streamlit)
- Direct AI API integration
- VS Code extension
- GitHub Action
Contributions are welcome! Feel free to:
- ๐ด Fork this repository
- ๐ฟ Create a feature branch (
git checkout -b feature/amazing-feature) - ๐พ Commit your changes (
git commit -m 'Add amazing feature') - ๐ค Push to the branch (
git push origin feature/amazing-feature) - ๐ Open a Pull Request
This project is licensed under the MIT License โ see the LICENSE file for details.
ุฃู ุฑ ูุงุญุฏ โ ูุดุชุบู ูู Google Colab ุฃู Kaggle ุฃู ุฃู Terminal:
!git clone https://github.com/YousefAutomates/repo-analyzer.git && cd repo-analyzer && pip install -q -r requirements.txt && python run.pyูุจุณ ูุฏู! ุงูุฃุฏุงุฉ ูุชูุฌูู ุฎุทูุฉ ุจุฎุทูุฉ.
ุงูุฃุฏุงุฉ ุจุชุนู ู ุชุญููู ุดุงู ู ูุฃู ู ุณุชูุฏุน ุนูู GitHub ูุจุชุทูุน ู ูู TXT ูุงุญุฏ ููู ูู ุญุงุฌุฉ:
| ุงููุณู | ุงูู ุญุชูู |
|---|---|
| ๐ ู ุนููู ุงุช ุงูู ุณุชูุฏุน | ุงูุงุณู ูุงููุตู ูุงููุฌูู ูุงูููุฑูุงุช ูุงูุฑุฎุตุฉ ูุงูุชูุจููุงุช |
| ๐ณ ูููู ุงูู ุดุฑูุน | ุดุฌุฑุฉ ุงูู ุฌูุฏุงุช ูุงูู ููุงุช ูุงู ูุฉ |
| ๐ ุฅุญุตุงุฆูุงุช | ุนุฏุฏ ุฃุณุทุฑ ุงูููุฏ ูุฃุญุฌุงู ุงูู ููุงุช ูุงููุบุงุช ุงูู ุณุชุฎุฏู ุฉ |
| ๐ฆ ุงูู ูุชุจุงุช | ุชุญููู requirements.txt ู package.json ูุบูุฑูู |
| ๐ ูู ุงูุฃููุงุฏ | ู ุญุชูู ูู ู ูู ููุฏ ุจุงููุงู ู ู ุน ุชูุณูู syntax |
| ๐ฅ ุงูู ุณุงูู ูู | ู ูู ุณุงูู ูุจูุงู commit |
| ๐ ุณุฌู ุงูุชุนุฏููุงุช | ุขุฎุฑ ุงูุชุนุฏููุงุช ุจุงูู ุคูู ูุงูุชุงุฑูุฎ |
| ๐ค ุชูุฏูุฑ ุงูุชูููุงุช | ูู ุงูู ูู ููุฏุฎู ูู GPT-4 ููุง Claude ููุง Gemini |
| ๐ ูุงูุจ ููู AI | ุชุนููู ุงุช ุฌุงูุฒุฉ ุชูุชุจ ูููุง ุทูุจู |
ูู ุง ุชุญุจ ุชุทูุจ ู ู ุงูุฐูุงุก ุงูุงุตุทูุงุนู ูููู ุฃู ูุนุฏูู ู ุดุฑูุนุ ู ุญุชุงุฌ ุชุจุนุชูู ูู ุงูุฃููุงุฏ. ูุณุฎ ุงูู ููุงุช ูุงุญุฏ ูุงุญุฏ:
- โฐ ุจูุงุฎุฏ ููุช ูุชูุฑ โ ุฎุตูุตุงู ุงูู ุดุงุฑูุน ุงููุจูุฑุฉ
- ๐ต ู ู ูู ุชูุณู ู ููุงุช โ ูุชุถูุน ุงูุณูุงู
- ๐ ู ุด ู ูุธู โ ุงูู AI ู ุด ููููู ุจุฏูู ุชูุธูู
- ๐ ู ุด ู ุชุฃูุฏ โ ูู ุงูููุฏ ููุฏุฎู ูู context ุงูู AI ููุง ูุฃ
ุงูุฃุฏุงุฉ ุฏู ุจุชุนู ู ูู ุฏู ุฃูุชูู ุงุชูู ูู ุซูุงูู:
1. ๐ ุดุบูู ุงูุฃุฏุงุฉ ุนูู ุฃู ุฑูุจู
2. ๐ ูุชุงุฎุฏ ู
ูู TXT ูุงุญุฏ ู
ูุธู
3. ๐ ุงูุณุฎ ุงูู
ุญุชูู ูู ChatGPT / Claude / Gemini
4. ๐ฌ ุงูุชุจ ุทูุจู (ุนุฏููุ ุงุดุฑุญุ ุตููุญุ ุญุณูู)
5. โจ ุฎุฏ ุงููุชูุฌุฉ!
- ๐ ุงูุชููู ู ุฎูู โ ู ุด ุจูุธูุฑ ูุฃูุช ุจุชูุชุจู
- ๐ Environment Variable โ ู ู ูู ุชุญุท ุงูุชููู ูู ู ุชุบูุฑ ุจูุฆุฉ
- ๐งน ุชูุธูู ุงูุฐุงูุฑุฉ โ ุงูุชููู ุจูุชู ุณุญ ุจุนุฏ ุงูุงุณุชุฎุฏุงู
- ๐ ุฅุนุงุฏุฉ ุงูู ุญุงููุฉ โ ูู ุงูุงุชุตุงู ูุดู ุจูุญุงูู 3 ู ุฑุงุช
- โณ Rate Limit โ ุจูุณุชูู ุชููุงุฆูุงู ูู ูุตู ููุญุฏ ุงูุฃูุตู
- ๐ ุงุณุชูุฑุงุฑ โ ุจูุชุนุงู ู ู ุน ู ุดุงูู ุงูุดุจูุฉ ุจุฐูุงุก
- ๐งฎ ุชูุฏูุฑ ุงูุชูููุงุช โ ุจูุญุณุจูู ูู ุงูู ูู ููุฏุฎู ูู ุงูู AI ููุง ูุฃ
- ๐ฆ ุชุญููู ุงูู ูุชุจุงุช โ ุจููุฑุฃ requirements.txt ู package.json
- ๐ซ ููุชุฑุฉ ุฐููุฉ โ ุจูุชุฌุงูู node_modules ู pycache ุชููุงุฆูุงู
- โก ุฅุนุฏุงุฏุงุช ู ุซุงููุฉ โ ุจุณ ุงุถุบุท Enter ููู ูุดุชุบู
- ๐ 3 ุฃูุถุงุน โ ุฑูุจู ุนุงู ุฃู ุฎุงุต ุฃู ุชุตูุญ ุฑูุจูุฒุงุชู
- โฌ๏ธ ุชุญู ูู ุชููุงุฆู โ ุงูู ูู ุจููุฒู ุฃูุชูู ุงุชูู ูู Colab
- ุฑูุญ ุนูู github.com/settings/tokens
- ุงุถุบุท "Generate new token (classic)"
- ุณู ููู (ู ุซูุงู "repo-analyzer")
- ุงุฎุชุงุฑ ุงูุตูุงุญูุงุช:
- โ
repoโ ุชุญูู ูุงู ู (ูุงุฒู ููุฑูุจูุฒ ุงูุฎุงุตุฉ)
- โ
- ุงุถุบุท "Generate token"
- ุงูุณุฎ ุงูุชููู ููุฑุงู (ู ุด ููุธูุฑูู ุชุงูู!)
๐ก ููุฑูุจูุฒ ุงูุนุงู ุฉ ู ุด ู ุญุชุงุฌ ุชููู ุฎุงูุต!
ุดุบูู ุงูุฃุฏุงุฉ ูุฎุฏ ู ูู ุงูู TXT.
ุงูุชุญ ุงูู ูู ูุงูุณุฎ ูู ุงูู ุญุชูู ูุงูุตูู ูู ChatGPT ุฃู Claude ุฃู Gemini.
ุจุนุฏ ู ุง ุชูุตู ุงูู ุญุชููุ ุงูุชุจ ุงููู ุนุงูุฒู:
ุฏู ู
ุดุฑูุนู ุงููุงู
ู ุจูู ุงูุฃููุงุฏ. ุนุงูุฒ:
1. ุงุดุฑุญูู ุฅุฒุงู ุงูู authentication ุจูุดุชุบู
2. ุฏููุฑ ุนูู ุฃู ู
ุดุงูู ุฃู
ููุฉ
3. ุฃุถู rate limiting ููู API
4. ุงูุชุจูู unit tests ููู user module
5. ุงูุชุฑุญ ุชุญุณููุงุช ููุฃุฏุงุก
ุงุฏููู ุงูููุฏ ุงูู
ุนุฏูู ููู ุชุบููุฑ.
| ุงูุงุณุชุฎุฏุงู | ุงููุตู |
|---|---|
| ๐ ู ุฑุงุฌุนุฉ ุงูููุฏ | ุงูู AI ูุฑุงุฌุนูู ุงูููุฏ ููู ูููุงูู ุงูุฃุฎุทุงุก |
| ๐ ุชูุซูู ุชููุงุฆู | ููููุฏูู documentation ูุงู ูุฉ ู ู ุงูููุฏ |
| ๐ ูุญุต ุฃู ูู | ูุฏููุฑ ุนูู ุงูุซุบุฑุงุช ุงูุฃู ููุฉ |
| ๐งช ูุชุงุจุฉ Tests | ููุชุจูู unit tests ููู ุงูู ูุฏูููุงุช |
| ๐ ุชุญููู ุงููุบุฉ | ูุญูููู ุงูู ุดุฑูุน ู ู Python ูู JavaScript ุฃู ุงูุนูุณ |
| ๐ ุชุนููู | ูุดุฑุญูู ุฅุฒุงู ู ุดุฑูุน open source ุจูุดุชุบู |
| ๐ Onboarding | ูุณุงุนุฏ ุงูู ุทูุฑูู ุงูุฌุฏุฏ ูููู ูุง ุงูููุฏ ุจุณุฑุนุฉ |
| ๐๏ธ ู ุฑุงุฌุนุฉ ู ุนู ุงุฑูุฉ | ูุฏูู ุฑุฃูู ูู ุจููุฉ ุงูู ุดุฑูุน |
| โป๏ธ Refactoring | ููุชุฑุญ ููุฏ ุฃูุธู ูุฃุณูู ูู ุงูุตูุงูุฉ |
ูู ููุฏุฑ ูุญูู ุฑูุจูุฒ ุฎุงุตุฉุ
ุฃููุง! ุงุณุชุฎุฏู
ุงููุถุน 2 ุฃู 3 ู
ุน ุชููู GitHub ุนูุฏู ุตูุงุญูุฉ repo.
ูู ุงูุฑูุจู ูุจูุฑ ุฃููุ
ุงูุฃุฏุงุฉ ุจุชุนุฑุถ ุชูุฏูุฑ ุงูุชูููุงุช ูุชูุงูู ูู AI. ููุฑูุจูุฒ ุงููุจูุฑุฉ ุฌุฏุงู:
- ุงูุฃุฏุงุฉ ุจุชุชุฌุงูู ุงูู ููุงุช ุงูุซูุงุฆูุฉ ูุงูู ุฌูุฏุงุช ุงูุบูุฑ ู ูู ุฉ ุชููุงุฆูุงู
- ู ู ูู ุชููู ุญุฌู ุงูู ูู ุงูุฃูุตู
- ุงุณุชุฎุฏู Gemini 1.5 Pro (ุจูุฏุนู ู ูููู ุชููู)
ูู ุงูุชููู ุจุชุงุนู ุขู ูุ
ุฃููุง! ุงูุชููู:
- ู ุด ุจูุธูุฑ ุนูู ุงูุดุงุดุฉ ูุฃูุช ุจุชูุชุจู
- ุจูุชู ุณุญ ู ู ุงูุฐุงูุฑุฉ ุจุนุฏ ุงูุงุณุชุฎุฏุงู
- ู ุด ุจูุชุญูุธ ุนูู ุงููุงุฑุฏ ููุง ุจูุชุณุฌู ูู ุฃู log
ุจูุดุชุบู ุนูู GitLab ุฃู Bitbucketุ
ุญุงููุงู ุจูุฏุนู GitHub ุจุณ. ุฏุนู GitLab ู Bitbucket ู ุฎุทุท ูู ุงููุณุฎ ุงููุงุฏู ุฉ.
- ุชุญููู ุงูู ุณุชูุฏุนุงุช ุงูุฃุณุงุณู
- ุชูุฑูุฑ TXT ุฌุงูุฒ ููู AI
- ุชูุฏูุฑ ุงูุชูููุงุช ูุงูุชูุงูู
- ุชุญููู ุงูู ูุชุจุงุช
- ุฃู ุงู ุงูุชููู
- ุฅุนุงุฏุฉ ุงูู ุญุงููุฉ ุงูุชููุงุฆูุฉ
- ููุชุฑุฉ ุงูู ุฌูุฏุงุช ุงูุฐููุฉ
- ุชุญู ูู ุชููุงุฆู ูู Colab/Kaggle
- ุชุญููู ู ุณุชูุฏุนุงุช ู ุญููุฉ
- ุชูุฑูุฑ ุจุตูุบุฉ Markdown
- ุฃูู ุงุท ุชุฌุงูู ู ุฎุตุตุฉ (.analyzerignore)
- ุฏุนู GitLab ู Bitbucket
- ูุถุน ุณุทุฑ ุงูุฃูุงู ุฑ (ุจุฏูู ุชูุงุนู)
- ุชูุณูู ุงูุชูุงุฑูุฑ ุงููุจูุฑุฉ
- ูุงุฌูุฉ ููุจ (Streamlit)
- ุฑุจุท ู ุจุงุดุฑ ู ุน API ุงูุฐูุงุก ุงูุงุตุทูุงุนู
- ุฅุถุงูุฉ VS Code
- GitHub Action
ุงูู ุดุฑูุน ู ุฑุฎูุต ุชุญุช ุฑุฎุตุฉ MIT โ ุดูู ู ูู LICENSE ููุชูุงุตูู.
|
Yousef Elsherbiny Automation & AI Solutions |
Built with โค๏ธ by YousefAutomates
โญ If this tool saved you time, please star the repo! โญ