Examples
Real-world examples of using voria to fix open source issues.
Example 1: Simple Bug Fix
Scenario
A simple bug in a Python library where a function returns wrong type.
Command
bashvoria issue 42
What Happens
- ▶
Fetch Issue
terminalIssue #42: TypeError in calculate_total() Description: When given empty list, returns None instead of 0 - ▶
Plan
terminalDetected: Simple return value bug Plan: Add condition to return 0 for empty input Estimated effort: 5 minutes - ▶
Generate Patch
diff-def calculate_total(items): +def calculate_total(items): + if not items: + return 0 return sum(items) - ▶
Test
terminalRunning pytest... ✓ All 12 tests pass ✓ New test cases pass - ▶
Result
terminal✅ Issue fixed! Pull Request created: #1234
Example 2: Feature Implementation with Iteration
Scenario
Adding a new feature that requires multiple iterations to get tests passing.
Command
bashvoria issue 100 --verbose --max-iterations 5
Iteration Details
Iteration 1:
- ▶Plan: Add new methodterminal
filter() - ▶Patch: Adds basic filter implementation
- ▶Test: FAILED - Missing parameter validation
Iteration 2:
- ▶Analysis: Tests expect validation error
- ▶Patch: Add parameter type checking
- ▶Test: FAILED - Missing docstring
Iteration 3:
- ▶Analysis: Linting checks require docs
- ▶Patch: Add docstring and examples
- ▶Test: PASSED ✓
Result: Feature ready after 3 iterations
Example 3: Complex Multi-File Change
Scenario
API migration requiring changes across 5+ files.
Command
bashvoria issue 200 --dry-run --verbose
Dry Run Output
terminalWould modify: ✓ src/api.py (3 changes) ✓ src/models.py (2 changes) ✓ tests/test_api.py (5 changes) ✓ docs/api.md (1 change) ✓ setup.py (1 change) Would run tests: ✓ pytest tests/ (estimated 2m) ✓ Coverage report (estimated 30s) Estimated impact: - Lines added: 120 - Lines removed: 85 - Files modified: 5
After verification:
bashvoria issue 200 --create-pr
🧪 Example 4: Using Different LLM Providers
Compare LLMs
Modal (Fastest, Free)
bashvoria issue 50 --llm modal --verbose Time: 2 minutes Cost: $0 Result: Works but basic
OpenAI GPT-5.4 (Best Quality)
bashvoria issue 50 --llm openai --verbose Time: 5 minutes Cost: $0.15 Result: Excellent, well-documented
Google Gemini (Best Balance)
bashvoria issue 50 --llm gemini --verbose Time: 3 minutes Cost: $0.05 Result: Good quality, fast
Example 5: Custom Test Command
Scenario
Repository uses custom test framework (not auto-detected).
Setup
bashvoria issue 75 --test-cmd "npm run test:coverage" --test-pattern "*.test.js"
What Happens
- ▶Generates patch
- ▶Applies patch
- ▶Runs: terminal
npm run test:coverage - ▶Parses custom coverage output
- ▶Determines success/failure
- ▶Iterates if needed
Example 6: Code Quality Issues
Scenario
Issue about code formatting/linting violations.
Command
bashvoria issue 15 --hook "pre-test: black src/ && pylint src/"
Workflow
- ▶Plan: Identify formatting needed
- ▶Patch: Generate fixes
- ▶Apply patch
- ▶Pre-test: Run black formatter + pylint
- ▶Test: Run test suite
- ▶Success: Clean code + passing tests
Example 7: Documentation Update
Scenario
GitHub issue requesting documentation improvements.
Command
bashvoria issue 88 --save-iterations --output markdown
Result: Markdown Report
markdown# Issue #88: Fix Documentation ## Plan Add examples and API reference for new module ## Changes Made - Added quickstart guide - Added 5 practical examples - Updated API documentation - Added troubleshooting section ## Test Results - ✅ All documentation builds successfully - ✅ Links are valid - ✅ Code examples run without errors
Example 8: Security-Related Fix
Scenario
Security vulnerability that needs careful handling.
Command
bashvoria issue 300 \ --require-approval \ --skip-auto-pr \ --save-analysis \ --verbose
Output
terminal[SECURITY] Analyzing vulnerability... Identified: SQL injection in user input handling Severity: HIGH Generated fix: ✓ Adds parameterized queries ✓ Adds input validation ✓ Adds security tests Awaiting approval before: - Applying patch - Running tests - Creating PR Review: ./analysis/issue-300-security-review.md
Example 9: Performance Optimization
Scenario
Issue about slow function that needs optimization.
Command
bashvoria issue 42 \ --test-cmd "pytest benchmarks/" \ --performance-baseline 2.5s \ --verbose
Workflow
- ▶Plan: Identify optimization opportunity
- ▶Generate: Optimize algorithm/caching
- ▶Benchmark: shows 0.8s (3x faster!)terminal
pytest benchmarks/ - ▶Test: All tests pass
- ▶Success: "30% performance improvement"
Example 10: Batch Processing Multiple Issues
Scenario
Fix multiple related issues at once.
Script
bash#!/bin/bash ISSUES=(42 43 44 45 46) for issue in "${ISSUES[@]}"; do echo "Processing issue #$issue..." voria issue $issue --create-pr --llm gemini sleep 2 # Rate limiting done
Output
terminalProcessing issue #42... ✅ Created PR #1234 Processing issue #43... ✅ Created PR #1235 Processing issue #44... ✅ Created PR #1236 ... All issues processed! 5 PRs created.
Example 11: Investigating Before Fixing
Scenario
Complex issue - want to analyze before fixing.
Commands
bash# Step 1: Just plan voria plan 999 --verbose # Step 2: Dry run voria issue 999 --dry-run # Step 3: Dry run with specific LLM voria issue 999 --dry-run --llm claude # Step 4: Dry run with custom tests voria issue 999 --dry-run --test-cmd "npm run test:all" # Step 5: Actually run it voria issue 999 --create-pr
Example 12: Handling Failures
Scenario
Fix attempt fails - how to debug and retry.
Commands
bash# First attempt voria issue 50 --verbose # If it fails, review logs voria logs issue 50 --level DEBUG # Try with different LLM voria issue 50 --llm claude # Or with higher iterations voria issue 50 --max-iterations 8 # Or manually fix and apply voria apply manual-plan
Example 13: Progress Monitoring
Scenario
Monitor voria's progress on an issue.
Commands
bash# Terminal 1: Start voria voria issue 42 --verbose --follow-logs # Terminal 2: Monitor status while true; do voria status issue 42 sleep 5 done # Terminal 3: Check token usage watch voria token info
Example 14: GitHub Enterprise Integration
Scenario
Using voria with GitHub Enterprise (on-premise).
Setup
bash# Configure GitHub Enterprise python3 -m voria.core.setup # Select: github-enterprise # Enter: https://github.enterprise.com # Token: ghp_...
Usage
bashvoria issue 42 --github https://github.enterprise.com
Best Practice: The Complete Workflow
Full Workflow Example
bash# 1. Investigate voria plan 42 --verbose # 2. Dry run (no modifications) voria issue 42 --dry-run --verbose # 3. Check what changed (before applying) voria logs issue 42 --dry-run # 4. Run with minimal risk voria issue 42 \ --max-iterations 3 \ --require-approval \ --save-analysis # 5. If successful, create PR voria issue 42 --create-pr # 6. Monitor the PR voria status pr-id # 7. Review results voria logs issue 42 --output markdown > review.md
Learning from Examples
Run the Examples:
bash# Try all examples in sequence for ex in {1..5}; do echo "Running example $ex..." voria example $ex --verbose done
Understand the Output:
bash# Generate detailed analysis voria issue 42 --output json | jq . | less # Export to markdown voria issue 42 --output markdown > report.md # Compare different approaches diff <(voria issue 42 --llm openai --output json) \ <(voria issue 42 --llm modal --output json)
Try these examples! Start with simplest (Example 1) and work up to more complex ones.
Join our WhatsApp Support Group: Click Here