src/cli/ provides the plugin installation workflow and the utilities that generate and persist runtime configuration.
Current responsibilities:
src/cli/index.ts only dispatches:
install subcommand and flags--skills=yes|no--preset=<name>--no-tui--dry-run--reset--helpThe CLI is intentionally non-interactive-only now; it prints usage and steps to stdout with exit codes.
paths.ts: config directory and file discovery (opencode.json/.jsonc, lite config path).config-io.ts: JSON/JSONC parsing, normalize write behavior, atomic writes (.tmp + .bak), plugin registration, default-agent disabling.providers.ts: provider model mapping + generateLiteConfig().system.ts: OpenCode binary/version/path checks.skills.ts: bundled and permission-only skill permission defaults.custom-skills.ts: bundled skill registry and copy-to-config-directory implementation.config-manager.ts: re-export barrel for CLI config utilities.install.ts: end-to-end install orchestration and console messaging.types.ts: install/config DTOs.CLI install command
└─> install.ts (runInstall)
1) check OpenCode installed
2) add plugin entry to main OpenCode config
3) disable legacy default agents
4) write/preview generated lite config
5) optional install phase:
- installCustomSkill(...) for each CUSTOM_SKILL
generateLiteConfig(installConfig) behavior:
$schema, a selected preset that defaults to openaiopenai and opencode-go--preset only selects between generated presetsDEFAULT_AGENT_MCPSlayout, main_pane_size) when enabledwriteLiteConfig() writes target file atomically and supports --reset/dry-run branching in install.ts.
oh-my-opencode-slim.json) is consumed by runtime config/loader.ts.agents/index.ts via cli/skills.ts.src/index.ts bootstrap.--skills controls bundled/custom skill installation only.openai, opencode-go, kimi, copilot, and zai-plan.