- opencode-start.sh: checks for state file, injects omoa via OPENCODE_CONFIG_CONTENT - omoa-post-upgrade.sh: removes omoa plugin from opencode.json after upstream install - omoa-toggle.mjs: single Telegram skill to toggle on/off/status - No file mutation of opencode.json, compatible with upstream updates
OpenCode omoa Toggle
Toggle the 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:
- State file (
~/.config/opencode/omoa-enabled) — determines if omoa should be active OPENCODE_CONFIG_CONTENTenvironment variable — injects the plugin at runtime (higher precedence than config file)- Post-upgrade script — removes plugin entry from
opencode.jsonafter running upstream installer
This approach:
- Keeps
opencode.jsonclean (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 omoaomoa-post-upgrade.sh— Removes omoa plugin fromopencode.jsonafter upstream installomoa-toggle.mjs— OpenCode skill for Telegram bot integrationREADME.md— This file
Installation
- Copy files to
~/.config/opencode/ - Make scripts executable:
chmod +x ~/.config/opencode/opencode-start.sh chmod +x ~/.config/opencode/omoa-post-upgrade.sh - Symlink to PATH:
ln -sf ~/.config/opencode/opencode-start.sh ~/.local/bin/opencode-start ln -sf ~/.config/opencode/omoa-post-upgrade.sh ~/.local/bin/omoa-post-upgrade - Update systemd service to use wrapper:
[Service] ExecStart=/home/kenny/.config/opencode/opencode-start.sh - Add skill to
opencode.json:"skills": { "omoa-toggle": { "description": "Toggle oh-my-openagent on/off", "path": "/home/kenny/.config/opencode/skills/omoa-toggle.mjs" } } - Restart services
Usage
Shell
# 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:
npx oh-my-openagent@latest install
omoa-post-upgrade # Clean the plugin entry from opencode.json
Author
Kenny Hibbhome
Created
2026-05-03
Description
Languages
JavaScript
60%
Shell
40%