Skip to main content

Production-ready agentic AI assistant for GitHub repositories with multi-LLM support and visual workflow insights

Project description

GitPilot

๐Ÿš€ The AI Coding Companion That Understands Your GitHub Repositories

PyPI version Python 3.11+ License: MIT GitHub stars

Installation โ€ข Quick Start โ€ข Example Usage โ€ข Documentation โ€ข Contributing


โญ Star Us on GitHub!

If GitPilot saves you time or helps your projects, please give us a star! โญ

Your support helps us:

  • ๐Ÿš€ Build new features faster
  • ๐Ÿ› Fix bugs and improve stability
  • ๐Ÿ“š Create better documentation
  • ๐ŸŒ Grow the community

โญ Click here to star GitPilot on GitHub โ€” it takes just 2 seconds and means the world to us! ๐Ÿ’™


๐ŸŒŸ What is GitPilot?

GitPilot is a production-ready agentic AI assistant that acts as your intelligent coding companion for GitHub repositories. Unlike copy-paste coding assistants, GitPilot:

  • ๐Ÿง  Understands your entire codebase โ€“ Analyzes project structure and file relationships
  • ๐Ÿ“‹ Shows clear plans before executing โ€“ Always presents an "Answer + Action Plan" with structured file operations (CREATE/MODIFY/DELETE)
  • ๐Ÿ”„ Manages multiple LLM providers โ€“ Seamlessly switch between OpenAI, Claude, Watsonx, and Ollama
  • ๐Ÿ‘๏ธ Visualizes agent workflows โ€“ See exactly how the multi-agent system thinks and operates
  • ๐Ÿ”— Integrates directly with GitHub โ€“ Repository access, file editing, commits, and more

Built with CrewAI, FastAPI, and React โ€” GitPilot combines the power of multi-agent AI with a beautiful, modern web interface.


โœจ Example Usage

Installation

# Install from PyPI
pip install gitcopilot

# Set your GitHub token
export GITPILOT_GITHUB_TOKEN="ghp_your_token_here"

# Set your LLM API key (choose one)
export OPENAI_API_KEY="sk-..."
# or
export ANTHROPIC_API_KEY="sk-ant-..."

# Launch GitPilot
gitpilot

Basic Workflow

# 1. Start GitPilot (opens in browser automatically)
gitpilot

# 2. Select a repository from the sidebar
#    โ†’ Search your GitHub repos
#    โ†’ Click to connect

# 3. Ask GitPilot to make changes
#    Example: "Add a new API endpoint for user login with JWT authentication"

# 4. Review the generated plan
#    โœ“ Answer: Explanation of what will be done
#    โœ“ Action Plan: Structured steps with file operations
#      - CREATE: src/api/auth.py
#      - MODIFY: src/routes/index.py
#      - MODIFY: tests/test_auth.py

# 5. Approve & Execute
#    โ†’ GitPilot applies changes to your repository
#    โ†’ View execution log with detailed results

Real-World Examples

Add a new feature:

User: Add a rate limiter to all API endpoints to prevent abuse

GitPilot Response:
Answer: I'll implement rate limiting using a middleware approach with Redis
for distributed rate limiting support.

Action Plan:
  Step 1: Create rate limiter middleware
    - CREATE: src/middleware/rate_limiter.py
  Step 2: Add Redis client configuration
    - MODIFY: src/config.py
  Step 3: Apply middleware to all routes
    - MODIFY: src/main.py
  Step 4: Add rate limit tests
    - CREATE: tests/test_rate_limiter.py

Refactor existing code:

User: Refactor the user authentication to use async/await instead of callbacks

GitPilot Response:
Answer: I'll convert all authentication functions to async/await pattern,
update the database queries, and ensure all tests pass.

Action Plan:
  Step 1: Convert auth service to async
    - MODIFY: src/services/auth_service.py (12 functions)
  Step 2: Update route handlers
    - MODIFY: src/routes/auth.py
  Step 3: Migrate database calls
    - MODIFY: src/db/user_repository.py
  Step 4: Update unit tests
    - MODIFY: tests/test_auth_service.py

Fix a bug:

User: Fix the bug where empty email validation returns a 500 error instead of 400

GitPilot Response:
Answer: I'll add proper input validation with Pydantic models and return
appropriate HTTP 400 errors with helpful messages.

Action Plan:
  Step 1: Add Pydantic validation model
    - CREATE: src/models/user_input.py
  Step 2: Update login endpoint with validation
    - MODIFY: src/routes/auth.py
  Step 3: Add validation error handler
    - MODIFY: src/main.py
  Step 4: Add test cases for validation
    - MODIFY: tests/test_validation.py

