Skip to main content

An all-in-one developer assistant for Git workflows, hosting, and AI automation.

Project description

๐Ÿš€ RepoPi

An all-in-one developer assistant for Git workflows, hosting, and AI automation

PyPI version Python Support License: MIT Code style: black Ruff CI

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

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

  1. Project Config (.repopi.yml) - Highest priority
  2. User Config (~/.repopi/config.json) - Global defaults
  3. Environment Variables - Runtime overrides
  4. 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

Quick Links

๐Ÿค 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

  1. Fork the repository on GitHub
  2. Clone your fork locally
  3. Create a feature branch (git checkout -b feature/amazing-feature)
  4. Make your changes with tests and documentation
  5. Run quality checks (pre-commit run --all-files)
  6. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

repopi-0.1.3.tar.gz (20.7 kB view details)

Uploaded Source

Built Distribution

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

repopi-0.1.3-py3-none-any.whl (19.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: repopi-0.1.3.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

Hashes for repopi-0.1.3.tar.gz
Algorithm Hash digest
SHA256 932fcf64ac4bb8b7860abacb1a124a9d64e9fc8ff719a28514b5f9dc18a7ee39
MD5 1653ad6f06038000154b49d591a13a1b
BLAKE2b-256 edf0049f8a6440cbfd460bb9c170ac72997877817d638a9b7d7f372a0a184c70

See more details on using hashes here.

File details

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

File metadata

  • Download URL: repopi-0.1.3-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

Hashes for repopi-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 6af0e74fdfeb06897207e9d15133969a3252ac6efd7505e50e672f97bb08e706
MD5 d051c1918f1aa5216841136d00071e20
BLAKE2b-256 9712040349bb12bfb25184cfb5d0c34154c4f797e81efd003fa02222da6ac95d

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