Skip to content

ritankarsaha/GitHubber

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

15 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ GitHubber - Advanced Git & GitHub CLI Tool

Build Status License Go Version GitHub release

A powerful, beautiful, and feature-rich command-line interface for Git and GitHub operations

Created by Ritankar Saha

✨ Features

GitHubber is a comprehensive CLI tool that supercharges your Git and GitHub workflow with:

πŸ›  Core Git Operations

  • Repository Management: Initialize, clone, and manage repositories
  • Branch Operations: Create, delete, switch, and list branches
  • Commit Management: Stage files, create commits, and view history
  • Remote Operations: Push, pull, and fetch from remote repositories
  • Advanced Features: Interactive commit squashing, stash management, tag operations

πŸ™ GitHub Integration

  • Repository Information: View detailed GitHub repository stats
  • Pull Request Management: Create and manage pull requests directly from CLI
  • Issue Tracking: List and view GitHub issues
  • Authentication: Secure token-based authentication

🎨 Beautiful Terminal UI

  • Colored Output: Syntax-highlighted, colorful terminal interface
  • Interactive Menus: Easy-to-navigate menu-driven interface
  • Professional Styling: Clean, modern design with emojis and icons
  • Customizable Themes: Dark, light, and auto themes

βš™οΈ Configuration & Settings

  • User Preferences: Customizable UI themes and preferences
  • Token Management: Secure GitHub token storage
  • Default Settings: Set default repositories and workflows

πŸš€ Quick Start

Prerequisites

  • Go 1.23 or higher
  • Git installed and configured
  • GitHub account (for GitHub features)

Installation

Option 1: Build from Source

# Clone the repository
git clone https://github.com/ritankarsaha/GitHubber.git
cd GitHubber

# Build the application
go build -o githubber ./cmd/main.go

# Install globally (optional)
sudo mv githubber /usr/local/bin/

Option 2: Direct Go Install

go install github.com/ritankarsaha/GitHubber/cmd/main.go@latest

Setup GitHub Authentication

To use GitHub features, you need to authenticate:

Method 1: Environment Variable

export GITHUB_TOKEN="your_github_personal_access_token"

Method 2: Configuration Menu

  1. Run githubber
  2. Select "Settings" from the menu
  3. Choose "Set GitHub token"
  4. Enter your personal access token

How to create a GitHub Personal Access Token:

  1. Go to GitHub β†’ Settings β†’ Developer settings β†’ Personal access tokens
  2. Click "Generate new token (classic)"
  3. Select scopes: repo, read:user, read:org
  4. Copy the generated token

πŸ“– Usage

Basic Usage

# Navigate to any Git repository
cd /path/to/your/repository

# Launch GitHubber
githubber

Menu Overview

πŸ“‚ Repository Operations

  • Initialize Repository: Create a new Git repository
  • Clone Repository: Clone a repository from URL

🌿 Branch Operations

  • Create Branch: Create and switch to a new branch
  • Delete Branch: Delete local branches
  • Switch Branch: Switch between existing branches
  • List Branches: View all available branches

πŸ’Ύ Changes and Staging

  • View Status: Check repository status
  • Add Files: Stage files for commit
  • Commit Changes: Create commits with messages

πŸ”„ Remote Operations

  • Push Changes: Push commits to remote repository
  • Pull Changes: Pull updates from remote
  • Fetch Updates: Fetch without merging

πŸ“œ History and Diff

  • View Log: Display commit history
  • View Diff: Show file differences
  • Squash Commits: Interactive commit squashing

πŸ“¦ Stash Operations

  • Stash Save: Save current changes to stash
  • Stash Pop: Apply stashed changes
  • List Stashes: View all stashes

🏷️ Tag Operations

  • Create Tag: Create annotated tags
  • Delete Tag: Remove tags
  • List Tags: View all tags

πŸ™ GitHub Operations

  • View Repository Info: Display GitHub repository statistics
  • Create Pull Request: Create PRs directly from CLI
  • List Issues: View repository issues

βš™οΈ Settings

  • View Settings: Display current configuration
  • GitHub Authentication: Manage GitHub tokens
  • UI Preferences: Customize themes and display options