๐ŸŽฏ Key Features

1. Answer + Action Plan UX ๐Ÿ†•

Every AI response is structured into two clear sections:

  • Answer: Natural language explanation of what will be done and why
  • Action Plan: Structured list of steps with explicit file operations:
    • ๐ŸŸข CREATE โ€“ New files to be added
    • ๐Ÿ”ต MODIFY โ€“ Existing files to be changed
    • ๐Ÿ”ด DELETE โ€“ Files to be removed

See exactly what will happen before approving execution!

2. Project Context Panel ๐Ÿ†•

Visual display of your repository state:

  • Repository name and branch
  • Total file count
  • Last analysis timestamp
  • Interactive file tree browser

3. Real Execution Engine ๐Ÿ†•

GitPilot now performs actual GitHub operations:

  • Creates new files with proper content
  • Modifies existing files intelligently
  • Marks files for deletion (safe approach)
  • Returns detailed execution logs with success/failure status

4. Admin / Settings Console

Full-featured LLM provider configuration with:

  • OpenAI โ€“ GPT-4o, GPT-4o-mini, GPT-4-turbo support
  • Claude โ€“ Claude 3.5 Sonnet, Claude 3 Opus support
  • IBM Watsonx.ai โ€“ Llama, Granite models
  • Ollama โ€“ Local models (Llama3, Mistral, CodeLlama, Phi3, etc.)

Settings are persisted to ~/.gitpilot/settings.json and survive restarts.

5. Agent Flow Viewer

Interactive visual representation of the CrewAI multi-agent system using ReactFlow:

  • Repository Reader โ€“ Analyzes codebase structure
  • Refactor Planner โ€“ Creates safe, step-by-step plans
  • Code Writer โ€“ Implements approved changes
  • Code Reviewer โ€“ Reviews for quality and safety
  • GitHub API Tools โ€“ Manages file operations and commits

6. Three-Tab Navigation

Seamlessly switch between:

  • ๐Ÿ“ Workspace โ€“ Repository browsing and AI chat
  • ๐Ÿ”„ Agent Flow โ€“ Visual workflow diagram
  • โš™๏ธ Admin / Settings โ€“ LLM provider management

๐Ÿš€ Installation

From PyPI (Recommended)

pip install gitpilot

From Source

# Clone the repository
git clone https://github.com/ruslanmv/gitpilot.git
cd gitpilot

# Install dependencies
make install

# Build frontend
make frontend-build

# Run GitPilot
gitpilot

Using Docker (Coming Soon)

docker pull ruslanmv/gitpilot
docker run -p 8000:8000 -e GITHUB_TOKEN=your_token ruslanmv/gitpilot

๐Ÿš€ Quick Start

Prerequisites

  • Python 3.11+
  • GitHub Personal Access Token (with repo scope)
  • API key for at least one LLM provider (OpenAI, Claude, Watsonx, or Ollama)

1. Configure GitHub Access

Create a GitHub Personal Access Token at https://github.com/settings/tokens with repo scope:

export GITPILOT_GITHUB_TOKEN="ghp_XXXXXXXXXXXXXXXXXXXX"
# or
export GITHUB_TOKEN="ghp_XXXXXXXXXXXXXXXXXXXX"

2. Configure LLM Provider

You can configure providers via the web UI's Admin/Settings page, or set environment variables:

OpenAI

export OPENAI_API_KEY="sk-..."
export GITPILOT_OPENAI_MODEL="gpt-4o-mini"  # optional

Claude (Anthropic)

export ANTHROPIC_API_KEY="sk-ant-..."
export GITPILOT_CLAUDE_MODEL="claude-3-5-sonnet-20241022"  # optional

IBM Watsonx

export WATSONX_API_KEY="your-watsonx-api-key"
export WATSONX_PROJECT_ID="your-project-id"
export GITPILOT_WATSONX_MODEL="meta-llama/llama-3-1-70b-instruct"  # optional

Ollama (Local Models)

export OLLAMA_BASE_URL="http://localhost:11434"
export GITPILOT_OLLAMA_MODEL="llama3"  # optional

3. Run GitPilot

gitpilot

This will:

  1. Start the FastAPI backend on http://127.0.0.1:8000
  2. Serve the web UI at the root URL
  3. Open your default browser automatically

Alternative commands:

# Custom host and port
gitpilot serve --host 0.0.0.0 --port 8000

# API only (no browser auto-open)
gitpilot-api

# Using make (for development)
make run

๐Ÿ“– Complete Workflow Guide

Initial Setup

Step 1: Launch GitPilot

