commando-1.0.0 is not a library.
Grit
A modern, interactive Git commit message tool written in Rust
Grit is a command-line tool that helps developers write better Git commit messages by providing an interactive interface with support for Conventional Commits format. Built with Rust for performance and reliability.
Features
- 🎯 Interactive Mode - Step-by-step guided commit message creation
- ✏️ Editor Mode - Open your favorite text editor with a pre-filled template
- ⚡ Direct Mode - Quick commits from command line arguments
- 🎨 Custom Syntax - Domain-specific language (DSL) for commit message templates
- 📝 Conventional Commits - Built-in support for the Conventional Commits specification
- 🔄 Git Integration - Seamless integration with Git workflow
- 🏗️ Hexagonal Architecture - Clean, maintainable, and testable codebase
Quick Start
Installation
# Using the install script (Unix-like systems)
|
# Using PowerShell (Windows)
|
# Building from source
Basic Usage
# Interactive mode (default)
# Editor mode
# Direct mode
# With scope
Project Structure
commando/
├── src/
│ ├── adapters/ # External interfaces (Git, UI)
│ ├── compiler/ # DSL lexer, parser, and AST
│ ├── domain/ # Core business logic
│ ├── input/ # Input collection strategies
│ ├── ports/ # Interface definitions (traits)
│ ├── app.rs # Application orchestration
│ ├── cli.rs # CLI argument parsing
│ └── main.rs # Entry point
├── docs/ # Comprehensive documentation
└── Cargo.toml # Project configuration
Documentation
- Architecture - System design and patterns
- Requirements - Functional and technical requirements
- Flow Diagrams - Process flows and state machines
- DSL Specification - Domain-specific language reference
- Development Guide - Contributing and development setup
- API Reference - Module and function documentation
Key Concepts
Conventional Commits
Grit follows the Conventional Commits specification:
<type>(<scope>): <subject>
<body>
<footer>
Supported types:
feat- A new featurefix- A bug fixdocs- Documentation changesstyle- Code style changes (formatting, semicolons, etc.)refactor- Code refactoringperf- Performance improvementstest- Adding or updating testsbuild- Build system changesci- CI configuration changeschore- Other changes that don't modify src or test filesrevert- Reverts a previous commit
Input Modes
- Interactive Mode - Prompts user through each commit message section
- Editor Mode - Opens configured editor with a template
- Direct Mode - Accepts complete message from command line
Architecture Highlights
Grit uses Hexagonal Architecture (Ports & Adapters):
graph TB
CLI[CLI Interface]
App[Application Core]
Domain[Domain Logic]
GitPort[Git Port]
UIPort[UI Port]
InputPort[Input Port]
GitAdapter[Git Adapter]
TerminalAdapter[Terminal Adapter]
InteractiveInput[Interactive Input]
EditorInput[Editor Input]
DirectInput[Direct Input]
CLI --> App
App --> Domain
App --> GitPort
App --> UIPort
App --> InputPort
GitPort -.implements.- GitAdapter
UIPort -.implements.- TerminalAdapter
InputPort -.implements.- InteractiveInput
InputPort -.implements.- EditorInput
InputPort -.implements.- DirectInput
Development
# Clone the repository
# Build the project
# Run tests
# Run with logging
RUST_LOG=debug
# Install locally
Contributing
Contributions are welcome! Please read our Development Guide for details on:
- Code structure and organization
- Testing practices
- Pull request process
- Code style guidelines
License
Credits
Built with ❤️ using:
Related Projects
- Commitizen - The original commit message tool
- git-cz - Commitizen adapter
- Conventional Commits - The specification