An all-in-one developer assistant for Git workflows, hosting, and AI automation.
Project description
RepoPi streamlines everyday Git workflows and integrates Git hosting features, AI automation, and team productivity toolsโdirectly in the terminal. Replace multiple tools (Git CLI + GitHub/GitLab CLI + ad-hoc AI helpers) with a single, powerful, extensible CLI.
๐ Table of Contents
- Features
- Installation
- Quick Start
- Commands Overview
- Configuration
- AI Features
- Platform Integration
- Examples
- Development
- Documentation
- Contributing
- License
- Support
โจ Features
| Feature | Description | Benefits |
|---|---|---|
| ๐ง Git Automation | Streamlined branch management, commits, pushes, and cleanup | Reduce repetitive Git commands by 80% |
| ๐ค AI Integration | AI-powered commit messages and code review assistance | Generate conventional commits automatically |
| ๐ Platform Support | GitHub and GitLab integration for issues, PRs, and releases | Manage repositories without leaving terminal |
| ๐จ Beautiful CLI | Rich terminal interface with colors, tables, and progress bars | Enhanced developer experience |
| โ๏ธ Configurable | Project-level and user-level configuration support | Customize workflows per project |
| ๐ Secure | Encrypted token storage with minimal scope requirements | Enterprise-grade security |
Core Capabilities
- Intelligent Git Workflows: Smart branch management with automatic cleanup
- AI-Powered Development: Generate commit messages, review code, analyze issues
- Multi-Platform Integration: Seamless GitHub and GitLab operations
- Team Collaboration: Streamlined PR/MR creation and review processes
- Configuration Management: Flexible project and user-level settings
- Terminal-First Design: Beautiful, fast, and keyboard-friendly interface
๐ฆ Installation
Recommended: pipx (Isolated Installation)
# Install pipx if you haven't already
python -m pip install --user pipx
python -m pipx ensurepath
# Install RepoPi
pipx install repopi
Alternative: pip
# Global installation
pip install repopi
# User installation
pip install --user repopi
Development Installation
# Clone the repository
git clone https://github.com/saky-semicolon/repopi.git
cd repopi
# Install in development mode
pip install -e .
System Requirements
- Python: 3.9+ (3.11+ recommended)
- Git: 2.20+ installed and configured
- Terminal: Any modern terminal with Unicode support
- APIs: Optional OpenAI API key for AI features
๐ Quick Start
1. Initialize RepoPi
# Navigate to your Git repository
cd your-project
# Initialize RepoPi (creates .repopi.yml)
repopi init
2. Configure Credentials
# Essential: Configure your platform tokens
repopi config set github-token YOUR_GITHUB_TOKEN
repopi config set gitlab-token YOUR_GITLAB_TOKEN
# Optional: Enable AI features
repopi config set openai-key YOUR_OPENAI_KEY
# Verify configuration
repopi config show
3. Basic Workflow
# Create a feature branch
repopi git branch feature/awesome-feature
# Make your code changes...
# Add files to staging
git add .
# Generate AI-powered commit message
repopi ai commit
# Push with enhanced workflow
repopi git push
# Create a pull request
repopi github pr create
๐ Commands Overview
RepoPi organizes commands into logical groups for intuitive usage.
Git Commands
| Command | Description | Example |
|---|---|---|
repopi git branch <name> |
Create and switch to new branch | repopi git branch feature/auth |
repopi git push [message] |
Enhanced push with optional commit | repopi git push "Fix auth bug" |
repopi git log [--graph] |
Beautiful commit history | repopi git log --graph |
repopi git cleanup |
Clean up merged branches | repopi git cleanup |
repopi git status |
Enhanced git status with insights | repopi git status |
AI Commands
| Command | Description | Use Case |
|---|---|---|
repopi ai commit |
Generate commit message from diff | Auto-generate conventional commits |
repopi ai review |
AI code review assistance | Get suggestions before PR |
repopi ai issue |
Analyze and categorize issues | Smart issue triage |
Configuration Commands
| Command | Description | Scope |
|---|---|---|
repopi config show |
Display current configuration | User + Project |
repopi config set <key> <value> |
Set configuration values | Persistent storage |
repopi config get <key> |
Get specific configuration value | Quick lookup |
repopi config reset |
Reset to default configuration | Clean slate |
GitHub Integration
| Command | Description | Output |
|---|---|---|
repopi github pr create |
Create pull request | Interactive PR creation |
repopi github pr list |
List repository PRs | Formatted table |
repopi github issues list |
List repository issues | Filter and search |
repopi github issues create |
Create new issue | Template-based |
repopi github release create |
Create new release | Automated changelog |
GitLab Integration
| Command | Description | Features |
|---|---|---|
repopi gitlab mr create |
Create merge request | Smart templates |
repopi gitlab mr list |
List merge requests | Status filtering |
repopi gitlab issues list |
List project issues | Label filtering |
repopi gitlab pipeline status |
Check pipeline status | Real-time updates |
๐ ๏ธ Configuration
RepoPi uses a hierarchical configuration system that provides flexibility and security.
Configuration Hierarchy
- Project Config (
.repopi.yml) - Highest priority - User Config (
~/.repopi/config.json) - Global defaults - Environment Variables - Runtime overrides
- Built-in Defaults - Fallback values
User Configuration
# Location: ~/.repopi/config.json
repopi config set github-token ghp_your_token_here
repopi config set gitlab-token glpat-your-token-here
repopi config set openai-key sk-your-openai-key
repopi config set default-branch main
repopi config set commit-style conventional
Project Configuration
# Location: .repopi.yml (created by 'repopi init')
project:
name: "My Awesome Project"
default_branch: "main"
commit_style: "conventional"
github:
repository: "username/repo-name"
auto_pr: true
gitlab:
project_id: 12345
auto_mr: true
ai:
commit_template: "conventional"
review_depth: "detailed"
Environment Variables
export REPOPI_GITHUB_TOKEN="ghp_your_token"
export REPOPI_GITLAB_TOKEN="glpat_your_token"
export REPOPI_OPENAI_KEY="sk_your_key"
Configuration Options
| Key | Type | Description | Default |
|---|---|---|---|
github-token |
String | GitHub personal access token | None |
gitlab-token |
String | GitLab personal access token | None |
openai-key |
String | OpenAI API key for AI features | None |
default-branch |
String | Default branch name | main |
commit-style |
String | Commit message style (conventional, simple) |
conventional |
auto-push |
Boolean | Auto-push after commit | false |
auto-pr |
Boolean | Auto-create PR after push | false |
๐ค AI Features
RepoPi integrates cutting-edge AI to enhance your development workflow.
Smart Commit Messages
# Make changes to your code
echo "console.log('Hello World');" > app.js
git add app.js
# Generate AI-powered commit message
repopi ai commit
# Output: "feat: add hello world functionality to app.js"
Supported Commit Styles:
- Conventional Commits:
feat:,fix:,docs:,style:,refactor:,test:,chore: - Simple: Clear, descriptive messages
- Custom: Define your own templates
Code Review Assistant
# Get AI review of your changes
repopi ai review
# Sample output:
# ๐ AI Code Review
# โ
Good: Clear variable naming
# โ ๏ธ Warning: Consider error handling
# ๐ก Suggestion: Add type hints for better maintainability
Issue Analysis
# Analyze and categorize issues
repopi ai issue analyze
# Auto-categorize by:
# - Bug reports vs feature requests
# - Priority levels
# - Estimated complexity
# - Required expertise
AI Configuration
# Configure AI behavior
repopi config set ai-model "gpt-4"
repopi config set ai-temperature 0.7
repopi config set ai-max-tokens 150
๐ Platform Integration
GitHub Integration
Authentication Setup
# Create a Personal Access Token at:
# https://github.com/settings/tokens/new
# Required scopes:
# - repo (for private repositories)
# - public_repo (for public repositories)
# - workflow (for GitHub Actions)
repopi config set github-token ghp_your_token_here
Common Workflows
# Create and push feature branch
repopi git branch feature/new-api
# ... make changes ...
repopi ai commit
repopi git push
# Create pull request with AI-generated description
repopi github pr create --ai-description
# Review and merge
repopi github pr review --ai-suggestions
repopi github pr merge
GitLab Integration
Authentication Setup
# Create a Personal Access Token at:
# https://gitlab.com/-/profile/personal_access_tokens
# Required scopes:
# - api (full API access)
# - read_repository
# - write_repository
repopi config set gitlab-token glpat-your-token-here
Common Workflows
# Create merge request
repopi gitlab mr create --title "Add new feature" --description "Detailed description"
# Check pipeline status
repopi gitlab pipeline status
# Review merge request
repopi gitlab mr review --id 123
๐ก Examples
Example 1: Feature Development Workflow
# Start new feature
repopi git branch feature/user-authentication
# Make code changes...
# Add new files and modifications
git add .
# Generate commit with AI
repopi ai commit
# Output: "feat: implement JWT-based user authentication system"
# Push with enhanced workflow
repopi git push
# Create pull request with AI description
repopi github pr create --ai-description
Example 2: Bug Fix Workflow
# Create hotfix branch
repopi git branch hotfix/fix-login-redirect
# Fix the bug...
git add .
# Generate fix commit
repopi ai commit
# Output: "fix: resolve login redirect loop in auth middleware"
# Quick push and PR
repopi git push && repopi github pr create --urgent
Example 3: Code Review Automation
# Before creating PR, get AI review
repopi ai review
# Sample AI feedback:
# ๐ Code Review Summary:
# โ
Code quality: Good
# โ ๏ธ Security: Add input validation
# ๐ก Performance: Consider caching
# ๐ Documentation: Add JSDoc comments
# Apply suggestions and commit
repopi ai commit --include-review-fixes
Example 4: Team Collaboration
# Check team activity
repopi github activity --team
# Review pending PRs
repopi github pr list --status pending --assigned-to me
# Batch review PRs
repopi github pr review --batch --ai-assist
๐๏ธ Development
Prerequisites
- Python 3.9+ (3.11+ recommended for best performance)
- Git 2.20+ with proper configuration
- Poetry (recommended) or pip for dependency management
- Node.js 16+ (optional, for docs development)
Development Setup
# Clone the repository
git clone https://github.com/saky-semicolon/repopi.git
cd repopi
# Install Poetry (if not installed)
curl -sSL https://install.python-poetry.org | python3 -
# Install dependencies
poetry install
# Activate virtual environment
poetry shell
# Install pre-commit hooks
pre-commit install
# Verify installation
repopi --version
Project Structure
repopi/
โโโ repopi/ # Main package
โ โโโ commands/ # CLI command modules
โ โ โโโ ai/ # AI-related commands
โ โ โโโ github/ # GitHub integration
โ โ โโโ gitlab/ # GitLab integration
โ โโโ utils/ # Utility modules
โโโ tests/ # Test suite
โโโ docs/ # Documentation
โโโ pyproject.toml # Project configuration
โโโ README.md # This file
Running Tests
# Run all tests
pytest
# Run with coverage report
pytest --cov=repopi --cov-report=html --cov-report=term
# Run specific test categories
pytest -m unit # Unit tests only
pytest -m integration # Integration tests only
pytest -m slow # Long-running tests
# Run tests for specific module
pytest tests/test_git.py
# Run with verbose output
pytest -v --tb=short
Code Quality
RepoPi maintains high code quality standards:
# Format code
black .
isort .
# Lint code
ruff check .
ruff check . --fix # Auto-fix issues
# Type checking
mypy .
# Security scan
bandit -r repopi/
# Run all quality checks
pre-commit run --all-files
Quality Standards
- Code Coverage: Minimum 85%
- Type Coverage: 100% (strict mypy)
- Security: No high/critical vulnerabilities
- Performance: Commands under 2s response time
- Documentation: All public APIs documented
Building Documentation
# Install docs dependencies
pip install -e ".[docs]"
# Build documentation
mkdocs build
# Serve documentation locally
mkdocs serve
# Deploy to GitHub Pages
mkdocs gh-deploy
Release Process
# Use the automated release script
./release.sh 0.2.0
# Or manually:
# 1. Update version in pyproject.toml and __init__.py
# 2. Update CHANGELOG.md
# 3. Commit changes
# 4. Create tag and push
git tag v0.2.0
git push origin main --tags
๐ Documentation
Complete Documentation Suite
- User Manual - Comprehensive usage guide with examples
- Security Policy - Security policies and vulnerability reporting
Quick Links
- ๐ Documentation Site
- ๐ฌ Community Forum
- ๐ Issue Tracker
๐ค Contributing
We welcome contributions from developers of all skill levels! Here's how you can help:
Ways to Contribute
- ๐ Report Bugs: Submit detailed bug reports with reproduction steps
- โจ Request Features: Propose new features with clear use cases
- ๐ป Code Contributions: Submit pull requests for bug fixes or features
- ๐ Documentation: Improve docs, examples, and tutorials
- ๐งช Testing: Add test cases or improve test coverage
- ๐ Translations: Help internationalize RepoPi
Getting Started
- Fork the repository on GitHub
- Clone your fork locally
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes with tests and documentation
- Run quality checks (
pre-commit run --all-files) - Submit a pull request with clear description
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Acknowledgments
RepoPi is built on the shoulders of giants. Special thanks to:
Core Technologies
- Typer - Modern CLI framework with excellent developer experience
- Rich - Beautiful and powerful terminal formatting library
- GitPython - Comprehensive Git repository interaction
- PyGithub - Complete GitHub API integration
- python-gitlab - Full-featured GitLab API client
AI and ML
- OpenAI - GPT models for intelligent code assistance
- Pydantic - Data validation and settings management
Development Tools
- Poetry - Modern dependency management and packaging
- pytest - Comprehensive testing framework
- Black - Uncompromising code formatter
- Ruff - Extremely fast Python linter
- mypy - Static type checker
Contact: saky.aiu22@gmail.com
Project details
Release history Release notifications | RSS feed
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 repopi-0.1.1.tar.gz.
File metadata
- Download URL: repopi-0.1.1.tar.gz
- Upload date:
- Size: 20.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.4 CPython/3.9.6 Darwin/24.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d2fa071a145e70f6ae673fb319634faa4d94a8af500871ab74845e840d8f00ee
|
|
| MD5 |
a3bf6ae19904ae65f250906ee43606a8
|
|
| BLAKE2b-256 |
99347d67d46b555ed1efbb865b2688140dd91563083c8b6f650c3bc7967b95d2
|
File details
Details for the file repopi-0.1.1-py3-none-any.whl.
File metadata
- Download URL: repopi-0.1.1-py3-none-any.whl
- Upload date:
- Size: 19.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.4 CPython/3.9.6 Darwin/24.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7fe5c0e285f792a260111c78f776bde3ea2d332c0091251024020813309cd91d
|
|
| MD5 |
ba10f63d06cb78be3e61b3a9ef95e95d
|
|
| BLAKE2b-256 |
923d5bc0ac187516e3cac1e079f41917af296870b502e661fd41e4d331259c15
|