# OpenCode omoa Toggle Toggle the [oh-my-openagent](https://github.com/code-yeongyu/oh-my-openagent) plugin for OpenCode. ## Purpose oh-my-openagent adds multi-model orchestration, LSP tools, and other advanced features to OpenCode. However, it can interfere with normal operation. This tool provides a simple way to enable/disable it **without modifying the config file**. ## How It Works The solution uses: 1. **State file** (`~/.config/opencode/omoa-enabled`) — determines if omoa should be active 2. **`OPENCODE_CONFIG_CONTENT` environment variable** — injects the plugin at runtime (higher precedence than config file) 3. **Post-upgrade script** — removes plugin entry from `opencode.json` after running upstream installer This approach: - Keeps `opencode.json` clean (no plugin entry) - Is compatible with upstream install script - No file mutation, no backups, no restore ## Files - `opencode-start.sh` — Wrapper script that starts OpenCode with/without omoa - `omoa-post-upgrade.sh` — Removes omoa plugin from `opencode.json` after upstream install - `omoa-toggle.mjs` — OpenCode skill for Telegram bot integration - `README.md` — This file ## Installation 1. Copy files to `~/.config/opencode/` 2. Make scripts executable: ```bash chmod +x ~/.config/opencode/opencode-start.sh chmod +x ~/.config/opencode/omoa-post-upgrade.sh ``` 3. Symlink to PATH: ```bash ln -sf ~/.config/opencode/opencode-start.sh ~/.local/bin/opencode-start ln -sf ~/.config/opencode/omoa-post-upgrade.sh ~/.local/bin/omoa-post-upgrade ``` 4. Update systemd service to use wrapper: ```ini [Service] ExecStart=/home/kenny/.config/opencode/opencode-start.sh ``` 5. Add skill to `opencode.json`: ```json "skills": { "omoa-toggle": { "description": "Toggle oh-my-openagent on/off", "path": "/home/kenny/.config/opencode/skills/omoa-toggle.mjs" } } ``` 6. Restart services ## Usage ### Shell ```bash # Start without omoa (vanilla) opencode-start # Start with omoa enabled opencode-start --omoa # After running upstream install script omoa-post-upgrade ``` ### Telegram Bot Use `/commands` → `omoa_toggle`: - `on` — Enable omoa (creates state file, restarts server) - `off` — Disable omoa (deletes state file, restarts server) - `status` — Check if omoa is enabled ### After Upstream Updates When you run the upstream install script: ```bash npx oh-my-openagent@latest install omoa-post-upgrade # Clean the plugin entry from opencode.json ``` ## Author Kenny Hibbhome ## Created 2026-05-03