-
Notifications
You must be signed in to change notification settings - Fork 0
Features
Rona comes with a rich set of features designed to enhance your Git workflow. Here's a comprehensive overview of what Rona offers.
- Pattern-based file exclusion
- Support for multiple exclusion patterns
- Directory-based staging
- Smart file tracking
- Interactive checklist staging (
-i) as an additive alternative to exclusion
# Exclude Rust files
rona -a "*.rs"
# Exclude multiple file types
rona -a "*.rs" "*.tmp" "*.log"
# Exclude directories
rona -a "target/" "node_modules/"
# Pick files to stage from a checklist (git add -p / lazygit style)
rona -a -i-
rona resetunstages files (the inverse ofadd), non-destructively: working-tree edits are always preserved -
rona restorediscards working-tree changes, reverting files to their staged (orHEAD) state - Both mirror the interactive
add(-i) pattern with aMultiSelectchecklist -
restoreis destructive, so it asks for confirmation before discarding (skip with-y) - Untracked files are never touched by
restore(git cannot restore them)
# Unstage everything currently staged (non-destructive)
rona reset
# Unstage a single file
rona reset src/main.rs
# Pick staged files to unstage from a checklist
rona reset -i
# Discard changes to a file (prompts for confirmation first)
rona restore src/main.rs
# Pick changed files to discard from a checklist
rona restore -i
# Skip the confirmation prompt
rona restore -y src/main.rs- Interactive commit type selection
- Automatic file change tracking
- Commit message templates
- Support for conventional commits
- Auto-detected GPG commit signing by default (can be disabled with
--unsigned) - Auto-confirm commits with
--yesflag - Copy commit message to clipboard with
--copyflag
# Generate commit message template
rona -g
# Interactive mode
rona -g -i
# Commit with auto-confirmation
rona -c -y
# Copy commit message to clipboard
rona -c --copy- One-command commit and push
- Branch management
- Remote repository handling
- Push verification
# Commit and push in one command
rona -c -p
# Push to specific branch
rona -c -p origin main- Interactive branch name generation from a configurable template
- Dedicated
branch_typeslist (or merged fromcommit_types) -
branch_extra_fieldsfor project-specific branch prompts -
branch_field_orderto control prompt sequence - Prompts skipped automatically when not referenced in the template
-
prefetch.source = "branches"to populate selects from existing branch names - Dry-run mode and
--no-switchoption
# Interactive branch creation
rona branch
# Preview branch name without creating it
rona branch --dry-run
# Create branch without switching to it
rona branch --no-switch
# Use a dedicated config file for release branches
rona -f .rona-release.toml branch- Automated branch synchronization workflow
- Support for both merge and rebase strategies
- Pull latest changes from source branch
- Create new branches before syncing
- Local changes stashed and restored around the branch switch
- Safe operations with dry-run mode
# Sync current branch with main
rona sync
# Sync using rebase instead of merge
rona sync -r
# Sync from a different source branch
rona sync -b develop
# Create a new branch and sync
rona sync -n feature/new-work
# Preview sync operations
rona sync --dry-run
# Fail on local changes instead of stashing them
rona sync --no-stash- One Markdown document holds the whole request, title and description together
- The first
# Headingis the title - New documents start from the request template of the repository
- Four backends:
gh,glab, GitLab push options, and a pre-filled web form - Rona reads the forge from the remote URL and picks a backend from the binaries you have
- Labels, reviewers, assignees, and draft state, from flags or from the config
- Rona warns when a backend cannot carry a field instead of dropping it in silence
# Write the request in your editor, then open it
rona pr
# Open a draft against develop
rona pr --draft --target develop
# Add labels and a reviewer
rona pr -l bug -r alice
# Send a file written before
rona pr --body-file PRs/my_feature.md -y
# Open the pre-filled web form
rona pr --web
# Preview the command without opening anything
rona pr --dry-run- Predefined commit types (defaults)
- Custom commit type support via configuration
- Type-based message templates
- Commit type validation
Default commit types:
- feat: New feature
- fix: Bug fix
- docs: Documentation changes
- test: Adding or modifying tests
- chore: Maintenance tasks
Additional types (such as style, refactor) can be enabled by configuring them in .rona.toml or ~/.config/rona.toml.
- Customizable commit message templates
- Support for multiple template variables
- Flexible formatting options
- Per-project or global templates
Available template variables:
-
{commit_number}- Incremental commit number -
{commit_type}- Selected commit type (feat, fix, etc.) -
{branch_name}- Current branch name -
{message}- Your commit message -
{date}- Current date (YYYY-MM-DD) -
{time}- Current time (HH:MM:SS) -
{author}- Git author name -
{email}- Git author email -
{name}- Any extra field defined under[[extra_fields]](e.g.{scope},{ticket})
Conditional blocks:
-
{?variable}content{/variable}- Content renders only when variable is non-empty - Prevents empty brackets or placeholder text for optional variables
- Example:
{?commit_number}[{commit_number}] {/commit_number}renders[5]when commit_number exists, or nothing when using-nflag
Example templates:
# Default template
template = "{?commit_number}[{commit_number}] {/commit_number}({commit_type} on {branch_name}) {message}"
# Conventional commits with optional scope and ticket
template = "{commit_type}{?scope}({scope}){/scope}: {message}{?ticket} [{ticket}]{/ticket}"
# Simple format
template = "{commit_type}: {message}"
# With timestamp
template = "[{date}] {commit_type}: {message}"
# With author info
template = "{commit_type}: {message} by {author}"Declare additional prompts in .rona.toml under [[extra_fields]]. Each field becomes a template variable using its name. This replaces the need for a project-specific fork when you need structured inputs such as a component scope or a ticket reference.
Field options:
| Key | Type | Default | Description |
|---|---|---|---|
name |
string | required | Variable name used in the template |
prompt |
string | name |
Label shown to the user |
kind |
"text" / "select"
|
"text" |
Input style |
required |
bool | false |
Reject empty answers |
validation |
string | — | Regex the answer must match |
prefetch.source |
"command" / "branch" / "branches"
|
— | Where to fetch candidate values |
prefetch.command |
string | — | Shell command whose output is parsed ("command" source only) |
prefetch.extract_regex |
string | — | Regex per output line or branch name. Priority: named group value, capture group 1, full match |
prefetch.deduplicate |
bool | false |
Remove duplicate results ("command" and "branches" sources) |
Prompt behaviour:
kind |
Prefetch result | Behaviour |
|---|---|---|
select |
non-empty list | Select list + (none) (if optional) + Other (enter manually)
|
select |
empty | Falls back to free-text |
text |
non-empty list from command or branches
|
Same as select with non-empty list |
text |
0–1 values from branch
|
Free-text with extracted value as default |
text |
nothing | Plain free-text |
Example — conventional commits with scope and ticket:
template = "{commit_type}{?scope}({scope}){/scope}: {message}{?ticket} [{ticket}]{/ticket}"
[[extra_fields]]
name = "scope"
kind = "select"
prefetch.source = "command"
prefetch.command = "git log -20 --pretty=format:%s"
prefetch.extract_regex = "\\w+\\((?P<value>[^)]*)\\):"
prefetch.deduplicate = true
[[extra_fields]]
name = "ticket"
kind = "text"
validation = "^[A-Z]+-[0-9]+$"
prefetch.source = "branch"
prefetch.extract_regex = "[A-Z]+-[0-9]+"By default prompts appear as: extra fields (in declaration order), then the message. Use field_order to change this. The reserved name "message" positions the built-in message prompt; any extra field not listed is appended at the end.
# Show message first, then scope, then ticket
field_order = ["message", "scope", "ticket"]- Bash completion
- Fish shell completion
- Zsh completion
- PowerShell completion
- Context-aware suggestions
- Command and flag completion
- Seamless Git command integration
- Git status tracking
- Branch management
- Remote repository handling
- Easy configuration file creation with
configcommand - Support for both local (.rona.toml) and global (~/.config/rona.toml) configuration
- Configuration file discovery with
config whichsubcommand - Display effective configuration values
- Custom editor support
- Custom commit types
- Template configuration
- Project-level and global settings
- Shared base configs via
extends, and directory-scoped configs via[[overrides]] - Backward compatibility with old config paths
- Automatic directory creation for configuration files
# Create local project config
rona config create local
# Create global user config
rona config create global
# Check which config file is being used
rona config which
# Show effective configuration values
rona config which --effective- Verbose mode (
-vflag) for detailed operation tracking - Dry-run mode (
--dry-run) for previewing operations - Configuration debugging with
config which - Effective configuration value inspection
- Custom configuration file support
- Comprehensive error handling
- Auto-confirmation mode for CI/CD (
--yesflag)
# Verbose mode for debugging
rona -v -c -p
# Dry-run to preview operations
rona -c --dry-run
# Check active configuration
rona config which --effective
# Use a specific config file (flag works before or after the subcommand)
rona -f ./custom.toml -g
rona branch -f .rona-release.tomlrona branch # Select 'feat' type
rona -a "src/" "tests/"
rona -g # Select 'feat' type
rona -c -p
rona pr # Open the pull requestgit checkout -b fix/bug-description
rona -a "src/"
rona -g # Select 'fix' type
rona -c -pgit checkout -b chore/cleanup
rona -a "src/" -e "*.rs"
rona -g # Select 'chore' type
rona -c -pgit checkout -b test/add-tests
rona -a "tests/"
rona -g # Select 'test' type
rona -c -p- Learn how to use these features in the Usage Guide
- See the Configuration page for the full config reference
- Check the Command Reference for detailed command information
- Set up Shell Integration for your preferred shell