gitpilot

Your browser opens to http://127.0.0.1:8000

Step 2: Configure LLM Provider

  1. Click "โš™๏ธ Admin / Settings" in the sidebar
  2. Select your preferred provider (e.g., OpenAI)
  3. Enter your API key and select a model (e.g., gpt-4o-mini)
  4. Click "Save settings"
  5. See the success message confirming your settings are saved

Step 3: Connect to GitHub Repository

  1. Click "๐Ÿ“ Workspace" to return to the main interface
  2. In the sidebar, use the search box to find your repository
  3. Click "Search my repos" to list all accessible repositories
  4. Click on any repository to connect

Development Workflow

Step 1: Browse Your Codebase

  • The Project Context panel shows repository metadata
  • Browse the file tree to understand structure
  • Click on files to preview their contents

Step 2: Describe Your Task In the chat panel, describe what you want in natural language:

Example 1: Add a Feature

Add a new API endpoint at /api/users/{id}/profile that returns
user profile information including name, email, and bio.

Example 2: Refactor Code

Refactor the authentication middleware to use JWT tokens
instead of session cookies. Update all related tests.

Example 3: Fix a Bug

The login endpoint is returning 500 errors when the email
field is empty. Add proper validation and return a 400
with a helpful error message.

Step 3: Review the Answer + Action Plan GitPilot will show you:

Answer Section:

  • Clear explanation of what will be done
  • Why this approach was chosen
  • Overall summary of changes

Action Plan Section:

  • Numbered steps with descriptions
  • File operations with colored pills:
    • ๐ŸŸข CREATE โ€“ Files to be created
    • ๐Ÿ”ต MODIFY โ€“ Files to be modified
    • ๐Ÿ”ด DELETE โ€“ Files to be removed
  • Summary totals (e.g., "2 files to create, 3 files to modify")
  • Risk warnings when applicable

Step 4: Execute or Refine

  • If the plan looks good: Click "Approve & Execute"
  • If you want changes: Provide feedback in the chat
    The plan looks good, but please also add rate limiting
    to the new endpoint to prevent abuse.
    
  • GitPilot will update the plan based on your feedback

Step 5: View Execution Results After execution, see a detailed log:

Step 1: Create authentication endpoint
  โœ“ Created src/api/auth.py
  โœ“ Modified src/routes/index.py

Step 2: Add authentication tests
  โœ“ Created tests/test_auth.py

Step 6: View Agent Workflow (Optional) Click "๐Ÿ”„ Agent Flow" to see:

  • How agents collaborate (Repository Reader โ†’ Planner โ†’ Code Writer โ†’ Reviewer)
  • Data flow between components
  • The complete multi-agent system architecture

๐Ÿ—๏ธ Architecture

Frontend Structure

frontend/
โ”œโ”€โ”€ App.jsx                         # Main application with navigation
โ”œโ”€โ”€ components/
โ”‚   โ”œโ”€โ”€ AssistantMessage.jsx       # Answer + Action Plan display (NEW)
โ”‚   โ”œโ”€โ”€ ChatPanel.jsx              # AI chat interface
โ”‚   โ”œโ”€โ”€ FileTree.jsx               # Repository file browser
โ”‚   โ”œโ”€โ”€ FlowViewer.jsx             # Agent workflow visualization
โ”‚   โ”œโ”€โ”€ Footer.jsx                 # Footer with GitHub star CTA (NEW)
โ”‚   โ”œโ”€โ”€ LlmSettings.jsx            # Provider configuration UI
โ”‚   โ”œโ”€โ”€ PlanView.jsx               # Enhanced plan rendering (NEW)
โ”‚   โ”œโ”€โ”€ ProjectContextPanel.jsx    # Repository context display (NEW)
โ”‚   โ””โ”€โ”€ RepoSelector.jsx           # Repository search/selection
โ”œโ”€โ”€ styles.css                      # Global styles with dark theme
โ”œโ”€โ”€ index.html                      # Entry point
โ””โ”€โ”€ package.json                    # Dependencies (React, ReactFlow)

Backend Structure

gitpilot/
โ”œโ”€โ”€ __init__.py
โ”œโ”€โ”€ api.py                          # FastAPI routes and endpoints
โ”œโ”€โ”€ agentic.py                      # CrewAI agents + real executor (UPDATED)
โ”œโ”€โ”€ cli.py                          # Command-line interface
โ”œโ”€โ”€ github_api.py                   # GitHub REST API client
โ”œโ”€โ”€ langflow_client.py              # LangFlow integration (optional)
โ”œโ”€โ”€ llm_provider.py                 # Multi-provider LLM factory
โ”œโ”€โ”€ settings.py                     # Configuration management
โ””โ”€โ”€ web/                            # Production frontend build
    โ”œโ”€โ”€ index.html
    โ””โ”€โ”€ assets/
        โ”œโ”€โ”€ index-*.css
        โ””โ”€โ”€ index-*.js

