Skip to main content

A comprehensive Git workflow management CLI tool

Project description

GitFlow Studio ๐Ÿš€

A comprehensive CLI tool for Git and GitHub workflow management with advanced analytics, interactive mode, and powerful Git operations.

Python 3.9+ License: MIT PyPI

โœจ Features

  • ๐Ÿ”ง Git Operations: Status, commit, push, pull, branch management
  • ๐ŸŒŠ Git Flow: Feature, release, and hotfix branch workflows
  • ๐Ÿ”— GitHub Integration: Repository listing, cloning, search, OAuth authentication
  • ๐Ÿ“Š Analytics: Repository statistics, commit activity, contributor insights
  • ๐ŸŽฏ Interactive Mode: User-friendly command-line interface
  • ๐Ÿ”„ Advanced Git: Cherry-pick, revert, interactive rebase, squash
  • ๐Ÿท๏ธ Tag Management: Create, delete, list, and show tags
  • ๐Ÿ“ฆ Stash Operations: Create, list, and pop stashes
  • ๐Ÿ” Repository Discovery: Find Git repositories automatically
  • ๐ŸŽจ Rich UI: Beautiful tables, panels, and formatted output

๐Ÿš€ Quick Start

Installation

# Install from PyPI
pip install gitflow-studio

# Or use the installation script
curl -sSL https://raw.githubusercontent.com/Sherin-SEF-AI/GitFlow-Studio/main/install.sh | bash

Basic Usage

# Show help
gitflow-studio --help

# Interactive mode
gitflow-studio --interactive

# Discover repositories
gitflow-studio --discover

# Show repository status
gitflow-studio --repo /path/to/repo status

๐Ÿ“‹ Commands Overview

Repository Management

  • discover - Find Git repositories in current directory
  • repo info - Show current repository information

Git Operations

  • status - Show repository status
  • log - Show commit log
  • branches - List all branches
  • checkout <ref> - Checkout branch or commit
  • commit <message> - Create commit with message
  • push - Push changes to remote
  • pull - Pull changes from remote

Branch Management

  • branch create <name> - Create new branch
  • branch delete <name> - Delete local branch
  • branch delete-remote <name> - Delete remote branch
  • branch rename <old> <new> - Rename branch

Advanced Git Operations

  • cherry-pick <hash> - Cherry-pick a commit
  • revert <hash> - Revert a commit
  • rebase-interactive <base> - Interactive rebase
  • squash <count> - Squash last N commits

Stash Operations

  • stash [message] - Create stash (optional message)
  • stash list - List all stashes
  • stash pop - Pop latest stash

Tag Operations

  • tag list - List all tags
  • tag create <name> - Create a new tag
  • tag delete <name> - Delete a tag
  • tag show <name> - Show tag details

Git Flow Operations

  • gitflow init - Initialize Git Flow
  • gitflow feature start <name> - Start feature branch
  • gitflow feature finish <name> - Finish feature branch
  • gitflow release start <version> - Start release branch
  • gitflow release finish <version> - Finish release branch

GitHub Operations

  • github login - Login to GitHub
  • github logout - Logout from GitHub
  • github repos - List your GitHub repositories
  • github clone <name> - Clone a repository by name
  • github search <query> - Search GitHub repositories

Analytics & Statistics

  • analytics stats - Show comprehensive repository statistics
  • analytics activity [days] - Show commit activity over time
  • analytics files - Show file change statistics
  • analytics branches - Show branch activity and health
  • analytics contributors - Show contributor statistics
  • analytics health - Show repository health indicators

๐ŸŽฏ Detailed Usage Examples

Repository Discovery and Setup

# Discover Git repositories in current directory
gitflow-studio --discover

# Set repository and show status
gitflow-studio --repo /path/to/my-project status

# Show repository information
gitflow-studio --repo /path/to/my-project repo info

Basic Git Operations

# Show repository status
gitflow-studio --repo . status

# Show last 10 commits
gitflow-studio --repo . log --max-count 10

