A Go CLI application to create commits following the Conventional Commits specification interactively.
- β Interactive TUI Mode: Modern terminal UI with keyboard navigation (powered by Bubble Tea)
- β Arrow Key Navigation: Navigate commit types with β/β keys
- β Real-time Validation: Character count and validation feedback as you type
- β
Search & Filter: Press
/to search through commit types - β Back Navigation: Use Ctrl+B to go back and edit previous steps
- β Direct Mode: Create commits from command line with flags
- β Validation: Validates commits according to Conventional Commits
- β Preview: Beautiful commit preview with styled boxes
- β Concurrency: Concurrent validation using worker pools
- β Clean Architecture: Layer separation (Domain, Application, Infrastructure)
- β Professional UI: Colorful and friendly interface with lipgloss styling
Install or update easy-commit with a single command:
Linux/macOS:
curl -sSL https://raw.githubusercontent.com/HectorZR/easy-commit/main/install.sh | shWindows (Git Bash/WSL):
curl -sSL https://raw.githubusercontent.com/HectorZR/easy-commit/main/install.sh | shThe installer will:
- β Detect your OS and architecture automatically
- β Download the latest release from GitHub
- β Verify integrity with SHA256 checksums
- β
Install to
/usr/local/binor~/.local/bin - β Check for updates and upgrade automatically
Custom installation:
# Install specific version
VERSION=v1.0.0 curl -sSL https://raw.githubusercontent.com/HectorZR/easy-commit/main/install.sh | sh
# Custom installation directory
INSTALL_DIR=/custom/path curl -sSL https://raw.githubusercontent.com/HectorZR/easy-commit/main/install.sh | sh
# Skip checksum verification
SKIP_VERIFY=1 curl -sSL https://raw.githubusercontent.com/HectorZR/easy-commit/main/install.sh | sh
# Force reinstall
FORCE=1 curl -sSL https://raw.githubusercontent.com/HectorZR/easy-commit/main/install.sh | shDownload the latest binary for your platform from the releases page.
Linux/macOS:
# Download (replace VERSION and PLATFORM with your choices, e.g., v1.0.0, linux_amd64)
curl -LO https://github.com/HectorZR/easy-commit/releases/download/VERSION/easy-commit_VERSION_PLATFORM.tar.gz
# Extract
tar -xzf easy-commit_VERSION_PLATFORM.tar.gz
# Move to PATH
sudo mv easy-commit /usr/local/bin/
# Verify installation
easy-commit --versionWindows (PowerShell):
# Download the .zip file from the releases page
# Extract the archive
# Move easy-commit.exe to a directory in your PATHIf you have Go installed (1.24 or later):
go install github.com/hector/easy-commit/cmd/easy-commit@latest# Clone the repository
git clone https://github.com/HectorZR/easy-commit.git
cd easy-commit
# Build using Makefile
make build
# Or build directly with Go
go build -o easy-commit ./cmd/easy-commit
# (Optional) Install globally
make installSimply run the command without arguments:
./easy-commitThe CLI will guide you step by step with a modern TUI:
Navigation:
- β/β Arrow Keys: Navigate through commit types
- / : Search/filter commit types
- Enter: Confirm selection and advance
- Ctrl+B: Go back to previous step
- Ctrl+C / Esc: Cancel at any time
Steps:
- Select the commit type (feat, fix, docs, etc.) - with arrow key navigation
- Enter the change description - with real-time character count
- (Optional) Enter the scope
- (Optional) Enter the body
- (Optional) Mark as breaking change - toggle with arrow keys or Y/N
- Preview the commit in a styled box
- Confirm to create the commit
Create commits directly from the command line:
# Simple commit
./easy-commit --type feat --message "add user authentication"
# With scope
./easy-commit --type fix --scope auth --message "fix login bug"
# Breaking change
./easy-commit --type feat --message "change API structure" --breaking
# Preview without creating commit (dry-run)
./easy-commit --type docs --message "update readme" --dry-run-t, --type <TYPE> Commit type (feat, fix, docs, style, refactor, test, chore, build, ci, perf)
-m, --message <MESSAGE> Commit description
-s, --scope <SCOPE> Commit scope (optional)
-b, --breaking Mark as breaking change
-i, --interactive Force interactive mode
-n, --dry-run Show preview without creating commit
-h, --help Show help
-v, --version Show version
| Type | Description |
|---|---|
feat |
New feature |
fix |
Bug fix |
docs |
Documentation only changes |
style |
Changes that don't affect the meaning of the code (formatting, whitespace, etc.) |
refactor |
Code change that neither adds functionality nor fixes bugs |
test |
Adding or correcting tests |
chore |
Changes to the build process or auxiliary tools |
build |
Changes that affect the build system or external dependencies |
ci |
Changes to CI configuration |
perf |
Changes that improve performance |
The project follows Clean Architecture with 3-layer separation:
easy-commit/
βββ cmd/easy-commit/ # Entry point
β βββ main.go
βββ internal/
β βββ domain/ # Domain Layer (entities, value objects)
β β βββ commit.go
β β βββ config.go
β β βββ types.go
β β βββ repository.go
β βββ application/ # Application Layer (use cases)
β β βββ commit_service.go
β β βββ interactive_flow.go
β β βββ validator.go
β βββ infrastructure/ # Infrastructure Layer
β β βββ cli/
β β β βββ parser.go
β β βββ git/
β β β βββ executor.go
β β βββ terminal/
β β β βββ input.go
β β β βββ output.go
β β βββ tui/ # NEW: Bubble Tea TUI components
β β βββ model.go # Main Bubble Tea model
β β βββ views.go # View rendering functions
β β βββ messages.go # Custom messages/events
β β βββ styles.go # Lipgloss styles
β β βββ components/ # Reusable UI components
β β βββ type_selector.go
β β βββ text_input.go
β β βββ confirmation.go
β β βββ preview.go
β βββ shared/ # Shared utilities
β βββ errors.go
β βββ logger.go
βββ test/ # Tests
βββ integration/
β βββ tui_integration_test.go # NEW: TUI integration tests
βββ internal/
βββ domain_test.go
# Run all tests
make test
# With race detector
make test-race
# With coverage
make test-coverage
# Specific tests
go test ./internal/domain -v
go test ./internal/application -vThis project uses GoReleaser for automated releases.
All releases are available on the releases page with pre-built binaries for multiple platforms.
To create a new release:
# Create and push a semantic version tag
git tag v1.0.1
git push origin v1.0.1GitHub Actions will automatically build and publish the release with binaries for all supported platforms.
See CONTRIBUTING.md for detailed release guidelines.
- The Elm Architecture (TEA): Functional reactive programming pattern
- Model-Update-View: Pure functions for state management
- Event-driven architecture: Handling keyboard input and window events
- Component composition: Reusable UI components (list, textinput, etc.)
- Worker Pool Pattern: Concurrent validation in
validator.go - Use of
goroutines,channels, andsync.WaitGroup - Context for cancellation and timeouts
- Layer separation (Domain β Application β Infrastructure)
- Dependency Injection
- Repository Pattern
- Interfaces for decoupling
- Unit tests: Testing individual components and models
- Integration tests: Testing complete flows end-to-end
- Table-driven tests
- Coverage tracking
- Custom error types
- Error wrapping with context
- Graceful error handling
- Conventional Commits
- Bubble Tea Framework
- Bubbles Components
- Lipgloss Styling
- Go Concurrency Patterns
- Clean Architecture
MIT License - see LICENSE.md
Hector Zurga