API Endpoints

Repository Management

  • GET /api/repos โ€“ List user repositories
  • GET /api/repos/{owner}/{repo}/tree โ€“ Get repository file tree
  • GET /api/repos/{owner}/{repo}/file โ€“ Get file contents
  • POST /api/repos/{owner}/{repo}/file โ€“ Update/commit file

Settings & Configuration

  • GET /api/settings โ€“ Get current LLM settings
  • POST /api/settings/provider โ€“ Change active provider
  • PUT /api/settings/llm โ€“ Update provider-specific settings

Chat & Planning

  • POST /api/chat/plan โ€“ Generate execution plan (with structured actions)
  • POST /api/chat/execute โ€“ Execute approved plan (returns execution log)

Workflow Visualization

  • GET /api/flow/current โ€“ Get agent workflow graph

๐Ÿ› ๏ธ Development

Build Commands (Makefile)

# Install all dependencies
make install

# Install frontend dependencies only
make frontend-install

# Build frontend for production
make frontend-build

# Run development server
make run

# Run tests
make test

# Lint code
make lint

# Format code
make fmt

# Build Python package
make build

# Clean build artifacts
make clean

Frontend Development

cd frontend

# Install dependencies
npm install

# Development mode with hot reload
npm run dev

# Build for production
npm run build

๐Ÿ“ฆ Publishing to PyPI

GitPilot uses automated publishing via GitHub Actions with OIDC-based trusted publishing.

Automated Release Workflow

  1. Update version in gitpilot/version.py
  2. Create and publish a GitHub release (tag format: vX.Y.Z)
  3. GitHub Actions automatically:
    • Builds source distribution and wheel
    • Uploads artifacts to the release
    • Publishes to PyPI via trusted publishing

See .github/workflows/release.yml for details.

Manual Publishing (Alternative)

# Build distributions
make build

# Publish to TestPyPI
make publish-test

# Publish to PyPI
make publish

Example of deletion of files

Example of genertion of content

Example of generation of files


๐Ÿค Contributing

We love contributions! Whether it's bug fixes, new features, or documentation improvements.

