Skip to main content

AI-powered GitHub repo analyzer CLI โ€” analyze, chat, and visualize any codebase. Run 'gitputra info' to see all commands and features.

Project description

๐Ÿ” GitPutra

PyPI Version Python Versions Downloads License AI Providers

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

  • ๐Ÿ” Deep Repo Analysis โ€” AI-generated structured report covering Summary, Architecture, Tech Stack, Issues, and Suggested Improvements
  • ๐Ÿ’ฌ RAG Chat โ€” Ask questions about any codebase using Retrieval-Augmented Generation (ChromaDB + embeddings)
  • ๐Ÿค– Multi-AI Support โ€” Works with Google Gemini, OpenAI, and Anthropic Claude
  • ๐ŸŒฟ Branch Support โ€” Analyze or chat with any specific branch of a repo
  • ๐Ÿ“Š Dependency Diagrams โ€” Auto-generates NetworkX graph diagram + Mermaid flowchart
  • ๐Ÿ“„ Multilingual PDF Reports โ€” Exports analysis as a styled PDF in ~110 languages
  • ๐Ÿ—‚๏ธ Smart Indexing โ€” Skips re-embedding if a repo is already indexed; run clear-db to reset
  • ๐Ÿ“ 48+ File Types โ€” Supports Python, C/C++, Java, Go, Rust, JS/TS, and many more

๐Ÿ“ฆ Installation

pip install gitputra

Requires Python 3.10+


๐Ÿš€ Usage & Examples

Analyze a Repository

gitputra analyze https://github.com/user/repo --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

# Use Claude, skip PDF
gitputra analyze https://github.com/user/repo --ai claude --key YOUR_KEY --no-pdf

Outputs saved to ./output/:

  • report.pdf โ€” Full analysis report
  • diagram.png โ€” Dependency graph
  • mermaid.txt โ€” Mermaid flowchart source

Chat with a Repository

gitputra chat https://github.com/user/repo --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 analyze was already run on the repo, chat reuses the existing index automatically.

Analyze or Chat with a Specific Branch

# Analyze a specific branch
gitputra analyze https://github.com/user/repo --branch dev --ai gemini --key YOUR_API_KEY

# Chat with a specific branch
gitputra chat https://github.com/user/repo --branch feature/my-branch --ai gemini --key YOUR_API_KEY

If --branch is not specified, the repo's default branch is used.

Clear the Local Index

gitputra clear-db

Show Info & Capabilities

gitputra info

Check Version

gitputra --version

๐Ÿค– AI Providers

Flag Provider Text Model Embedding Model
--ai gemini Google Gemini gemini-2.5-flash text-embedding-004
--ai openai OpenAI gpt-4o-mini text-embedding-3-large
--ai claude Anthropic Claude claude-sonnet-4-5 via GEMINI_API_KEY fallback

Note: Claude has no embedding API. For RAG/chat with --ai claude, set GEMINI_API_KEY in your .env file to enable embeddings.

Setting up your API Key

Option 1 โ€” .env file (recommended):

API_KEY=your_api_key_here
GEMINI_API_KEY=your_gemini_key  # only needed for --ai claude with chat

Option 2 โ€” CLI flag:

gitputra analyze https://github.com/user/repo --key YOUR_API_KEY

Avoid Option 2 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 --lang to set the output language.

gitputra analyze https://github.com/user/repo --ai gemini --key KEY --lang Bengali

๐Ÿ“ Supported File Extensions (48 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, .ini, .cfg, .conf, .gradle, .makefile
Docs .md, .txt, .log, .sql
Special Dockerfile, Makefile

๐Ÿ‘จโ€๐Ÿ’ป Author

Adityava Gangopadhyay

Feel free to reach out for any suggestions or issues!


๐Ÿ“„ License

MIT License โ€” free to use, modify, and distribute.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gitputra-0.2.0.tar.gz (474.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gitputra-0.2.0-py3-none-any.whl (472.2 kB view details)

Uploaded Python 3

File details

Details for the file gitputra-0.2.0.tar.gz.

File metadata

  • Download URL: gitputra-0.2.0.tar.gz
  • Upload date:
  • Size: 474.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.0

File hashes

Hashes for gitputra-0.2.0.tar.gz
Algorithm Hash digest
SHA256 69494acbaeab3ed3a7a7abd8050542ad8441f79a4fd8f9c2608c57d8e9f914b2
MD5 913f8acda450a5a91a0a6e630daac2be
BLAKE2b-256 2dd84a1428f694f4636bd1544d7db9a81fc74360bed2ef82fffc956c9d61445c

See more details on using hashes here.

File details

Details for the file gitputra-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: gitputra-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 472.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.0

File hashes

Hashes for gitputra-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3f71cef2dcf13dfbaf4e2632df10c750703eff3648970726d0d9d4b4284b74b8
MD5 34fbe600fb224f6c5b275786db806f83
BLAKE2b-256 ce32d28cb0a5b5ef3d1bd7a2884a4dc004bc28cc78f6a8cf4d2187a072dbf39a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page