# Show commits with graph
gitflow-studio --repo . log --graph --oneline

# Create a new commit
gitflow-studio --repo . commit "Add new feature"

# Push changes
gitflow-studio --repo . push

# Pull latest changes
gitflow-studio --repo . pull

Branch Management

# List all branches
gitflow-studio --repo . branches

# Create a new feature branch
gitflow-studio --repo . branch create feature/new-feature

# Checkout a branch
gitflow-studio --repo . checkout feature/new-feature

# Rename a branch
gitflow-studio --repo . branch rename old-branch new-branch

# Delete a local branch
gitflow-studio --repo . branch delete feature/old-feature

# Delete a remote branch
gitflow-studio --repo . branch delete-remote feature/old-feature

Advanced Git Operations

# Cherry-pick a specific commit
gitflow-studio --repo . cherry-pick abc1234

# Revert a commit
gitflow-studio --repo . revert abc1234

# Interactive rebase onto main
gitflow-studio --repo . rebase-interactive main

# Squash last 3 commits
gitflow-studio --repo . squash 3

Stash Operations

# Create a stash
gitflow-studio --repo . stash "Work in progress"

# List all stashes
gitflow-studio --repo . stash list

# Pop the latest stash
gitflow-studio --repo . stash pop

Tag Management

# List all tags
gitflow-studio --repo . tag list

# Create a new tag
gitflow-studio --repo . tag create v1.0.0

# Show tag details
gitflow-studio --repo . tag show v1.0.0

# Delete a tag
gitflow-studio --repo . tag delete v0.9.0

Git Flow Workflow

# Initialize Git Flow
gitflow-studio --repo . gitflow init

# Start a new feature
gitflow-studio --repo . gitflow feature start my-feature

# Finish a feature (merges to develop)
gitflow-studio --repo . gitflow feature finish my-feature

# Start a release
gitflow-studio --repo . gitflow release start v1.0.0

# Finish a release (merges to main and develop)
gitflow-studio --repo . gitflow release finish v1.0.0

GitHub Integration

# Login to GitHub (OAuth)
gitflow-studio --repo . github login

# List your repositories
gitflow-studio --repo . github repos

# Clone a repository by name
gitflow-studio --repo . github clone my-username/my-repo

# Search repositories
gitflow-studio --repo . github search "python cli tool"

# Logout from GitHub
gitflow-studio --repo . github logout

Analytics and Statistics

# Show comprehensive repository statistics
gitflow-studio --repo . analytics stats

# Show commit activity over last 30 days
gitflow-studio --repo . analytics activity 30

# Show file change statistics
gitflow-studio --repo . analytics files

# Show branch activity and health
gitflow-studio --repo . analytics branches

# Show contributor statistics
gitflow-studio --repo . analytics contributors

# Show repository health indicators
gitflow-studio --repo . analytics health

Interactive Mode

# Start interactive mode
gitflow-studio --interactive

# In interactive mode, you can run commands without --repo flag:
gitflow-studio> status
gitflow-studio> log --max-count 5
gitflow-studio> branch create feature/interactive-test
gitflow-studio> analytics stats
gitflow-studio> exit

๐Ÿ”ง Configuration

GitHub Authentication

GitFlow Studio uses OAuth for GitHub authentication. When you run github login, it will:

  1. Open your browser for GitHub OAuth authorization
  2. Store the access token securely using your system's keyring
  3. Use the token for all GitHub API operations

Repository Discovery

The --discover command automatically finds Git repositories in the current directory and subdirectories, displaying them in a formatted table.

๐Ÿ“Š Analytics Features

Repository Statistics

  • Total commits, branches, tags, and files
  • Repository size information
  • Recent commit activity
  • Current branch status

Commit Activity

  • Commit frequency over time
  • Daily, weekly, and monthly patterns
  • Peak activity periods
  • Contributor activity trends

File Changes

  • Most modified files
  • File change frequency
  • File size statistics
  • File type distribution

Branch Health

  • Branch activity levels
  • Branch age and status
  • Merge patterns
  • Branch protection status

