Skip to main content
The config command manages Patcha settings for your project.

Usage

patcha config <subcommand> [options]

Subcommands

list

Show current configuration.
patcha config list [path]
Example output:
📋 Current Configuration:

  LLM Provider: anthropic
  Auto-fix Level 1: enabled
  Auto-fix Level 2: enabled
  Auto-fix Level 3: disabled

📦 Available LLM Providers:
  - anthropic
  - google
  - openai
  - none

⚙️  Configuration file:
  /project/.patcharc

set-provider

Set the LLM provider.
patcha config set-provider <provider> [path]
Providers:
  • anthropic - Anthropic Claude
  • google - Google Gemini
  • openai - OpenAI GPT
  • none - Disable AI features
Example:
patcha config set-provider anthropic

set-api-key

Set API key for a provider.
patcha config set-api-key <provider> <apiKey> [path]
You can use environment variables:
patcha config set-api-key anthropic $ANTHROPIC_API_KEY
Or direct values (not recommended):
patcha config set-api-key openai sk-xxxxx

auto-fix

Configure auto-fix levels.
patcha config auto-fix [options] [path]
Options:
OptionDescription
--level1Enable/disable level 1 auto-fix
--level2Enable/disable level 2 smart upgrade
--level3Enable/disable level 3 AI-assisted
Examples:
# Enable all levels
patcha config auto-fix --level1 --level2 --level3

# Disable AI-assisted
patcha config auto-fix --no-level3

Configuration File

Patcha stores configuration in .patcharc in your project root:
{
  "llmProvider": "anthropic",
  "apiKeys": {
    "anthropic": "$ANTHROPIC_API_KEY"
  },
  "autoFix": {
    "level1": true,
    "level2": true,
    "level3": false
  }
}

Environment Variables

You can also configure via environment variables:
VariableDescription
ANTHROPIC_API_KEYAnthropic Claude API key
OPENAI_API_KEYOpenAI API key
GOOGLE_API_KEYGoogle Gemini API key