🔌 Rona
Overview
Rona is a command-line interface tool designed to enhance your Git workflow with powerful features and intuitive commands. It simplifies common Git operations and provides additional functionality for managing commits, files, and repository status.
Features
- 🚀 Intelligent file staging with pattern exclusion
- 📝 Structured commit message generation
- 🔄 Streamlined push operations
- 🎯 Interactive commit type selection with customizable types
- 🛠 Multi-shell completion support (Bash, Fish, Zsh, PowerShell)
- ⚙️ Flexible configuration system (global and project-level)
Installation
Configuration
Rona supports flexible configuration through TOML files:
- Global config:
~/.config/rona.toml- applies to all projects - Project config:
./.rona.toml- applies only to the current project (overrides global)
Configuration Options
# Editor for commit messages (any command-line editor)
= "nano" # Examples: "vim", "zed", "code --wait", "emacs"
# Custom commit types (defaults shown below)
= [
"feat", # New features
"fix", # Bug fixes
"docs", # Documentation changes
"test", # Adding or updating tests
"chore" # Maintenance tasks
]
Note: When no configuration exists, Rona falls back to: ["chore", "feat", "fix", "test"]
Working with Configuration
# Initialize global configuration
# Initialize project-specific configuration
# Change editor later
# View current configuration
# Customize commit types for your project
Usage Examples
Basic Workflow
- Initialize Rona with your preferred editor:
# Initialize with various editors
# Initialize with default editor (nano)
- Stage files while excluding specific patterns:
# Exclude Rust files
# Exclude multiple file types
# Exclude directories
# Exclude files with specific patterns
- Generate and edit commit message:
# Generate commit message template (opens editor)
# Interactive mode (input directly in terminal)
# This will:
# 1. Open an interactive commit type selector
# 2. Create/update commit_message.md
# 3. Either open your configured editor (default) or prompt for simple input (-i)
- Commit and push changes:
# Commit with the prepared message (auto-detects GPG and signs if available)
# Create an unsigned commit (explicitly disable signing)
# or
# Commit and push in one command
# Commit with additional Git arguments
# Unsigned commit with push
# Commit and push with specific branch
Advanced Usage
Working with Multiple Branches
# Create and switch to a new feature branch
# Switch back to main and merge
Handling Large Changes
# Stage specific directories
# Exclude test files while staging
# Stage everything except specific patterns
Using with CI/CD
# In your CI pipeline
Shell Integration
# Fish shell
# Bash
Common Use Cases
- Feature Development:
# Start new feature
- Bug Fixes:
# Fix a bug
- Code Cleanup:
# Clean up code
- Testing:
# Add tests
- Quick Commits (Interactive Mode):
# Fast workflow without opening editor
Command Reference
add-with-exclude (-a)
Add files to Git staging while excluding specified patterns.
)>
# or
)>
Example:
commit (-c)
Commit changes using prepared message. By default, automatically detects GPG availability and signs commits if possible.
# or
Options:
-p, --push- Push after committing-u, --unsigned- Create unsigned commit (explicitly disable signing)--dry-run- Preview what would be committed
Examples:
# Auto-detected signing (default behavior)
# Explicitly unsigned commit
# Commit and push (with auto-detected signing)
# Explicitly unsigned commit with push
completion
Generate shell completion scripts.
Supported shells: bash, fish, zsh, powershell
Example:
generate (-g)
Generate or update commit message template.
# or
Features:
- Creates
commit_message.mdand.commitignore - Interactive commit type selection
- Automatic file change tracking
- Interactive mode: Input commit message directly in terminal (
-iflag) - Editor mode: Opens in configured editor (default behavior)
Examples:
# Standard mode: Opens commit type selector, then editor
# Interactive mode: Input message directly in terminal
Interactive Mode Usage:
When using the -i flag, Rona will:
- Show the commit type selector (uses configured types or defaults: feat, fix, docs, test, chore)
- Prompt for a single commit message input
- Generate a clean format:
[commit_nb] (type on branch) message - Save directly to
commit_message.mdwithout file details
This is perfect for quick, clean commits without the detailed file listing.
Commit Types:
- Uses commit types from your configuration (
.rona.tomlor~/.config/rona.toml) - Falls back to:
["chore", "feat", "fix", "test"]when no configuration exists - Default configuration includes:
["feat", "fix", "docs", "test", "chore"]
init (-i)
Initialize Rona configuration.
Examples:
list-status (-l)
Display repository status (primarily for shell completion).
# or
push (-p)
Push committed changes to remote repository.
# or
set-editor (-s)
Set the default editor for commit messages.
Examples:
help (-h)
Display help information.
# or
Shell Completion
Rona supports auto-completion for multiple shells using clap_complete.
Generate Completions
Generate completion files for your shell:
# Generate completions for specific shell
# Save to file
Installation by Shell
Fish Shell:
# Copy to Fish completions directory
rona completion fish > ~/.config/fish/completions/rona.fish
Bash:
# Add to your .bashrc
Zsh:
# Add to your .zshrc or save to a completions directory
PowerShell:
# Add to your PowerShell profile
rona completion powershell | Out-File -Append $PROFILE
Features
The completions include:
- All command and flag completions
- Git status file completion for
add-with-excludecommand (Fish only) - Context-aware suggestions
Development
Requirements
- Rust 2021 edition or later
- Git 2.0 or later
Building from Source
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
Licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE)
- MIT license (LICENSE-MIT)
at your option.
Support
For bugs, questions, and discussions please use the GitHub Issues.