A powerful and modern CLI tool for Git commits with emoji support, conventional commit validation, and intelligent workflow automation.
- π Interactive emoji selection with contextual suggestions
- π Conventional Commits support and validation
- π§ Configurable via TOML configuration files
- π Smart workflow automation (staging, committing, pulling, pushing)
- π― Pre-commit hook integration with automatic retry
- π Commit analytics and recent history display
- π Non-interactive mode for CI/CD integration
- π Intelligent file analysis for emoji suggestions
- β‘ Async operations for better performance
cargo install git-cli-emojigit clone https://github.com/yourusername/git-cli.git
cd git-cli
cargo install --path .# Interactive mode (default)
git-cli
# Non-interactive mode
git-cli --no-interactive --emoji "β¨" --title "Add new feature" --body "Implement user authentication"
# Debug mode
git-cli --debugOptions:
-d, --debug Enable debug mode
--no-interactive Run in non-interactive mode
--emoji <EMOJI> Emoji to use for commit
--title <TITLE> Commit title
--body <BODY> Commit body/description
-h, --help Print help
-V, --version Print version
Git CLI creates a configuration file at ~/.config/git-cli/config.toml:
[general]
default_emoji = "β¨"
auto_push = false
confirm_before_push = true
debug = false
[commit]
enforce_conventional = true
max_title_length = 50
max_body_length = 72
auto_capitalize_title = true
[hooks]
run_pre_commit = true
auto_fix_lint = true
retry_on_failure = truedefault_emoji: Default emoji when none is specifiedauto_push: Automatically push after successful commitconfirm_before_push: Ask before pushing to remotedebug: Enable debug logging
enforce_conventional: Validate conventional commit formatmax_title_length: Maximum characters in commit titlemax_body_length: Maximum characters per line in commit bodyauto_capitalize_title: Automatically capitalize first letter
run_pre_commit: Execute pre-commit hooksauto_fix_lint: Attempt to auto-fix linting issuesretry_on_failure: Retry commit after hook failure
The tool intelligently suggests emojis based on file changes:
| File Type | Suggested Emoji | Description |
|---|---|---|
*.md, *.rst |
π | Documentation |
*test*, *spec* |
β | Tests |
*.css, *.scss |
π | Styling |
*.json, *.toml |
π§ | Configuration |
Dockerfile |
π³ | Docker |
*security*, *auth* |
π | Security |
*performance* |
β‘ | Performance |
When enforce_conventional is enabled, commit titles must follow the format:
<type>(<scope>): <description>
Supported types:
feat: New featurefix: Bug fixdocs: Documentationstyle: Code style changesrefactor: Code refactoringtest: Adding testschore: Maintenance tasksperf: Performance improvementsci: CI/CD changesbuild: Build system changesrevert: Reverting changes
- Repository Validation: Ensures you're in a Git repository
- Change Detection: Scans for modified, added, deleted files
- File Staging: Interactive or automatic file selection
- Emoji Selection: Choose from curated emoji list with smart suggestions
- Commit Creation: Input title and optional body with validation
- Pre-commit Hooks: Automatic execution with retry on failure
- Remote Sync: Fetch, pull, and push operations
- Summary Display: Show recent commits and current branch
- Rust 1.70+
- Git 2.0+
git clone https://github.com/yourusername/git-cli.git
cd git-cli
cargo build --release# Run all tests
cargo test
# Run with coverage
cargo tarpaulin --out html
# Linting
cargo clippy -- -D warnings
# Formatting
cargo fmt --allsrc/
βββ main.rs # Application entry point
βββ config/ # Configuration management
βββ git/ # Git operations
βββ ui/ # User interface
βββ emojis.rs # Emoji definitions
βββ errors.rs # Error handling
βββ utils.rs # Utility functions
βββ validation.rs # Validation logic
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Add tests for new functionality
- Ensure all tests pass (
cargo test) - Run linting (
cargo clippy) - Format code (
cargo fmt) - Commit using this tool! π
- Push to your branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Conventional Commits specification
- Gitmoji for emoji inspiration
- inquire for beautiful CLI interactions
- clap for argument parsing
- v0.3.0: Commit templates and advanced validation
- v0.4.0: Plugin system and integrations
- v0.5.0: AI-powered commit message suggestions
- v1.0.0: Stable release with full documentation
Made with β€οΈ and β by RobertWsp