Skip to content

Overrides

Overrides let you customize tool-specific settings while maintaining a unified configuration.

Define in settings.json under the overrides key:

{
"permissions": { ... },
"mcpServers": { ... },
"overrides": {
"claudeCode": {
"model": "opus"
},
"opencode": {
"theme": "dark"
}
}
}

Values are deep-merged into the generated configuration.

  • Objects: Recursively merged
  • Arrays: Concatenated and deduplicated
  • Primitives: Override wins

Claude Code:

{
"overrides": {
"claudeCode": {
"model": "opus",
"customInstructions": "Additional context..."
}
}
}

OpenCode:

{
"overrides": {
"opencode": {
"theme": "system",
"keybindings": "vim"
}
}
}

Place files in tool-specific directories within .ai/:

.ai/
├── .claude/ # Claude Code file overrides
└── .opencode/ # OpenCode file overrides

Files are symlinked to the tool’s output directory:

SourceTarget
.ai/.claude/<path>.claude/<path>
.ai/.opencode/<path>.opencode/<path>
.ai/.claude/
└── commands/
└── deploy.md

After lnai sync:

.claude/
├── CLAUDE.md # from unified config
├── settings.json # generated
└── commands/
└── deploy.md # symlink

Use JSON overrides for settings, file overrides for additional files like custom commands.