How to Contribute

  1. โญ Star the repository (if you haven't already!)
  2. ๐Ÿด Fork the repository
  3. ๐ŸŒฟ Create a feature branch (git checkout -b feature/amazing-feature)
  4. โœ๏ธ Make your changes
  5. โœ… Run tests (make test)
  6. ๐ŸŽจ Run linter (make lint)
  7. ๐Ÿ“ Commit your changes (git commit -m 'Add amazing feature')
  8. ๐Ÿš€ Push to the branch (git push origin feature/amazing-feature)
  9. ๐ŸŽฏ Open a Pull Request

Development Setup

# Clone your fork
git clone https://github.com/YOUR_USERNAME/gitpilot.git
cd gitpilot

# Install dependencies
make install

# Create a branch
git checkout -b feature/my-feature

# Make changes and test
make run
make test

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


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

Ruslan Magana Vsevolodovna


๐Ÿ™ Acknowledgments

  • CrewAI โ€“ Multi-agent orchestration framework
  • FastAPI โ€“ Modern, fast web framework
  • React โ€“ UI library
  • ReactFlow โ€“ Interactive node-based diagrams
  • Vite โ€“ Fast build tool
  • All our contributors and stargazers! โญ

๐Ÿ“ž Support


๐Ÿ—บ๏ธ Roadmap

Recently Released (v0.2.0) ๐Ÿ†•

  • โœ… Answer + Action Plan UX โ€“ Clear separation of explanation and action items
  • โœ… Structured File Actions โ€“ Explicit CREATE/MODIFY/DELETE operations
  • โœ… Project Context Panel โ€“ Repository metadata display
  • โœ… Real Execution Engine โ€“ Actual GitHub file operations
  • โœ… Execution Logs โ€“ Detailed success/failure tracking
  • โœ… Enhanced Plan View โ€“ Color-coded pills and totals
  • โœ… Footer with GitHub CTA โ€“ Community engagement

Current Features (v0.1.0)

  • โœ… GitHub repository browsing
  • โœ… Multi-LLM provider support (OpenAI, Claude, Watsonx, Ollama)
  • โœ… Admin/Settings console
  • โœ… Agent Flow Viewer
  • โœ… AI-powered plan generation
  • โœ… Production-ready web UI

Planned Features (v0.3.0+)

  • ๐Ÿ”„ Intelligent code modification (using LLM for actual changes)
  • ๐Ÿ”„ Pull request creation and management
  • ๐Ÿ”„ Multi-file refactoring
  • ๐Ÿ”„ Automated test generation
  • ๐Ÿ”„ Code review automation
  • ๐Ÿ”„ Branch management
  • ๐Ÿ”„ Team collaboration features
  • ๐Ÿ”„ Integration with CI/CD pipelines
  • ๐Ÿ”„ Custom agent templates
  • ๐Ÿ”„ Slack/Discord notifications

โš ๏ธ Important Notes

Security Best Practices

  1. Never commit API keys to version control
  2. Use environment variables or the Admin UI for credentials
  3. Rotate tokens regularly
  4. Limit GitHub token scopes to only what's needed
  5. Review all plans before approving execution

Current Behavior

Execution Safety: The current executor performs simple file operations:

  • CREATE adds files with placeholder content
  • MODIFY appends comments
  • DELETE marks files (safe approach)

Future versions will use LLM-powered code generation for intelligent modifications.


๐ŸŽ“ Learn More

Understanding the Agent System

GitPilot uses a multi-agent architecture:

  1. Repository Reader โ€“ Scans and understands your codebase
  2. Planner โ€“ Converts your goals into actionable steps with structured file operations
  3. Code Writer โ€“ Generates code based on the plan
  4. Reviewer โ€“ Checks for quality, safety, and best practices
  5. GitHub Tools โ€“ Interfaces with GitHub API

Each agent specializes in a specific task, working together like a development team.

Choosing the Right LLM Provider

OpenAI (GPT-4o, GPT-4o-mini)

  • โœ… Best for: General-purpose coding, fast responses
  • โœ… Strengths: Excellent code quality, great at following instructions
  • โš ๏ธ Costs: Moderate to high

Claude (Claude 3.5 Sonnet)

  • โœ… Best for: Complex refactoring, detailed analysis
  • โœ… Strengths: Deep reasoning, excellent at planning
  • โš ๏ธ Costs: Moderate to high

Watsonx (Llama, Granite)

  • โœ… Best for: Enterprise deployments, privacy-focused
  • โœ… Strengths: On-premise option, compliance-friendly
  • โš ๏ธ Costs: Subscription-based

Ollama (Local Models)

  • โœ… Best for: Cost-free operation, offline work
  • โœ… Strengths: Zero API costs, complete privacy
  • โš ๏ธ Performance: Depends on hardware, may be slower

โญ Don't forget to star GitPilot if you find it useful! โญ

โญ Star on GitHub โ€ข ๐Ÿ“– Documentation โ€ข ๐Ÿ› Report Bug โ€ข ๐Ÿ’ก Request Feature

GitPilot โ€“ Your AI Coding Companion for GitHub ๐Ÿš€

Made with โค๏ธ by Ruslan Magana Vsevolodovna

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

gitcopilot-0.1.1.tar.gz (140.2 kB view details)

Uploaded Source

Built Distribution

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

gitcopilot-0.1.1-py3-none-any.whl (135.8 kB view details)

Uploaded Python 3

File details

Details for the file gitcopilot-0.1.1.tar.gz.

File metadata

  • Download URL: gitcopilot-0.1.1.tar.gz
  • Upload date:
  • Size: 140.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for gitcopilot-0.1.1.tar.gz
Algorithm Hash digest
SHA256 a4964aaca27bcc69bdc12aba9d97939f250c6555ced17f08560c94eba70c6917
MD5 294ac366b9692639d68e748d06328764
BLAKE2b-256 6695a8fd9d410dd08bb5bbafd201709d9cb3848b6257f596e5bbd1934fa99068

See more details on using hashes here.

Provenance

The following attestation bundles were made for gitcopilot-0.1.1.tar.gz:

Publisher: release.yml on ruslanmv/gitpilot

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gitcopilot-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: gitcopilot-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 135.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for gitcopilot-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fb328c96c107ad552d3f7d5de726afd370cd8b994b685e20c7d96cd1b5a84ed6
MD5 734c46d9be92bb04b50b4a4e9b4de346
BLAKE2b-256 aea1fad2fc0e0baa0e1fe6fc5fa1897466db3ec7c006aff74f8dee2bc98ba359

See more details on using hashes here.

Provenance

The following attestation bundles were made for gitcopilot-0.1.1-py3-none-any.whl:

Publisher: release.yml on ruslanmv/gitpilot

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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