Skip to main content

Complete Git + GitHub automation CLI tool with interactive file management

Project description

🚀 Git-Auto Pro

Complete Git + GitHub Automation CLI Tool

Git-Auto Pro is a powerful command-line tool that automates your entire development workflow, from Git operations to GitHub repository management, project scaffolding, and CI/CD setup.

Python Version License PyPI

✨ Features

🔐 GitHub Authentication

  • Secure token storage using OS-level keyring (Keychain/Credential Manager/Secret Service)
  • Token validation via GitHub API
  • Support for Personal Access Tokens

📦 Repository Management

  • Create public/private repositories
  • Set descriptions, topics, and homepage URLs
  • Automatic remote configuration
  • Repository statistics and analytics

🎬 Project Creation

  • Complete project scaffolding with one command
  • Multiple language templates (Python, Node.js, C++, Rust, Go, Web)
  • Automatic Git initialization
  • GitHub repository creation and push

💻 Git Operations

  • Simplified Git commands with intuitive syntax
  • Branch management (create, switch, delete, list)
  • Stash operations
  • Merge with options (no-ff, squash)
  • Clone with shallow copy support
  • Interactive status and log display

📝 Generators

  • README.md: Professional, customizable README templates
  • LICENSE: Multiple license types (MIT, Apache, GPL, BSD, etc.)
  • .gitignore: Language-specific templates
  • Project Templates: Full project structures for various languages

⚙️ CI/CD Workflows

  • GitHub Actions workflows (CI, CD, testing, release)
  • GitLab CI configuration
  • Pre-configured for Python projects
  • Extensible to other platforms

🪝 Git Hooks

  • Pre-commit: Linting, formatting, testing
  • Pre-push: Full test suite, type checking
  • Commit-msg: Conventional commit validation
  • Post-commit: Custom notifications

📋 GitHub Templates

  • Issue templates (bug reports, feature requests)
  • Pull request templates
  • CONTRIBUTING.md generation
  • Standardized collaboration workflows

👥 Collaboration

  • Add collaborators to repositories
  • Branch protection rules
  • Permission management

💾 Backup & Restore

  • Create repository snapshots
  • Compress and archive entire projects
  • Restore from backups

⚙️ Configuration

  • Persistent configuration storage
  • Customizable defaults (branch names, commit messages, licenses)
  • Per-user settings

📦 Installation

From PyPI

pip install git-auto-pro

From Source

git clone https://github.com/yourusername/git-auto-pro.git
cd git-auto-pro
pip install -e .

Requirements

  • Python 3.8 or higher
  • Git installed on your system
  • GitHub Personal Access Token (for GitHub features)

🚀 Quick Start

1. Login to GitHub

git-auto login
# Enter your GitHub Personal Access Token when prompted

Creating a Token:

  1. Go to https://github.com/settings/tokens
  2. Click "Generate new token (classic)"
  3. Select scopes: repo, workflow, admin:org
  4. Copy the token

2. Create a New Project

git-auto new my-awesome-project
# This will:
# - Create project directory
# - Generate README, LICENSE, .gitignore
# - Initialize Git repository
# - Create GitHub repository
# - Push initial commit

3. Work with Git

# Stage and commit
git-auto add --all
git-auto commit "Add new feature"

# Or do it all at once
git-auto push "Add new feature" --branch main

# Check status
git-auto status

# View history
git-auto log --limit 5 --graph

📖 Command Reference

Authentication

git-auto login                          # Login to GitHub
git-auto login --token YOUR_TOKEN       # Login with token directly

Repository Management

git-auto create-repo myrepo                    # Create public repo
git-auto create-repo myrepo --private          # Create private repo
git-auto create-repo myrepo \
  --description "My project" \
  --homepage "https://example.com" \
  --topics "python,cli,automation"

Project Creation

git-auto new myproject                         # Interactive mode
git-auto new myproject --template python       # With template
git-auto new myproject --private               # Private repo
git-auto new myproject --no-github             # Skip GitHub

Git Operations

# Initialize
git-auto init                                  # Initialize Git
git-auto init --connect URL                    # Initialize and connect

