Skip to main content

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:

  1. Install GitMaster using pip:

    pip install gitmaster
    
  2. 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: Specify repo for GitHub repositories or local for 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.3 (Latest)

  • ✨ New Features:

    • Added support for multiple LLM providers (Google Gemini, Anthropic Claude)
    • Implemented --version / -v command to display current version
    • Added review-pr command for AI-powered Pull Request analysis
    • Added explain command to explain specific files
    • Added suggest command 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
    • 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

gitmaster-0.1.3.tar.gz (21.1 kB view details)

Uploaded Source

Built Distribution

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

gitmaster-0.1.3-py3-none-any.whl (22.5 kB view details)

Uploaded Python 3

File details

Details for the file gitmaster-0.1.3.tar.gz.

File metadata

  • Download URL: gitmaster-0.1.3.tar.gz
  • Upload date:
  • Size: 21.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.11

File hashes

Hashes for gitmaster-0.1.3.tar.gz
Algorithm Hash digest
SHA256 23f64da83fdcd2d08370453af86b4a71014acabbc2d47c42e4652a1e5a2c37cf
MD5 dad379c8df014dc4df59b6d9cf88af3f
BLAKE2b-256 029bc95aebb21e680f5b9f7a35c8cf6831353fd364a542b7c5cf505b1b2324b6

See more details on using hashes here.

File details

Details for the file gitmaster-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: gitmaster-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 22.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.11

File hashes

Hashes for gitmaster-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 686364771dc939bd5619c0d6275915e82d04c078f6f81f8ed9228cb0b8819106
MD5 260018f8d6fbcdb713e9133b20d72263
BLAKE2b-256 cf60ea712fd27d7a8b4ba818b008747d1d2df207d7fe7fadf46534fcb8584b23

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