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.
- 🚀 Intelligent file staging with pattern exclusion
- 📝 Structured commit message generation
- 🔄 Streamlined push operations
- 🎯 Interactive commit type selection
- đź› Multi-shell completion support (Bash, Fish, Zsh, PowerShell)
cargo install rona
rona init [editor] # The editor to use for commit messages [vim, zed] (default: nano)
- Initialize Rona with your preferred editor:
# Initialize with Vim
rona init vim
# Initialize with Zed
rona init zed
# Initialize with default editor (nano)
rona init
- Stage files while excluding specific patterns:
# Exclude Rust files
rona -a "*.rs"
# Exclude multiple file types
rona -a "*.rs" "*.tmp" "*.log"
# Exclude directories
rona -a "target/" "node_modules/"
# Exclude files with specific patterns
rona -a "test_*.rs" "*.test.js"
- Generate and edit commit message:
# Generate commit message template (opens editor)
rona -g
# Interactive mode (input directly in terminal)
rona -g -i
# 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
rona -c
# Commit and push in one command
rona -c -p
# Commit with additional Git arguments
rona -c --no-verify
# Commit and push with specific branch
rona -c -p origin main
# Create and switch to a new feature branch
git checkout -b feature/new-feature
rona -a "*.rs"
rona -g
rona -c -p
# Switch back to main and merge
git checkout main
git merge feature/new-feature
# Stage specific directories
rona -a "src/" "tests/"
# Exclude test files while staging
rona -a "src/" -e "test_*.rs"
# Stage everything except specific patterns
rona -a "*" -e "*.log" "*.tmp"
# In your CI pipeline
rona init
rona -a "*"
rona -g
rona -c -p --no-verify
# Fish shell
echo "function rona
command rona \$argv
end" >> ~/.config/fish/functions/rona.fish
# Bash
echo 'alias rona="command rona"' >> ~/.bashrc
- Feature Development:
# Start new feature
git checkout -b feature/new-feature
rona -a "src/" "tests/"
rona -g # Select 'feat' type
rona -c -p
- Bug Fixes:
# Fix a bug
git checkout -b fix/bug-description
rona -a "src/"
rona -g # Select 'fix' type
rona -c -p
- Code Cleanup:
# Clean up code
git checkout -b chore/cleanup
rona -a "src/" -e "*.rs"
rona -g # Select 'chore' type
rona -c -p
- Testing:
# Add tests
git checkout -b test/add-tests
rona -a "tests/"
rona -g # Select 'test' type
rona -c -p
- Quick Commits (Interactive Mode):
# Fast workflow without opening editor
rona -a "src/"
rona -g -i # Select type and input message directly
rona -c -p
Add files to Git staging while excluding specified patterns.
rona add-with-exclude <pattern(s)>
# or
rona -a <pattern(s)>
Example:
rona -a "*.rs" "*.tmp" # Exclude Rust and temporary files
Commit changes using prepared message.
rona commit [extra args]
# or
rona -c [-p | --push] [extra args]
Generate shell completion scripts.
rona completion <shell>
Supported shells: bash
, fish
, zsh
, powershell
Example:
rona completion fish > ~/.config/fish/completions/rona.fish
Generate or update commit message template.
rona generate [--interactive]
# or
rona -g [-i | --interactive]
Features:
- Creates
commit_message.md
and.commitignore
- Interactive commit type selection
- Automatic file change tracking
- Interactive mode: Input commit message directly in terminal (
-i
flag) - Editor mode: Opens in configured editor (default behavior)
Examples:
# Standard mode: Opens commit type selector, then editor
rona -g
# Interactive mode: Input message directly in terminal
rona -g -i
Interactive Mode Usage:
When using the -i
flag, Rona will:
- Show the commit type selector (chore, feat, fix, test)
- Prompt for a single commit message input
- Generate a clean format:
[commit_nb] (type on branch) message
- Save directly to
commit_message.md
without file details
This is perfect for quick, clean commits without the detailed file listing.
Initialize Rona configuration.
rona init [editor] # The editor to use for commit messages [vim, zed] (default: nano)
Display repository status (primarily for shell completion).
rona list-status
# or
rona -l
Push committed changes to remote repository.
rona push [extra args]
# or
rona -p [extra args]
Set the default editor for commit messages.
rona set-editor <editor> # The editor to use for commit messages [vim, zed], no default here
Display help information.
rona help
# or
rona -h
Rona supports auto-completion for multiple shells using clap_complete
.
Generate completion files for your shell:
# Generate completions for specific shell
rona completion fish # Fish shell
rona completion bash # Bash
rona completion zsh # Zsh
rona completion powershell # PowerShell
# Save to file
rona completion fish > ~/.config/fish/completions/rona.fish
Fish Shell:
# Copy to Fish completions directory
rona completion fish > ~/.config/fish/completions/rona.fish
Bash:
# Add to your .bashrc
rona completion bash >> ~/.bashrc
source ~/.bashrc
Zsh:
# Add to your .zshrc or save to a completions directory
rona completion zsh >> ~/.zshrc
PowerShell:
# Add to your PowerShell profile
rona completion powershell | Out-File -Append $PROFILE
The completions include:
- All command and flag completions
- Git status file completion for
add-with-exclude
command (Fish only) - Context-aware suggestions
- Rust 2021 edition or later
- Git 2.0 or later
git clone https://github.com/TomPlanche/rona.git
cd rona
cargo build --release
Contributions are welcome! Please feel free to submit a Pull Request.
Licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE)
- MIT license (LICENSE-MIT)
at your option.
For bugs, questions, and discussions please use the GitHub Issues.