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-emoji
git 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 --debug
Options:
-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 = true
default_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 --all
src/
โโโ 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