GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com โ€” GitHub - RobertWsp/git-cli: Learning rust creating a "clone" of gitmoji

BranchesTags
Open more actions menu

Latest commit

 

History

20 Commits
20 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
src
src
 
 
tests
tests
 
 
.gitignore
.gitignore
 
 
CHANGELOG.md
CHANGELOG.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
Cargo.lock
Cargo.lock
 
 
Cargo.toml
Cargo.toml
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
config.example.toml
config.example.toml
 
 
emojis.example.json
emojis.example.json
 
 
emojis.json
emojis.json
 
 
install.sh
install.sh
 
 
test_change.txt
test_change.txt
 
 
test_change2.txt
test_change2.txt
 
 
uninstall.sh
uninstall.sh
 
 

Repository files navigation

Git CLI with Emojis ๐ŸŽจ

CI Crates.io License: MIT

A powerful and modern CLI tool for Git commits with emoji support, conventional commit validation, and intelligent workflow automation.

โœจ Features

  • ๐ŸŽญ 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

๐Ÿš€ Installation

Via Cargo

cargo install git-cli-emoji

From Source

git clone https://github.com/yourusername/git-cli.git
cd git-cli
cargo install --path .

๐Ÿ“– Usage

Basic Usage

# 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

Command Line Options

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

โš™๏ธ Configuration

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

Configuration Options

General Settings

  • default_emoji: Default emoji when none is specified
  • auto_push: Automatically push after successful commit
  • confirm_before_push: Ask before pushing to remote
  • debug: Enable debug logging

Commit Settings

  • enforce_conventional: Validate conventional commit format
  • max_title_length: Maximum characters in commit title
  • max_body_length: Maximum characters per line in commit body
  • auto_capitalize_title: Automatically capitalize first letter

Hook Settings

  • run_pre_commit: Execute pre-commit hooks
  • auto_fix_lint: Attempt to auto-fix linting issues
  • retry_on_failure: Retry commit after hook failure

๐ŸŽญ Emoji Suggestions

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

๐Ÿ“‹ Conventional Commits

When enforce_conventional is enabled, commit titles must follow the format:

<type>(<scope>): <description>

Supported types:

  • feat: New feature
  • fix: Bug fix
  • docs: Documentation
  • style: Code style changes
  • refactor: Code refactoring
  • test: Adding tests
  • chore: Maintenance tasks
  • perf: Performance improvements
  • ci: CI/CD changes
  • build: Build system changes
  • revert: Reverting changes

๐Ÿ”„ Workflow

  1. Repository Validation: Ensures you're in a Git repository
  2. Change Detection: Scans for modified, added, deleted files
  3. File Staging: Interactive or automatic file selection
  4. Emoji Selection: Choose from curated emoji list with smart suggestions
  5. Commit Creation: Input title and optional body with validation
  6. Pre-commit Hooks: Automatic execution with retry on failure
  7. Remote Sync: Fetch, pull, and push operations
  8. Summary Display: Show recent commits and current branch

๐Ÿงช Development

Prerequisites

  • Rust 1.70+
  • Git 2.0+

Building

git clone https://github.com/yourusername/git-cli.git
cd git-cli
cargo build --release

Testing

# Run all tests
cargo test

# Run with coverage
cargo tarpaulin --out html

# Linting
cargo clippy -- -D warnings

# Formatting
cargo fmt --all

Project Structure

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

๐Ÿค Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes
  4. Add tests for new functionality
  5. Ensure all tests pass (cargo test)
  6. Run linting (cargo clippy)
  7. Format code (cargo fmt)
  8. Commit using this tool! ๐Ÿ˜‰
  9. Push to your branch (git push origin feature/amazing-feature)
  10. Open a Pull Request

๐Ÿ“ License

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

๐Ÿ™ Acknowledgments

  • Conventional Commits specification
  • Gitmoji for emoji inspiration
  • inquire for beautiful CLI interactions
  • clap for argument parsing

๐Ÿ“Š Roadmap

  • 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

About

Learning rust creating a "clone" of gitmoji

Resources

Readme
MIT license

Contributing

Contributing
Activity

Stars

0 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402775 โ€” GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800ร—600. No cookies required.