Contributor Insights

  • Top contributors
  • Contribution patterns
  • Activity heatmaps
  • Collaboration metrics

Repository Health

  • Code quality indicators
  • Documentation coverage
  • Issue and PR statistics
  • Overall project health score

๐Ÿ› ๏ธ Development

Installation for Development

# Clone the repository
git clone https://github.com/Sherin-SEF-AI/GitFlow-Studio.git
cd GitFlow-Studio

# Install in development mode
pip install -e .

# Run tests
python -m pytest studio/tests/

Project Structure

studio/
โ”œโ”€โ”€ __init__.py
โ”œโ”€โ”€ __main__.py
โ”œโ”€โ”€ cli.py                 # Main CLI interface
โ”œโ”€โ”€ core/                  # Core application logic
โ”‚   โ”œโ”€โ”€ app_context.py
โ”‚   โ”œโ”€โ”€ plugin_base.py
โ”‚   โ””โ”€โ”€ plugin_loader.py
โ”œโ”€โ”€ db/                    # Database operations
โ”‚   โ””โ”€โ”€ sqlite_manager.py
โ”œโ”€โ”€ git/                   # Git operations
โ”‚   โ”œโ”€โ”€ async_git.py
โ”‚   โ””โ”€โ”€ git_operations.py
โ”œโ”€โ”€ github/                # GitHub integration
โ”‚   โ”œโ”€โ”€ auth.py
โ”‚   โ”œโ”€โ”€ config_template.py
โ”‚   โ””โ”€โ”€ repos.py
โ”œโ”€โ”€ plugins/               # Plugin system
โ”‚   โ””โ”€โ”€ example_plugin.py
โ”œโ”€โ”€ tests/                 # Test files
โ”‚   โ”œโ”€โ”€ test_basic.py
โ”‚   โ””โ”€โ”€ test_comprehensive.py
โ””โ”€โ”€ utils/                 # Utility functions
    โ””โ”€โ”€ repo_discovery.py

๐Ÿ“ Requirements

  • Python: 3.9 or higher
  • Git: For Git operations
  • Internet Connection: For GitHub features
  • Dependencies: Automatically installed via pip

๐Ÿค Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Commit your changes: git commit -m 'Add amazing feature'
  4. Push to the branch: git push origin feature/amazing-feature
  5. Open a Pull Request

๐Ÿ“„ License

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

๐Ÿ™ Acknowledgments

  • Built with Rich for beautiful CLI output
  • Uses GitPython for Git operations
  • GitHub integration powered by PyGithub
  • CLI framework built with Click

๐Ÿ“ž Support


Made with โค๏ธ by Sherin Joseph Roy

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

gitflow_studio-1.0.1.tar.gz (40.1 kB view details)

Uploaded Source

Built Distribution

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

gitflow_studio-1.0.1-py3-none-any.whl (44.4 kB view details)

Uploaded Python 3

File details

Details for the file gitflow_studio-1.0.1.tar.gz.

File metadata

  • Download URL: gitflow_studio-1.0.1.tar.gz
  • Upload date:
  • Size: 40.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for gitflow_studio-1.0.1.tar.gz
Algorithm Hash digest
SHA256 489139b6cd7b5d0cf76bd4882ec4957927eed26f3f505e40f3c8d845acf8ce54
MD5 e77b628e9a551eb65933c1987de9d92c
BLAKE2b-256 6a2b3611b86d56fa7668ea8e6e40827f2afbe7821a1f00c7766ccbb9d3215551

See more details on using hashes here.

File details

Details for the file gitflow_studio-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: gitflow_studio-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 44.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for gitflow_studio-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 adacc59a3d72f8615b5fa37730438b1ea9196da2f4b78cd5b60a9889edf073b5
MD5 bca1361951a8907c44732b04ac4f0f39
BLAKE2b-256 18ab756e3fd1b1a7c8ae11ae7400d48ac1bcaa5a951e2c8690b65643bc2036bf

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