CLI tool to ask questions about GitHub or local repos using RAG + LLM
Project description
GitMaster
GitMaster is an AI-powered CLI tool designed to help users interact with GitHub or local repositories. It leverages Retrieval-Augmented Generation (RAG) and Large Language Models (LLMs) to answer questions about codebases, summarize repositories, review pull requests, and more.
Features
- Load and index GitHub or local repositories with smart file filtering
- Ask questions about the last loaded repository
- Summarize the contents of a repository
- Review GitHub Pull Requests with AI analysis
- Support for multiple LLM providers (OpenAI, Google Gemini, Anthropic Claude)
- Manage authentication for GitHub and AI services
- Clear temporary data and vector stores
- Explain and suggest improvements for specific files
Installation from PyPI
To install GitMaster from PyPI, follow these steps:
-
Install GitMaster using pip:
pip install gitmaster
-
Set up your AI service API key:
gitmaster change-key
Commands
Below is a list of all available commands in GitMaster:
gitmaster --version / gitmaster -v
Display the current version of GitMaster.
gitmaster load
Load a GitHub or local repository into the vector database.
Options:
path_or_url: Path to a local repository or URL of a GitHub repository.--type: Specifyrepofor GitHub repositories orlocalfor local repositories (default:repo).--clear-index/-c: Clear existing vector index before indexing.
Example:
gitmaster load https://github.com/yourusername/yourrepo --type repo
gitmaster load . --type local
gitmaster ask
Ask a question about the last loaded repository.
Example:
gitmaster ask "What does the main function do?"
gitmaster review-pr
Review a GitHub Pull Request and provide AI-powered analysis.
Example:
gitmaster review-pr https://github.com/owner/repo/pull/123
gitmaster explain
Explain a specific file in the loaded repository.
Example:
gitmaster explain src/main.py
gitmaster suggest
Get improvement suggestions for a specific file in the loaded repository.
Example:
gitmaster suggest src/main.py
gitmaster login
Log in to GitHub for private repository access.
Example:
gitmaster login
gitmaster logout
Log out of GitHub and clear stored credentials.
Example:
gitmaster logout
gitmaster change-key
Set or update your AI service API keys and manage default settings.
Supported Services:
- OpenAI (GPT models)
- Google Gemini
- Anthropic Claude
Example:
gitmaster change-key
gitmaster summarize
Summarize the contents of the last loaded repository.
Example:
gitmaster summarize
gitmaster clear
Delete all temporary repository clones and clear vector stores.
Example:
gitmaster clear
Usage
To see the help menu for GitMaster, run:
gitmaster --help
Requirements
- Python 3.8 or higher
- AI service API key (OpenAI, Google Gemini, or Anthropic Claude)
- Git installed on your system
Changelog
Version 0.1.4 (Latest)
- 🐛 Bug Fixes:
- Improved error handling for deleting API keys: no traceback if a key does not exist, and graceful handling in
logoutandchange-keycommands.
- Improved error handling for deleting API keys: no traceback if a key does not exist, and graceful handling in
Version 0.1.3
-
✨ New Features:
- Added support for multiple LLM providers (Google Gemini, Anthropic Claude)
- Implemented
--version/-vcommand to display current version - Added
review-prcommand for AI-powered Pull Request analysis - Added
explaincommand to explain specific files - Added
suggestcommand to get improvement suggestions for files - Implemented default LLM key selection system
-
🔧 Improvements:
- Enhanced file filtering system for local repository loading
- Added comprehensive ignore patterns for common development artifacts:
- Virtual environments (
.venv,venv,env) - Build artifacts (
build,dist,__pycache__) - Package managers (
node_modules,.npm,.yarn) - IDE files (
.idea,.vscode,.vs) - OS files (
.DS_Store,Thumbs.db) - Logs and temp files (
logs,*.log,tmp) - And many more development-related folders
- Virtual environments (
- Improved token management for large PRs
- Better error handling for GitHub API access
- Enhanced user interaction for file selection in large PRs
-
🐛 Bug Fixes:
- Fixed local repository loading getting stuck on large codebases
- Improved file extension filtering
- Better handling of binary files and large files
Version 0.1.2
- Initial release with basic RAG functionality
- Support for OpenAI API
- GitHub and local repository loading
- Basic question answering and summarization
License
This project is licensed under the MIT License.
Authors
Sayak Raha @sayak-12 sayakraha12@gmail.com
Senjuti Saha @shuamamine sahasenjuti796@gmail.com
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
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 gitmaster-0.1.4.tar.gz.
File metadata
- Download URL: gitmaster-0.1.4.tar.gz
- Upload date:
- Size: 21.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b21c647ac0861fb5198b82f89e04a11f91413371e7b088847dc659fd0a035c14
|
|
| MD5 |
0bfc9ab687187e09ef5d94f3105ee0d3
|
|
| BLAKE2b-256 |
02f5ff3685a68427dd6f05939d737bde157d4c7533097bb84ed84e95316e9944
|
File details
Details for the file gitmaster-0.1.4-py3-none-any.whl.
File metadata
- Download URL: gitmaster-0.1.4-py3-none-any.whl
- Upload date:
- Size: 22.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c6e2fd0786600fcdb2031c4c0e8bc116474af72cf8f34e47276ccf3e2b59f592
|
|
| MD5 |
9df01e80c176f3f2399e0437fc2a9123
|
|
| BLAKE2b-256 |
32aa4eecf88c352ec7d751362072be4f88ee9a8ecd538674ceb11127fe6299b3
|