{"id":44899182,"url":"https://github.com/rona-rs/rona","last_synced_at":"2026-02-21T16:20:15.304Z","repository":{"id":290508804,"uuid":"974613906","full_name":"rona-rs/rona","owner":"rona-rs","description":"A powerful CLI tool to streamline your Git workflow","archived":false,"fork":false,"pushed_at":"2026-02-18T00:58:13.000Z","size":448,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-18T00:59:30.671Z","etag":null,"topics":["cli","git"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/rona","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rona-rs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-04-29T03:41:20.000Z","updated_at":"2026-02-18T00:58:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"d3ed079b-0ece-4d6a-9890-0f02c833c59f","html_url":"https://github.com/rona-rs/rona","commit_stats":null,"previous_names":["tomplanche/rona","rona-rs/rona"],"tags_count":49,"template":false,"template_full_name":null,"purl":"pkg:github/rona-rs/rona","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rona-rs%2Frona","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rona-rs%2Frona/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rona-rs%2Frona/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rona-rs%2Frona/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rona-rs","download_url":"https://codeload.github.com/rona-rs/rona/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rona-rs%2Frona/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29685852,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T15:51:39.154Z","status":"ssl_error","status_checked_at":"2026-02-21T15:49:03.425Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","git"],"created_at":"2026-02-17T21:05:54.039Z","updated_at":"2026-02-21T16:20:15.298Z","avatar_url":"https://github.com/rona-rs.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cpre\u003e\n██▄████   ▄████▄   ██▄████▄   ▄█████▄ \n██▀      ██▀  ▀██  ██▀   ██   ▀ ▄▄▄██ \n██       ██    ██  ██    ██  ▄██▀▀▀██ \n██       ▀██▄▄██▀  ██    ██  ██▄▄▄███ \n▀▀         ▀▀▀▀    ▀▀    ▀▀   ▀▀▀▀ ▀▀ \n\u003c/pre\u003e\n\n\u003e A powerful CLI tool to streamline your Git workflow\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://crates.io/crates/rona\"\u003e\u003cimg src=\"https://img.shields.io/crates/v/rona.svg\" alt=\"Crates.io Version\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://sonarcloud.io/summary/new_code?id=TomPlanche_rona\"\u003e\u003cimg src=\"https://sonarcloud.io/api/project_badges/measure?project=TomPlanche_rona\u0026metric=alert_status\" alt=\"SonarCloud Status\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://sonarcloud.io/summary/new_code?id=TomPlanche_rona\"\u003e\u003cimg src=\"https://sonarcloud.io/api/project_badges/measure?project=TomPlanche_rona\u0026metric=sqale_rating\" alt=\"SonarCloud SQALE Rating\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://sonarcloud.io/summary/new_code?id=TomPlanche_rona\"\u003e\u003cimg src=\"https://sonarcloud.io/api/project_badges/measure?project=TomPlanche_rona\u0026metric=security_rating\" alt=\"SonarCloud Security Rating\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/rona-rs/rona/blob/main/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/crates/l/rona\" alt=\"License\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/rona-rs/rona/actions/workflows/rust.yaml\"\u003e\u003cimg src=\"https://github.com/rona-rs/rona/actions/workflows/rust.yaml/badge.svg\" alt=\"Build Status\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## Overview\n\nRona 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.\n\n## Features\n\n- Intelligent file staging with pattern exclusion\n- Structured commit message generation\n- Streamlined push operations\n- Branch synchronization with merge/rebase support\n- Interactive commit type selection with customizable types\n- Multi-shell completion support (Bash, Fish, Zsh, PowerShell)\n- Flexible configuration system (global and project-level)\n- Colored interactive prompts powered by Inquire\n- Structured logging via `tracing` with `RUST_LOG` support\n\n## Installation\n\n### Homebrew (macOS/Linux)\n\n```bash\nbrew install rona-rs/rona/rona\n```\n\nOr, if you prefer to tap explicitly:\n\n```bash\nbrew tap rona-rs/rona\nbrew install rona\n```\n\n### Cargo (Alternative)\n\n```bash\ncargo install rona\n```\n\nAfter installation, initialize Rona (optional, to set your preferred editor):\n\n```bash\nrona init [editor] # The editor to use for commit messages (default: nano)\n```\n\n## Configuration\n\nRona supports flexible configuration through TOML files:\n\n- **Global config**: `~/.config/rona.toml` - applies to all projects\n- **Project config**: `./.rona.toml` - applies only to the current project (overrides global)\n\n### Configuration Options\n\n```toml\n# Editor for commit messages (any command-line editor)\neditor = \"nano\"  # Examples: \"vim\", \"zed\", \"code --wait\", \"emacs\"\n\n# Custom commit types (defaults shown below)\ncommit_types = [\n    \"feat\",    # New features\n    \"fix\",     # Bug fixes  \n    \"docs\",    # Documentation changes\n    \"test\",    # Adding or updating tests\n    \"chore\"    # Maintenance tasks\n]\n\n# Template for interactive commit message generation\n# Available variables: {commit_number}, {commit_type}, {branch_name}, {message}, {date}, {time}, {author}, {email}\ntemplate = \"{?commit_number}[{commit_number}] {/commit_number}({commit_type} on {branch_name}) {message}\"\n```\n\n**Note**: When no configuration exists, Rona falls back to: `[\"chore\", \"feat\", \"fix\", \"test\"]`\n\n### Template Configuration\n\nRona supports customizable templates for interactive commit message generation. You can define how your commit messages are formatted using variables:\n\n**Available Template Variables:**\n- `{commit_number}` - The commit number (incremental)\n- `{commit_type}` - The selected commit type (feat, fix, etc.)\n- `{branch_name}` - The current branch name\n- `{message}` - Your input message\n- `{date}` - Current date (YYYY-MM-DD)\n- `{time}` - Current time (HH:MM:SS)\n- `{author}` - Git author name\n- `{email}` - Git author email\n\n**Conditional Blocks:**\n\nYou can use conditional blocks to include or exclude content based on whether a variable has a value. This is useful for handling optional elements like commit numbers.\n\n**Syntax:** `{?variable_name}content{/variable_name}`\n\nThe content inside the block will only be included if the variable has a non-empty value.\n\n**Example with `-n` flag:**\n```toml\n# Template with conditional commit number\ntemplate = \"{?commit_number}[{commit_number}] {/commit_number}({commit_type} on {branch_name}) {message}\"\n```\n\n**Results:**\n- `rona -g` (with commit number): `[42] (feat on new-feature) Add feature`\n- `rona -g -n` (without commit number): `(feat on new-feature) Add feature`\n\nThis eliminates empty brackets when using the `-n` flag!\n\n**Template Examples:**\n```toml\n# Default template with conditional commit number\ntemplate = \"{?commit_number}[{commit_number}] {/commit_number}({commit_type} on {branch_name}) {message}\"\n\n# Simple format without commit number\ntemplate = \"({commit_type}) {message}\"\n\n# Conditional date with static text\ntemplate = \"{?date}Date: {date} | {/date}{commit_type}: {message}\"\n\n# Multiple conditional blocks\ntemplate = \"{?commit_number}#{commit_number} {/commit_number}{?author}by {author} - {/author}{message}\"\n\n# Include date and time conditionally\ntemplate = \"{?date}[{date} {time}] {/date}{commit_type}: {message}\"\n\n# Custom format with optional commit number\ntemplate = \"{?commit_number}Commit {commit_number}: {/commit_number}{commit_type} on {branch_name} - {message}\"\n```\n\n**Note**: If no template is specified, Rona uses the default format: `{?commit_number}[{commit_number}] {/commit_number}({commit_type} on {branch_name}) {message}`\n\n### Working with Configuration\n\n```bash\n# Initialize global configuration\nrona init vim                    # Creates ~/.config/rona.toml\n\n# Initialize project-specific configuration  \ncd my-project\nrona init zed                    # Creates ./.rona.toml (overrides global)\n\n# Change editor later\nrona set-editor \"code --wait\"    # Choose global or project scope interactively\n\n# View current configuration\ncat .rona.toml                   # Project config\ncat ~/.config/rona.toml          # Global config\n\n# Customize commit types for your project\necho 'commit_types = [\"feat\", \"fix\", \"refactor\", \"style\", \"docs\"]' \u003e\u003e .rona.toml\n```\n\n## Usage Examples\n\n### Basic Workflow\n\n1. Initialize Rona with your preferred editor:\n```bash\n# Initialize with various editors\nrona init vim\nrona init zed  \nrona init \"code --wait\"  # VS Code\nrona init emacs\n\n# Initialize with default editor (nano)\nrona init\n```\n\n2. Stage files while excluding specific patterns:\n```bash\n# Exclude Rust files\nrona -a \"*.rs\"\n\n# Exclude multiple file types\nrona -a \"*.rs\" \"*.tmp\" \"*.log\"\n\n# Exclude directories\nrona -a \"target/\" \"node_modules/\"\n\n# Exclude files with specific patterns\nrona -a \"test_*.rs\" \"*.test.js\"\n```\n\n3. Generate and edit commit message:\n```bash\n# Generate commit message template (opens editor)\nrona -g\n\n# Interactive mode (input directly in terminal)\nrona -g -i\n\n# This will:\n# 1. Open an interactive commit type selector\n# 2. Create/update commit_message.md\n# 3. Either open your configured editor (default) or prompt for simple input (-i)\n```\n\n4. Commit and push changes:\n```bash\n# Commit with the prepared message (auto-detects GPG and signs if available)\nrona -c\n\n# Create an unsigned commit (explicitly disable signing)\nrona -c -u\n# or\nrona -c --unsigned\n\n# Commit and push in one command\nrona -c -p\n\n# Commit with additional Git arguments\nrona -c --no-verify\n\n# Unsigned commit with push\nrona -c -u -p\n\n# Commit and push with specific branch\nrona -c -p origin main\n```\n\n### Advanced Usage\n\n#### Working with Multiple Branches\n\n```bash\n# Create and switch to a new feature branch\ngit checkout -b feature/new-feature\nrona -a \"*.rs\"\nrona -g\nrona -c -p\n\n# Switch back to main and merge\ngit checkout main\ngit merge feature/new-feature\n\n# Or use the sync command to update your branch with latest main\ngit checkout feature/new-feature\nrona sync              # Merges main into current branch\n\n# Update branch with rebase instead of merge\nrona sync --rebase     # Rebases current branch onto main\n\n# Create new branch and sync with develop\nrona sync -b develop -n feature/new-feature\n\n# Preview sync operation\nrona sync --dry-run\n```\n\n#### Handling Large Changes\n\n```bash\n# Stage specific directories\nrona -a \"src/\" \"tests/\"\n\n# Exclude test files while staging\nrona -a \"src/\" -e \"test_*.rs\"\n\n# Stage everything except specific patterns\nrona -a \"*\" -e \"*.log\" \"*.tmp\"\n```\n\n#### Using with CI/CD\n\n```bash\n# In your CI pipeline\nrona init\nrona -a \"*\"\nrona -g\nrona -c -p --no-verify\n```\n\n#### Shell Integration\n\n```bash\n# Fish shell\necho \"function rona\n    command rona \\$argv\nend\" \u003e\u003e ~/.config/fish/functions/rona.fish\n\n# Bash\necho 'alias rona=\"command rona\"' \u003e\u003e ~/.bashrc\n```\n\n### Common Use Cases\n\n1. **Feature Development**:\n```bash\n# Start new feature\ngit checkout -b feature/new-feature\nrona -a \"src/\" \"tests/\"\nrona -g  # Select 'feat' type\nrona -c -p\n```\n\n2. **Bug Fixes**:\n```bash\n# Fix a bug\ngit checkout -b fix/bug-description\nrona -a \"src/\"\nrona -g  # Select 'fix' type\nrona -c -p\n```\n\n3. **Code Cleanup**:\n```bash\n# Clean up code\ngit checkout -b chore/cleanup\nrona -a \"src/\" -e \"*.rs\"\nrona -g  # Select 'chore' type\nrona -c -p\n```\n\n4. **Testing**:\n```bash\n# Add tests\ngit checkout -b test/add-tests\nrona -a \"tests/\"\nrona -g  # Select 'test' type\nrona -c -p\n```\n\n5. **Quick Commits (Interactive Mode)**:\n```bash\n# Fast workflow without opening editor\nrona -a \"src/\"\nrona -g -i  # Select type and input message directly\nrona -c -p\n```\n\n## Command Reference\n\n### `add-with-exclude` (`-a`)\nAdd files to Git staging while excluding specified patterns.\n\n```bash\nrona add-with-exclude \u003cpattern(s)\u003e\n# or\nrona -a \u003cpattern(s)\u003e\n```\n\n**Example:**\n```bash\nrona -a \"*.rs\" \"*.tmp\"  # Exclude Rust and temporary files\n```\n\n### `commit` (`-c`)\nCommit changes using prepared message. **By default, automatically detects GPG availability and signs commits if possible**.\n\n```bash\nrona commit [OPTIONS] [extra args]\n# or\nrona -c [-p | --push] [-u | --unsigned] [extra args]\n```\n\n**Options:**\n- `-p, --push` - Push after committing\n- `-u, --unsigned` - Create unsigned commit (explicitly disable signing)\n- `--dry-run` - Preview what would be committed\n\n**Examples:**\n```bash\n# Auto-detected signing (default behavior)\nrona -c\n\n# Explicitly unsigned commit\nrona -c -u\n\n# Commit and push (with auto-detected signing)\nrona -c -p\n\n# Explicitly unsigned commit with push\nrona -c -u -p\n```\n\n### `completion`\nGenerate shell completion scripts.\n\n```bash\nrona completion \u003cshell\u003e\n```\n\n**Supported shells:** `bash`, `fish`, `zsh`, `powershell`\n\n**Example:**\n```bash\nrona completion fish \u003e ~/.config/fish/completions/rona.fish\n```\n\n### `generate` (`-g`)\nGenerate or update commit message template.\n\n```bash\nrona generate [--interactive] [--no-commit-number]\n# or\nrona -g [-i | --interactive] [-n | --no-commit-number]\n```\n\n**Features:**\n- Creates `commit_message.md` and `.commitignore`\n- Interactive commit type selection\n- Automatic file change tracking\n- **Interactive mode:** Input commit message directly in terminal (`-i` flag)\n- **Editor mode:** Opens in configured editor (default behavior)\n- **No commit number:** Omit commit number from message (`-n` flag)\n\n**Options:**\n- `-i, --interactive` - Input commit message directly in terminal instead of opening editor\n- `-n, --no-commit-number` - Generate commit message without commit number\n\n**Examples:**\n\n```bash\n# Standard mode: Opens commit type selector, then editor\nrona -g\n\n# Interactive mode: Input message directly in terminal\nrona -g -i\n\n# Without commit number (useful with conditional templates)\nrona -g -n\n\n# Interactive mode without commit number\nrona -g -i -n\n```\n\n**Interactive Mode Usage:**\nWhen using the `-i` flag, Rona will:\n1. Show the commit type selector (uses configured types or defaults: feat, fix, docs, test, chore)\n2. Prompt for a single commit message input\n3. Generate a clean format using your template (or default)\n4. Save directly to `commit_message.md` without file details\n\n**No Commit Number Flag:**\nThe `-n` flag sets `commit_number` to `None`, which works perfectly with conditional templates:\n- With conditional template: `{?commit_number}[{commit_number}] {/commit_number}({commit_type}) {message}`\n- Result with `-n`: `(feat) Add feature` (no empty brackets!)\n- Result without `-n`: `[42] (feat) Add feature`\n\nThis is perfect for quick, clean commits without the detailed file listing.\n\n### Prompt UI and Colors\n\nRona uses the `inquire` crate for interactive prompts with a custom color scheme applied globally:\n\n- Prompt prefix: `$` (light red)\n- Answered prefix: `✔` (light green)\n- Highlighted option prefix: `➠` (light blue)\n- Prompt label: light cyan + bold\n- Help message: dark yellow + italic\n- Answer text: light magenta + bold\n- Default values: light blue; placeholders: black\n\nIf you prefer different colors, you can fork and adjust the render configuration in `src/cli.rs` (function `get_render_config`). You can also override styles for a specific prompt using `with_render_config(...)` on that prompt.\n\n**Commit Types:**\n- Uses commit types from your configuration (`.rona.toml` or `~/.config/rona.toml`)\n- Falls back to: `[\"chore\", \"feat\", \"fix\", \"test\"]` when no configuration exists\n- Default configuration includes: `[\"feat\", \"fix\", \"docs\", \"test\", \"chore\"]`\n\n### `init` (`-i`)\nInitialize Rona configuration.\n\n```bash\nrona init [editor] # Any command-line editor (default: nano)\n```\n\n**Examples:**\n```bash\nrona init vim\nrona init zed  \nrona init \"code --wait\"  # VS Code\nrona init                # Uses default (nano)\n```\n\n### `list-status` (`-l`)\nDisplay repository status (primarily for shell completion).\n\n```bash\nrona list-status\n# or\nrona -l\n```\n\n### `push` (`-p`)\nPush committed changes to remote repository.\n\n```bash\nrona push [extra args]\n# or\nrona -p [extra args]\n```\n\n### `set-editor` (`-s`)\nSet the default editor for commit messages.\n\n```bash\nrona set-editor \u003ceditor\u003e # Any command-line editor (vim, zed, \"code --wait\", etc.)\n```\n\n**Examples:**\n```bash\nrona set-editor vim\nrona set-editor zed\nrona set-editor \"code --wait\"  # VS Code\nrona set-editor emacs\nrona set-editor nano\n```\n\n### `sync`\nSync your current branch with another branch by pulling latest changes and merging or rebasing.\n\n```bash\nrona sync [OPTIONS]\n```\n\n**Options:**\n- `-b, --branch \u003cBRANCH\u003e` - Branch to sync from (default: main)\n- `-r, --rebase` - Use rebase instead of merge\n- `-n, --new-branch \u003cNAME\u003e` - Create a new branch before syncing\n- `--dry-run` - Preview what would be done\n\n**Workflow:**\n1. Optionally creates a new branch (if `-n` specified)\n2. Switches to the source branch\n3. Pulls latest changes from remote\n4. Switches back to your target branch\n5. Merges or rebases the source branch into your target branch\n\n**Examples:**\n\n```bash\n# Basic usage: sync current branch with main\nrona sync\n\n# Sync with a different branch\nrona sync --branch develop\nrona sync -b staging\n\n# Use rebase instead of merge\nrona sync --rebase\nrona sync -r\n\n# Create new branch and sync with main\nrona sync --new-branch feature/my-feature\nrona sync -n bugfix/issue-123\n\n# Create new branch and sync from develop using rebase\nrona sync -b develop -r -n feature/new-feature\n\n# Preview what would happen without making changes\nrona sync --dry-run\n\n# Combine all options\nrona sync -b develop -r -n feature/test --dry-run\n```\n\n**Common Use Cases:**\n\n```bash\n# Keep feature branch up-to-date with main\ngit checkout feature/my-feature\nrona sync\n\n# Start new feature from latest main\nrona sync -n feature/new-feature\n\n# Update branch with staging before deploying\nrona sync -b staging\n\n# Rebase feature branch onto latest main for clean history\nrona sync --rebase\n```\n\n### `help` (`-h`)\nDisplay help information.\n\n```bash\nrona help\n# or\nrona -h\n```\n\n## Shell Completion\n\nRona supports auto-completion for multiple shells using [`clap_complete`](https://docs.rs/clap_complete/latest/clap_complete/index.html).\n\n### Generate Completions\n\nGenerate completion files for your shell:\n\n```bash\n# Generate completions for specific shell\nrona completion fish    # Fish shell\nrona completion bash    # Bash\nrona completion zsh     # Zsh  \nrona completion powershell  # PowerShell\n\n# Save to file\nrona completion fish \u003e ~/.config/fish/completions/rona.fish\n```\n\n### Installation by Shell\n\n**Fish Shell:**\n```fish\n# Copy to Fish completions directory\nrona completion fish \u003e ~/.config/fish/completions/rona.fish\n```\n\n**Bash:**\n```bash\n# Add to your .bashrc\nrona completion bash \u003e\u003e ~/.bashrc\nsource ~/.bashrc\n```\n\n**Zsh:**\n```bash\n# Add to your .zshrc or save to a completions directory\nrona completion zsh \u003e\u003e ~/.zshrc\n```\n\n**PowerShell:**\n```powershell\n# Add to your PowerShell profile\nrona completion powershell | Out-File -Append $PROFILE\n```\n\n### Features\n\nThe completions include:\n- All command and flag completions\n- Git status file completion for `add-with-exclude` command (Fish only)\n- Context-aware suggestions\n\n## Debugging and Logging\n\nRona uses the [`tracing`](https://crates.io/crates/tracing) ecosystem for structured, filterable log output. All internal debug information (git command decisions, signing checks, file staging counts, etc.) is emitted as `debug`-level trace events rather than unconditional `println!` calls.\n\n### Enabling Debug Output\n\n**Via the `--verbose` flag:**\n\nThe `-v` / `--verbose` flag sets the minimum log level to `debug`, which reveals all internal operations:\n\n```bash\nrona -v -c           # Show debug traces while committing\nrona -v -c -p        # Show debug traces for commit + push\nrona -v sync         # Show debug traces for branch sync\n```\n\nExample output with `--verbose`:\n\n```\n2024-01-15T14:30:00.123Z DEBUG Committing files... unsigned=false dry_run=false\n2024-01-15T14:30:00.124Z DEBUG GPG signing decision should_sign=true\n2024-01-15T14:30:00.250Z DEBUG commit successful!\n2024-01-15T14:30:00.251Z DEBUG Running git push args=[] dry_run=false\n2024-01-15T14:30:01.100Z DEBUG push successful!\n```\n\n**Via the `RUST_LOG` environment variable:**\n\n`RUST_LOG` takes precedence over `--verbose` and provides fine-grained module-level filtering using the standard [`EnvFilter`](https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html) syntax.\n\n```bash\n# Show all debug output (equivalent to --verbose)\nRUST_LOG=debug rona -c\n\n# Show debug output only for the remote module (push/pull)\nRUST_LOG=rona::git::remote=debug rona -c -p\n\n# Show debug output only for staging\nRUST_LOG=rona::git::staging=debug rona -a \"*.rs\"\n\n# Show debug output for commit operations\nRUST_LOG=rona::git::commit=debug rona -c\n\n# Show debug output for branch operations\nRUST_LOG=rona::git::branch=debug rona sync\n\n# Combine multiple filters\nRUST_LOG=rona::git::commit=debug,rona::git::remote=debug rona -c -p\n\n# Show trace-level output (most verbose, includes span entry/exit)\nRUST_LOG=trace rona -c\n```\n\n### Log Levels\n\n| Level   | When emitted                                              |\n|---------|-----------------------------------------------------------|\n| `warn`  | Always (default). GPG warnings, missing config, etc.     |\n| `debug` | With `--verbose` or `RUST_LOG=debug`. Internal decisions. |\n| `trace` | Only with `RUST_LOG=trace`. Span entry and exit events.   |\n\n### Available Modules for Filtering\n\n| Module                  | Content                                          |\n|-------------------------|--------------------------------------------------|\n| `rona::git::branch`     | Switch, create branch, pull, merge, rebase       |\n| `rona::git::commit`     | Commit creation, GPG signing detection           |\n| `rona::git::remote`     | Push operations                                  |\n| `rona::git::staging`    | File staging with pattern exclusion              |\n| `rona::git`             | Cross-module git output (handle_output)          |\n\n### How It Works\n\nRona initializes a `tracing-subscriber` once at startup in `cli::run()`, immediately after parsing CLI arguments. The subscriber respects `RUST_LOG` first; if that variable is absent, it falls back to `\"debug\"` when `--verbose` is set and `\"warn\"` otherwise.\n\nFunctions that perform meaningful git work are annotated with `#[tracing::instrument]`, so enabling `trace`-level output also records span entry and exit with the relevant parameters automatically.\n\n## Architecture\n\n### Git Operations: git2 vs Command\n\nRona uses the [git2](https://crates.io/crates/git2) library (libgit2 bindings) for most Git operations, providing better error handling, no dependency on the `git` CLI being installed, and avoidance of path/shell issues.\n\n**Operations using git2 (library):**\n- Repository discovery and path resolution\n- Status and file staging\n- Branch info, switching, and creation\n- Commit creation (both unsigned and GPG-signed)\n- Git config reading (author info, signing keys, default branch)\n- Commit counting and history walking\n\n**Operations using `std::process::Command` (CLI):**\n- **Push** -- git2's push requires complex `RemoteCallbacks` for SSH/HTTP authentication\n- **Pull** -- No direct pull API in git2; would need fetch (with auth callbacks) + merge\n- **Merge / Rebase** -- git2's low-level APIs require manual conflict resolution and commit iteration\n- **GPG signing checks** -- These run the `gpg` binary, not git\n\nFor GPG-signed commits, Rona uses a hybrid approach: git2's `commit_create_buffer` generates the commit content, the `gpg` CLI signs it, and git2's `commit_signed` stores the result.\n\n## Development\n\n### Requirements\n- Rust 2021 edition or later\n- Git 2.0 or later (only needed for push, pull, merge, rebase operations)\n\n### Building from Source\n```bash\ngit clone https://github.com/rona-rs/rona.git\ncd rona\ncargo build --release\n```\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\nLicensed under either of:\n- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE))\n- MIT license ([LICENSE-MIT](LICENSE-MIT))\n\nat your option.\n\n## Support\n\nFor bugs, questions, and discussions please use the [GitHub Issues](https://github.com/rona-rs/rona/issues).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frona-rs%2Frona","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frona-rs%2Frona","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frona-rs%2Frona/lists"}