15bbfdcda2133fea5d3bd6887b096b74af2b8b38

- Add comprehensive Git workflow automation tools - Include branch management utilities - Add commit helpers with conventional commit support - Implement GitHub integration for PR management - Add configuration management system - Include comprehensive test coverage - Add professional documentation and examples
Git Automation CLI
A fast, practical Go CLI to automate frequent Git workflows. It provides utilities for branch management, commit helpers, sync operations, and integration with GitHub for pull requests and team coordination.
Features
- Branch utilities (create, switch, list)
- Commit helpers (with conventional commit support)
- Sync with remote (fetch, rebase, push)
- Clean local feature branches
- GitHub integration (create, list, merge pull requests)
- Configuration management
- Version information
Installation
From Source
git clone https://github.com/iwasforcedtobehere/git-automation-cli.git
cd git-automation-cli
go build -o gitauto ./cmd/gitauto
Using Go Install
go install github.com/iwasforcedtobehere/git-automation-cli/cmd/gitauto@latest
Configuration
Before using GitHub integration features, you need to configure your GitHub token:
# Set your GitHub token
gitauto config set github.token YOUR_GITHUB_TOKEN
# Set default branch (optional, defaults to 'main')
gitauto config set default.branch main
# Set default remote (optional, defaults to 'origin')
gitauto config set default.remote origin
Usage
General Commands
# Show help
gitauto help
# Show version
gitauto version
# Show configuration
gitauto config list
Branch Management
# Create a new branch
gitauto branch create feature/new-feature
# Switch to an existing branch
gitauto branch switch main
# List all branches
gitauto branch list
Commit Helpers
# Create a commit with a message
gitauto commit create "feat: add new feature"
# Create a commit with a body
gitauto commit create "feat: add new feature" --body "This commit adds a new feature that allows users to..."
# Create a commit with sign-off
gitauto commit create "feat: add new feature" --signoff
Sync Operations
# Sync current branch with its upstream and push
gitauto sync
# Dry run to see what would be done
gitauto sync --dry-run
Clean Local Branches
# Clean local feature branches
gitauto clean
# Dry run to see what would be deleted
gitauto clean --dry-run
Pull Request Operations
# Create a new pull request
gitauto pr create "feat: add new feature"
# Create a draft pull request
gitauto pr create "feat: add new feature" --draft
# Create a pull request with a custom base branch
gitauto pr create "feat: add new feature" --base develop
# List open pull requests
gitauto pr list
# List closed pull requests
gitauto pr list --state closed
# Merge a pull request
gitauto pr merge 42
# Merge a pull request with squash method
gitauto pr merge 42 --method squash
Global Flags
All commands support the following global flags:
--dry-run # Dry run mode (no changes made)
-v, --verbose # Verbose output
-h, --help # Help for the command
Requirements
- Go 1.22+
- Git installed and available in PATH
- GitHub token for GitHub integration features
Contributing
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'feat: add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
License
MIT
Description
A fast, practical Go CLI to automate frequent Git workflows. It provides utilities for branch management, commit helpers, sync operations, and integration with GitHub for pull requests and team coordination.
Languages
Go
100%