# Basic commands
git-auto add file1.py file2.py                # Stage specific files
git-auto add --all                             # Stage all files
git-auto commit "message"                      # Commit
git-auto commit "message" --conventional       # Conventional commit
git-auto commit "message" --amend              # Amend last commit
git-auto push                                  # Push
git-auto push "message"                        # Add, commit, and push
git-auto push --force                          # Force push
git-auto pull                                  # Pull
git-auto pull --rebase                         # Pull with rebase

# Status and history
git-auto status                                # Formatted status
git-auto status --short                        # Short format
git-auto log                                   # Show commits
git-auto log --limit 20                        # Show 20 commits
git-auto log --oneline                         # One line per commit
git-auto log --graph                           # With graph

# Branches
git-auto branch                                # List branches
git-auto branch newbranch                      # Create branch
git-auto branch --list                         # List all branches
git-auto branch --remote                       # List remote branches
git-auto switch develop                        # Switch branch
git-auto switch -c feature                     # Create and switch
git-auto delete-branch feature                 # Delete branch
git-auto delete-branch feature --force         # Force delete

# Stash
git-auto stash                                 # Stash changes
git-auto stash --message "WIP"                 # Stash with message
git-auto stash --list                          # List stashes
git-auto stash-apply                           # Apply latest stash
git-auto stash-apply --index 1                 # Apply specific stash
git-auto stash-apply --pop                     # Apply and remove

# Merge
git-auto merge develop                         # Merge branch
git-auto merge develop --no-ff                 # No fast-forward
git-auto merge develop --squash                # Squash merge

# Clone
git-auto clone URL                             # Clone repository
git-auto clone URL --dir mydir                 # Clone to directory
git-auto clone URL --depth 1                   # Shallow clone

# Statistics
git-auto stats                                 # Basic stats
git-auto stats --detailed                      # Detailed stats

Generators

# README
git-auto readme                                # Interactive mode
git-auto readme --output docs/README.md        # Custom output

# License
git-auto license                               # Interactive selection
git-auto license --type MIT                    # Specific license
git-auto license --author "Your Name" --year 2024

# .gitignore
git-auto ignore                                # Interactive selection
git-auto ignore --template python              # Python template

# Templates
git-auto template python                       # Python project
git-auto template node                         # Node.js project
git-auto template cpp                          # C++ project
git-auto template web                          # Web project
git-auto template rust                         # Rust project
git-auto template go                           # Go project
git-auto ignore-manager                        # Launch interactive manager

# Features:
# - Browse all project files
# - Select files to ignore with checkboxes
# - Add patterns by type (folder, extension, file)
# - Use common presets (Python, Node, etc.)
# - View ignore status of all files
# - Clean already-tracked files

Workflows & Hooks

# CI/CD Workflows
git-auto workflow ci                           # GitHub Actions CI
git-auto workflow test                         # Test workflow
git-auto workflow cd                           # Deployment workflow
git-auto workflow release                      # Release workflow
git-auto workflow ci --platform gitlab         # GitLab CI

# Git Hooks
git-auto hook pre-commit                       # Pre-commit hook
git-auto hook pre-push                         # Pre-push hook
git-auto hook commit-msg                       # Commit message hook
git-auto hook post-commit                      # Post-commit hook
git-auto hook pre-commit --script custom.sh    # Custom script

# GitHub Templates
git-auto templates issue                       # Issue templates
git-auto templates pr                          # PR template
git-auto templates contributing                # CONTRIBUTING.md

Collaboration

# Add collaborators
git-auto collab username                       # Add to current repo
git-auto collab username --repo myrepo         # Add to specific repo
git-auto collab username --permission admin    # With permission level

# Branch protection
git-auto protect main                          # Protect main branch
git-auto protect develop --repo myrepo         # Protect specific branch

Backup & Restore

git-auto backup                                # Create backup
git-auto backup --output backup.tar.gz         # Custom filename
git-auto restore backup.tar.gz                 # Restore from backup

Configuration

