AI-powered GitHub repo analyzer CLI — analyze, chat, and visualize any codebase. Run 'gitputra info' to see all commands and features.
Project description
🔍 GitPutra
AI-powered GitHub repository analyzer CLI.
Clone any repo, generate a structured analysis report, visualize architecture, and chat with your codebase — all from the terminal.
✨ Features
-
🔍 🔍 See Beyond the Code — Turn any repository into a fully mapped system — architecture, patterns, flaws, and opportunities laid bare.
-
🧠 Export the Brain of Your Project — Using an AI tool & quoata ended? Now needed to explain the context to other tool? No worries exprot the etire project's context with one command
-
💬 Talk to Your Codebase — Ask anything. Get answers grounded in context, not guesses, powered by RAG and semantic search.
-
🤖 Choose Your Intelligence — Switch effortlessly between Google Gemini & OpenAI
-
📊 Watch Structure Come Alive — Transform raw code into visual graphs — dependencies, modules, and flows you can actually understand. Make it and HTML page and Mermaid diagram as you want
-
📄 Reports That Speak Your Language — Exports analysis as a styled PDF in ~110 languages
-
🌿 Every Branch Has a Story — Analyze or chat with any specific branch of a repo
-
🗂️ **Memory That Doesn’t Waste Time ** — Skips re-embedding if a repo is already indexed; run
clear-dbto reset -
📁 Understands Almost Necessary File Types — From Python to Rust, configs to notebooks — your entire stack, decoded.
-
🗃️ Chat Memory That Remembers What You Said — Conversations don’t reset into oblivion. Context is preserved across interactions, allowing deeper, more coherent discussions with your codebase over time.
📦 Installation
pip install gitputra
Requires Python 3.10+
🚀 Usage & Examples
Analyze a Repository
# Remote repo
gitputra analyze https://github.com/user/repo --ai gemini --key YOUR_API_KEY
# Local codebase (no cloning)
gitputra analyze ./my-project --local --ai gemini --key YOUR_API_KEY
gitputra analyze "C:\path\with spaces\project" --local --ai gemini --key YOUR_API_KEY
With options:
# Use OpenAI, output in Bengali, skip diagram
gitputra analyze https://github.com/user/repo --ai openai --key YOUR_KEY --lang Bengali --no-diagram
# Analyze a specific branch
gitputra analyze https://github.com/user/repo --branch dev --ai gemini --key YOUR_API_KEY
Outputs saved to ./output/:
report.pdf— Full analysis reportdiagram.png— Dependency graphmermaid.txt— Mermaid flowchart source
Chat with a Repository
# Remote repo
gitputra chat https://github.com/user/repo --ai gemini --key YOUR_API_KEY
# Local codebase
gitputra chat ./my-project --local --ai gemini --key YOUR_API_KEY
💬 Chat mode [repo] — ask anything about the repo. Type 'exit' to quit.
>> What does the main.py file do?
>> How is authentication handled?
>> exit
If
analyzewas already run on the repo,chatreuses the existing index automatically.
# Chat with a specific branch
gitputra chat https://github.com/user/repo --branch feature/my-branch --ai gemini --key YOUR_API_KEY
# in case of API stored in .env
gitputra chat https://github.com/user/repo --branch feature/my-branch --ai gemini
If the API key is not passed, it must be passed through terminal when asked to access AI
If
--branchis not specified, the repo's default branch is used.
Export Codebase Context
Export your entire codebase as a single Markdown file you can paste into any AI tool (ChatGPT, Gemini…) to continue work without re-explaining the project.
# Local codebase — fast, no API key needed (no AI summaries)
gitputra export-context ./my-project
gitputra export-context "location"
# With AI summaries (requires --use-ai and an API key)
gitputra export-context ./my-project --use-ai --ai gemini --key YOUR_API_KEY
# in case of API stored in .env or if the API key is not passed, it must be passed through terminal when asked to access AI
gitputra export-context "location" --use-ai --ai gemini
# Remote GitHub repo
gitputra export-context https://github.com/user/repo --remote --ai gemini --key YOUR_API_KEY
# Remote repo, specific branch, with AI summaries
gitputra export-context https://github.com/user/repo --remote --branch dev --use-ai --ai gemini --key YOUR_API_KEY
# in case of API stored in .env or if the API key is not passed, it must be passed through terminal when asked to access AI
gitputra export-context https://github.com/user/repo --remote --branch dev --use-ai --ai gemini
# Scan current directory
gitputra export-context
# Path with spaces — wrap in quotes
gitputra export-context "C:\Users\you\My Project"
Output saved to ./output/context_<project_name>_<timestamp>.md
How to use the exported file:
- Open the
.mdfile - Paste it into any AI chat (ChatGPT, Gemini…)
- Say: "Here is my codebase context. Read it and help me continue."
Other Commands
# Wipe the local ChromaDB index
gitputra clear-db
# Show all commands, supported AIs, languages, and file extensions
gitputra info
# Check version
gitputra --version
🤖 AI Providers
| Flag | Provider | Text Model | Embedding Model |
|---|---|---|---|
--ai gemini |
Google Gemini | gemini-2.5-flash | gemini-embedding-001 |
--ai openai |
OpenAI | gpt-4o-mini | text-embedding-3-large |
Setting up your API Key
Option 1 — .env file (recommended):
API_KEY=your_api_key_here
Option 2 — Secure Interactive Prompt
If no key is provided, GitPutra will securely prompt you at runtime — keeping your key out of shell history and config files.
Option 3 — CLI flag:
gitputra analyze https://github.com/user/repo --key YOUR_API_KEY
Avoid Option 3 in shared environments — CLI flags appear in shell history.
🌍 Supported Languages (PDF Output)
GitPutra can generate PDF reports in ~110 languages across 3 scripts:
Latin Script (~100 languages)
English, French, Spanish, Portuguese, Italian, German, Dutch, Swedish, Norwegian, Danish, Finnish, Polish, Czech, Slovak, Hungarian, Romanian, Croatian, Serbian (Latin), Slovenian, Albanian, Lithuanian, Latvian, Estonian, Turkish, Azerbaijani, Uzbek, Kazakh (Latin), Turkmen, Indonesian, Malay, Filipino, Swahili, Zulu, Xhosa, Afrikaans, Yoruba, Igbo, Hausa, Somali, Kinyarwanda, Welsh, Irish, Basque, Catalan, Galician, Maltese, Icelandic, Faroese, Vietnamese, Hawaiian, Maori, and more.
Bengali Script
Bengali, Assamese
Devanagari Script
Hindi, Marathi, Nepali, Sanskrit, Maithili, Konkani, Bodo, Dogri
The AI response language depends on the chosen model's capability. Use
--langto set the output language.
gitputra analyze https://github.com/user/repo --ai gemini --key KEY --lang Bengali
📁 Supported File Extensions (49 types)
| Category | Extensions |
|---|---|
| Python | .py, .ipynb |
| C/C++ | .c, .h, .cpp |
| Web | .js, .ts, .jsx, .tsx, .html, .css, .vue |
| JVM | .java, .kt, .kts, .scala, .groovy, .clj, .cljs |
| Systems | .go, .rs, .swift, .dart |
| Scripting | .sh, .bat, .ps1, .pl, .lua, .r, .m, .rb, .php, .coffee, .elm |
| Config | .json, .yaml, .yml, .xml, .toml, .ini, .cfg, .conf, .gradle, .makefile |
| Docs | .md, .txt, .log, .sql, .pdf |
| Special | Dockerfile, Makefile |
👨💻 Author
Adityava Gangopadhyay
- 📧 Email: adityava49cse@gmail.com
- 🔗 LinkedIn: adityava-gangopadhyay
- 📦 PyPI: pypi.org/project/gitputra
Feel free to reach out for any suggestions or issues!
AI is ARTIFICIALLY Intelligent, YOU are NATURALLY WISE, use the tool but try to keep track on the correctness of the results produced.
THANK YOU
📄 License
MIT License — free to use, modify, and distribute.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gitputra-0.2.8.tar.gz.
File metadata
- Download URL: gitputra-0.2.8.tar.gz
- Upload date:
- Size: 509.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7e794f3080439d62bca3305baec8a38a0c35538fc6c3b422f6874f31463463b7
|
|
| MD5 |
98c82040817d7d61454152a5e94af37d
|
|
| BLAKE2b-256 |
76ad05a80c002f86cc6fa546d415b57ebba208b77ef46e916ce70c2196f9ffb6
|
File details
Details for the file gitputra-0.2.8-py3-none-any.whl.
File metadata
- Download URL: gitputra-0.2.8-py3-none-any.whl
- Upload date:
- Size: 504.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
309573301359a1bdd8256bc8d52e4a9ad5988567a069d0c46224838b76ce113b
|
|
| MD5 |
5ecf7ba2d98c66c9f9b073c4d65b192b
|
|
| BLAKE2b-256 |
1b4aa4865b1822f1c08192dcf0af72b636022904bbada1e248ff2b0a68549042
|