Configuration
Enhance works with zero config. But you can customize it per-project with a config file.
Config file
Create a .enhancerc.json file in your project root:
.enhancerc.json
{
"provider": "claude",
"model": "claude-sonnet-4-6",
"maxContextTokens": 3000,
"customInstructions": "Always use React Query for data fetching. Prefer named exports."
}Also supported: .enhancerc, .enhancerc.yaml, enhance.config.js, or a "enhance" key in package.json.
Options
| Key | Type | Default | Description |
|---|---|---|---|
| provider | string | claude | AI provider: claude | codex | opencode |
| model | string | claude-sonnet-4-6 | Model ID to use |
| maxContextTokens | number | 3000 | Max characters of project files to include as context |
| customInstructions | string | — | Extra instructions injected into every enhanced prompt |
API key
Set via environment variable. Never hardcode in the config file.
Terminal
# Add to ~/.zshrc or ~/.bashrc to make permanent
export ANTHROPIC_API_KEY=sk-ant-...
# Reload shell
source ~/.zshrcSecurity note
Never commit API keys to git. The config file is for provider/model preferences only. Keys always come from environment variables.