git-auto config set default_branch develop     # Set default branch
git-auto config set default_license Apache-2.0 # Set default license
git-auto config set conventional_commits true  # Enable conventional commits
git-auto config get default_branch             # Get value
git-auto config list                           # List all config
git-auto config reset --yes                    # Reset to defaults

Utility

git-auto version                               # Show version
git-auto --help                                # Show help
git-auto COMMAND --help                        # Command-specific help

🎯 Use Cases

Starting a New Python Project

# Create and setup everything
git-auto new my-python-app --template python --private

# Navigate and start coding
cd my-python-app
# Project structure is ready with:
# - src/ directory
# - tests/ directory
# - requirements.txt
# - README.md, LICENSE, .gitignore
# - Git initialized and pushed to GitHub

Daily Development Workflow

# Morning: Start new feature
git-auto switch -c feature/new-login develop
git-auto pull

# During development
git-auto status
git-auto push "Implement login form"
git-auto push "Add validation"

# Evening: Merge to develop
git-auto switch develop
git-auto merge feature/new-login
git-auto push

Setting Up CI/CD

# Generate GitHub Actions workflows
git-auto workflow ci
git-auto workflow test
git-auto workflow cd

# Setup pre-commit hooks
git-auto hook pre-commit
git-auto hook pre-push

# Commit and push
git-auto push "Setup CI/CD pipeline"

Collaborative Development

# Setup branch protection
git-auto protect main
git-auto protect develop

# Add team members
git-auto collab teammate1 --permission push
git-auto collab teammate2 --permission admin

# Generate templates
git-auto templates issue
git-auto templates pr
git-auto templates contributing

🔧 Configuration Options

Configuration is stored in ~/.git-auto-config.json

Available options:

  • default_branch: Default branch name (default: "main")
  • default_commit_message: Default commit message
  • default_license: Default license type (default: "MIT")
  • default_project_type: Default project template
  • auto_push: Automatically push after commit
  • conventional_commits: Enforce conventional commits
  • editor: Default text editor
  • git_user_name: Git username
  • git_user_email: Git email

🤝 Contributing

Contributions are welcome! Please see CONTRIBUTING.md for details.

  1. Fork the repository
  2. Create a feature branch (git-auto switch -c feature/amazing)
  3. Commit your changes (git-auto commit "Add amazing feature")
  4. Push to the branch (git-auto push)
  5. Open a Pull Request

📝 License

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

🙏 Acknowledgments

  • Built with Typer for the CLI
  • Uses GitPython for Git operations
  • Powered by Rich for beautiful terminal output
  • Token storage via keyring

📞 Support

🗺️ Roadmap

  • VS Code extension integration
  • GitLab support
  • Bitbucket support
  • Interactive TUI mode
  • Plugin system for custom commands
  • Team workspace management
  • Advanced analytics dashboard

Made with ❤️ by developers, for developers

⭐ Star this repo if you find it useful!

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

git_auto_pro-1.0.0.tar.gz (57.8 kB view details)

Uploaded Source

Built Distribution

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

git_auto_pro-1.0.0-py3-none-any.whl (42.1 kB view details)

Uploaded Python 3

File details

Details for the file git_auto_pro-1.0.0.tar.gz.

File metadata

  • Download URL: git_auto_pro-1.0.0.tar.gz
  • Upload date:
  • Size: 57.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for git_auto_pro-1.0.0.tar.gz
Algorithm Hash digest
SHA256 7a4d8558a1a12d3f57611117f13035f2c84cde7b0c27292dd0a0d188c0505a38
MD5 8e4e67d2622f7555d9f5ae1ecf65428e
BLAKE2b-256 12e736e60dd7b5cd49e38dffa9d56ef016aede7b065a5c1671c2cd6b53dc71dc

See more details on using hashes here.

File details

Details for the file git_auto_pro-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: git_auto_pro-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 42.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for git_auto_pro-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 83953922e25289fb964b6ca6723c2380cfdab9f46d5a9d102981a2f33defd3b4
MD5 86340c3ceeb638c84c9f864d70877359
BLAKE2b-256 4e119033c626f2a0f56171fff5f3776a0443e8f2df88e9aad456eba4b6c1c82d

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