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
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
reposcope) - 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:
- Start the FastAPI backend on
http://127.0.0.1:8000 - Serve the web UI at the root URL
- 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
- Click "โ๏ธ Admin / Settings" in the sidebar
- Select your preferred provider (e.g., OpenAI)
- Enter your API key and select a model (e.g.,
gpt-4o-mini) - Click "Save settings"
- See the success message confirming your settings are saved
Step 3: Connect to GitHub Repository
- Click "๐ Workspace" to return to the main interface
- In the sidebar, use the search box to find your repository
- Click "Search my repos" to list all accessible repositories
- 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 repositoriesGET /api/repos/{owner}/{repo}/treeโ Get repository file treeGET /api/repos/{owner}/{repo}/fileโ Get file contentsPOST /api/repos/{owner}/{repo}/fileโ Update/commit file
Settings & Configuration
GET /api/settingsโ Get current LLM settingsPOST /api/settings/providerโ Change active providerPUT /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
- Update version in
gitpilot/version.py - Create and publish a GitHub release (tag format:
vX.Y.Z) - 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
๐ค Contributing
We love contributions! Whether it's bug fixes, new features, or documentation improvements.
How to Contribute
- โญ Star the repository (if you haven't already!)
- ๐ด Fork the repository
- ๐ฟ Create a feature branch (
git checkout -b feature/amazing-feature) - โ๏ธ Make your changes
- โ
Run tests (
make test) - ๐จ Run linter (
make lint) - ๐ Commit your changes (
git commit -m 'Add amazing feature') - ๐ Push to the branch (
git push origin feature/amazing-feature) - ๐ฏ 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
- GitHub: @ruslanmv
- Website: ruslanmv.com
๐ 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
- Issues: https://github.com/ruslanmv/gitpilot/issues
- Discussions: https://github.com/ruslanmv/gitpilot/discussions
- Documentation: Full Documentation
๐บ๏ธ 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
- Never commit API keys to version control
- Use environment variables or the Admin UI for credentials
- Rotate tokens regularly
- Limit GitHub token scopes to only what's needed
- 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:
- Repository Reader โ Scans and understands your codebase
- Planner โ Converts your goals into actionable steps with structured file operations
- Code Writer โ Generates code based on the plan
- Reviewer โ Checks for quality, safety, and best practices
- 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
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 gitcopilot-0.1.0.tar.gz.
File metadata
- Download URL: gitcopilot-0.1.0.tar.gz
- Upload date:
- Size: 132.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
06f69759bacd87bf2b94dfc4abd3d6c70ad2c93e8bea452713acac3268449154
|
|
| MD5 |
52cbc84f06976c60a9a24da880ba4464
|
|
| BLAKE2b-256 |
497b24fe35999e6a35c78a33ff8df46e9f3c92848714325b31c7a4bb535d94c4
|
Provenance
The following attestation bundles were made for gitcopilot-0.1.0.tar.gz:
Publisher:
release.yml on ruslanmv/gitpilot
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gitcopilot-0.1.0.tar.gz -
Subject digest:
06f69759bacd87bf2b94dfc4abd3d6c70ad2c93e8bea452713acac3268449154 - Sigstore transparency entry: 701639072
- Sigstore integration time:
-
Permalink:
ruslanmv/gitpilot@62d9bd8fae36f62f8018ed109e69c62504e88538 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/ruslanmv
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@62d9bd8fae36f62f8018ed109e69c62504e88538 -
Trigger Event:
release
-
Statement type:
File details
Details for the file gitcopilot-0.1.0-py3-none-any.whl.
File metadata
- Download URL: gitcopilot-0.1.0-py3-none-any.whl
- Upload date:
- Size: 127.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aecae49de91fea37eebb3ae4dd7a7029651f4b29cad4a8d382f661b70eb598ad
|
|
| MD5 |
99029a43d5eb6a5b3801006b66d91708
|
|
| BLAKE2b-256 |
b97a4d54d039f92cc0f3d30773ee378bd2fd0e6e9f5ea7fc2c574f2712d7f5ca
|
Provenance
The following attestation bundles were made for gitcopilot-0.1.0-py3-none-any.whl:
Publisher:
release.yml on ruslanmv/gitpilot
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gitcopilot-0.1.0-py3-none-any.whl -
Subject digest:
aecae49de91fea37eebb3ae4dd7a7029651f4b29cad4a8d382f661b70eb598ad - Sigstore transparency entry: 701639074
- Sigstore integration time:
-
Permalink:
ruslanmv/gitpilot@62d9bd8fae36f62f8018ed109e69c62504e88538 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/ruslanmv
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@62d9bd8fae36f62f8018ed109e69c62504e88538 -
Trigger Event:
release
-
Statement type: