The oh-my-opencode install command (also accessible via the oh-my-openagent and omo aliases) performs initial setup by detecting available AI providers, generating optimized model configurations, and integrating the plugin into OpenCode docs/reference/cli.md10-17 It transforms a single AI agent into a coordinated development team by mapping user subscriptions to specific agent roles docs/guide/overview.md3-7
The installation process supports two primary editions:
The installation flow coordinates environment verification, provider detection, and configuration persistence. It supports interactive (TUI) and non-interactive (CLI) modes packages/omo-opencode/src/cli/cli-installer.ts30-43
Installation Flow Diagram
Installation Flow Phases
| Phase | Component | Purpose |
|---|---|---|
| 1. Platform Check | isOpenCodeInstalled() | Verifies OpenCode presence and version (minimum >= 1.4.0) packages/omo-opencode/src/cli/cli-installer.test.ts47-48 |
| 2. Provider Discovery | detectCurrentConfig() | Scans environment for existing subscriptions (Claude, OpenAI, Gemini, etc.) packages/omo-opencode/src/cli/cli-installer.ts48-67 |
| 3. Model Matching | generateModelConfig() | Maps detected providers to the 11 specialized agents docs/guide/agent-model-matching.md41-42 |
| 4. Platform Setup | runCodexInstaller() | Configures Codex Light edition, managing ~/.codex/config.toml docs/guide/installation.md41 |
| 5. Configuration | writeOmoConfig() | Writes the final oh-my-openagent.jsonc with schema references docs/reference/configuration.md48-59 |
Sources: docs/guide/installation.md10-14 packages/omo-opencode/src/cli/cli-installer.ts30-118 packages/omo-opencode/src/cli/tui-install-prompts.ts31-45 packages/omo-opencode/src/cli/cli-installer.test.ts28-49
The TUI mode uses @clack/prompts to guide users through platform selection and subscription confirmation packages/omo-opencode/src/cli/tui-install-prompts.ts1-8 It is the recommended path for humans to avoid configuration errors docs/guide/installation.md20
opencode, codex, or both packages/omo-opencode/src/cli/tui-install-prompts.ts34-38Triggered by --no-tui, this mode is used for CI/CD or automated setups docs/guide/installation.md38
Key Arguments
| Argument | Description |
|---|---|
--platform | Target: opencode, codex, or both docs/reference/cli.md60 |
--codex-autonomous | Enables full-permissions mode (approval_policy = "never") docs/guide/installation.md33 |
--skip-auth | Skips authentication setup hints during the process docs/reference/cli.md72 |
Sources: docs/reference/cli.md45-77 packages/omo-opencode/src/cli/tui-install-prompts.ts12-29 docs/guide/installation.md31-39
The system does not just assign "smart" models; it matches models to the "personality" of the agent docs/guide/agent-model-matching.md41-42
Code Entity Mapping: Model Requirements
Config Generation Logic
visual-engineering (Gemini) or ultrabrain (GPT-5.5 xhigh) docs/guide/overview.md103ULTIMATE_FALLBACK (typically opencode/gpt-5-nano) packages/omo-opencode/src/cli/tui-install-prompts.ts84Sources: docs/guide/agent-model-matching.md7-32 docs/reference/configuration.md79-116 docs/examples/default.jsonc7-58 packages/omo-opencode/src/cli/model-fallback.ts5-10
Configurations are stored in hierarchical locations:
~/.config/opencode/oh-my-openagent.jsonc (Linux/macOS) docs/reference/configuration.md53.opencode/oh-my-openagent.jsonc docs/reference/configuration.md48omo doctor to diagnose installation health across System, Config, Tools, and Models docs/reference/cli.md118-121npx lazycodex-ai uninstall removes managed Codex state, strips hooks from config.toml, and removes managed agent TOMLs docs/guide/installation.md66Anonymous telemetry (via PostHog) tracks daily active usage. It can be disabled via OMO_DISABLE_POSTHOG=1 docs/reference/cli.md85-88
Sources: docs/reference/cli.md118-142 docs/reference/configuration.md44-59 docs/guide/installation.md64-68