πŸ— Project Structure

GitHubber/
β”œβ”€β”€ cmd/
β”‚   └── main.go                 # Application entry point
β”œβ”€β”€ internal/
β”‚   β”œβ”€β”€ cli/                    # CLI interface components
β”‚   β”‚   β”œβ”€β”€ input.go           # User input handling
β”‚   β”‚   └── menu.go            # Menu system and handlers
β”‚   β”œβ”€β”€ git/                   # Git operations
β”‚   β”‚   β”œβ”€β”€ commands.go        # Core Git commands
β”‚   β”‚   β”œβ”€β”€ squash.go          # Commit squashing functionality
β”‚   β”‚   β”œβ”€β”€ utils.go           # Git utilities
β”‚   β”‚   └── test_helpers.go    # Testing utilities
β”‚   β”œβ”€β”€ github/                # GitHub API integration
β”‚   β”‚   └── client.go          # GitHub API client
β”‚   β”œβ”€β”€ config/                # Configuration management
β”‚   β”‚   └── config.go          # Settings and preferences
β”‚   └── ui/                    # Terminal UI styling
β”‚       └── styles.go          # Styling and themes
β”œβ”€β”€ tests/                     # Test files and fixtures
β”œβ”€β”€ docs/                      # Documentation
β”œβ”€β”€ scripts/                   # Utility scripts
β”œβ”€β”€ examples/                  # Usage examples
β”œβ”€β”€ go.mod                     # Go module definition
β”œβ”€β”€ go.sum                     # Go module checksums
└── README.md                  # This file

🎨 Customization

Themes

GitHubber supports multiple color themes:

  • Dark Theme (default): Optimized for dark terminals
  • Light Theme: For light terminal backgrounds
  • Auto Theme: Automatically detects terminal theme

Configuration File

Configuration is stored in ~/.githubber/githubber.json:

{
  "github": {
    "default_owner": "your-username",
    "default_repo": "your-repo",
    "api_base_url": "https://api.github.com"
  },
  "ui": {
    "theme": "dark",
    "show_emojis": true,
    "page_size": 20,
    "border_style": "rounded"
  },
  "git": {
    "default_branch": "main",
    "auto_push": false,
    "sign_commits": false
  }
}

πŸ”§ Advanced Features

Interactive Commit Squashing

GitHubber provides an intuitive interface for squashing commits:

  1. Ensures working directory is clean
  2. Shows recent commits with hashes and messages
  3. Prompts for base commit and new commit message
  4. Handles the rebase automatically

GitHub Integration

  • Automatically detects repository from Git remote
  • Parses both HTTPS and SSH repository URLs
  • Provides detailed repository statistics
  • Creates pull requests with current branch

Error Handling

  • Comprehensive error messages with helpful suggestions
  • Graceful handling of authentication issues
  • Validation of Git repository state before operations

πŸ§ͺ Testing

Run the comprehensive test suite:

# Run all tests
go test ./...

# Run tests with coverage
go test -v -cover ./...

# Run specific package tests
go test ./internal/git/

🀝 Contributing

We welcome contributions! Please follow these steps:

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

Development Guidelines

  • Follow Go best practices and conventions
  • Add tests for new functionality
  • Update documentation for new features
  • Use meaningful commit messages

πŸ“ License

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

πŸ‘¨β€πŸ’» Author

Ritankar Saha

πŸ™ Acknowledgments

  • Charm Bracelet for the amazing Lipgloss library
  • Google for the go-github library
  • The Go community for excellent tooling and libraries

πŸ“Š Project Status

GitHubber is actively maintained and under continuous development. Current version: v2.0.0

Recent Updates

  • βœ… Complete UI overhaul with beautiful styling
  • βœ… GitHub API integration
  • βœ… Configuration system
  • βœ… Enhanced error handling
  • πŸ”„ GitHub Actions integration (coming soon)
  • πŸ”„ Plugin system (planned)

⭐ If you find GitHubber useful, please give it a star on GitHub! ⭐

Report Bug Β· Request Feature Β· Documentation

About

Git Simplified. GitHub on CLI.

Resources

License

Stars

Watchers

Forks

Packages

No packages published