OpenCode Configuration

Aegis generates opencode.json and oh-my-opencode.json from typed TOML definitions. This gives you:

How it works

opencode.toml  ──[parse]──>  Rust structs  ──[transform]──>  JSON
                                                              ├── opencode.json
                                                              └── oh-my-opencode.json

The TOML file lives in your ai-tools module (typically modules/ai-tools/opencode.toml) and contains both the [opencode] and [oh_my_opencode] sections.

Quick example

# Validate the TOML
aegis opencode validate

# Generate JSON files
aegis opencode generate

# Preview without writing
aegis --dry-run opencode generate

Output format

The generated JSON matches the exact schema expected by OpenCode and oh-my-opencode, including: