fix command resolves vulnerabilities using Patcha’s multi-level resolution system.
Usage
Arguments
| Argument | Description | Default |
|---|---|---|
path | Project path to fix | Current directory |
Options
| Option | Alias | Description |
|---|---|---|
--ai | - | Use AI to fix complex vulnerabilities |
--dry-run | - | Show what would be fixed without making changes |
--yes | -y | Auto-confirm fixes |
--auto | - | Non-interactive mode for CI/CD |
--mr | - | Create branch, commit and merge request |
--json | - | Output results as JSON |
--verbose | -v | Enable verbose debug output |
Examples
Basic Fix
Dry Run
Auto-confirm
CI Mode
AI-assisted Fix
- An LLM provider configured
- API key set
Create Merge Request
- Creates a new branch
- Commits the changes
- Creates a merge/pull request
JSON Output
Exit Codes
0: All vulnerabilities resolved1: Some vulnerabilities could not be resolved2: Error occurred
Resolution Levels
The fix command uses three resolution levels:- Level 1: Auto-fix (direct version updates)
- Level 2: Smart upgrade (compatibility analysis)
- Level 3: AI-assisted (for complex cases)
