Skip to content

Configuration

LNAI uses two JSON files for configuration: config.json for tool settings and settings.json for shared configuration.

Controls which tools are enabled and their sync behavior.

.ai/config.json
{
"tools": {
"claudeCode": {
"enabled": true,
"versionControl": false
},
"opencode": {
"enabled": true,
"versionControl": false
}
}
}
FieldTypeDescription
enabledbooleanWhether to sync configuration to this tool
versionControlbooleanTrack generated files in git (default: false)

If config.json is missing, all tools are synced by default.


Contains shared configuration that applies to all tools.

.ai/settings.json
{
"permissions": {
"allow": ["Bash(git:*)"],
"ask": ["Bash(npm:*)"],
"deny": ["Read(.env)"]
},
"mcpServers": {
"memory": {
"command": "npx",
"args": ["-y", "@anthropic/mcp-server-memory"]
}
},
"overrides": {
"claudeCode": { "model": "opus" },
"opencode": { "theme": "dark" }
}
}

Control what operations AI tools can perform.

LevelBehavior
allowOperation runs automatically
askUser must confirm
denyOperation is blocked

Permissions use the format: Tool(pattern)

ToolOperations
BashShell commands
ReadFile reading
WriteFile writing
EditFile editing
{
"permissions": {
"allow": ["Bash(git status)", "Bash(pnpm test)"],
"ask": ["Bash(git:*)", "Bash(npm:*)"],
"deny": ["Read(.env)", "Read(*.pem)"]
}
}

Configure Model Context Protocol servers.

{
"mcpServers": {
"memory": {
"command": "npx",
"args": ["-y", "@anthropic/mcp-server-memory"]
}
}
}
{
"mcpServers": {
"api": {
"type": "http",
"url": "https://mcp.example.com",
"headers": {
"Authorization": "Bearer ${API_KEY}"
}
}
}
}

Use ${VAR} syntax for environment variables.