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 the OPENCODE_CONFIG_CONTENT environment variable, which has higher runtime precedence than the config file. This means:
- The base
opencode.jsonstays clean (no plugin entry) - The plugin is only injected at runtime when needed
- No file mutation, no backups, no restore
Files
opencode-start.sh— Wrapper script that starts OpenCode with/without omoaomoa-restart.mjs— OpenCode skill for Telegram bot integrationREADME.md— This file
Usage
Shell Script
./opencode-start.sh # Start without omoa (vanilla)
./opencode-start.sh --omoa # Start with omoa enabled
Telegram Bot
When registered in opencode.json under "skills", use /commands in Telegram:
restart_with_omoa— Restart OpenCode with omoa enabledrestart_without_omoa— Restart OpenCode without omoa (vanilla)
Installation
- Copy files to
~/.config/opencode/ - Update systemd service to use
opencode-start.sh:[Service] ExecStart=/home/kenny/.config/opencode/opencode-start.sh - Add skill to
opencode.json:"skills": { "omoa-restart": { "description": "Restart OpenCode with/without oh-my-openagent", "path": "/home/kenny/.config/opencode/skills/omoa-restart.mjs" } } - Restart services
Author
Kenny Hibbhome
Created
2026-05-03
Description
Languages
JavaScript
60%
Shell
40%