1.7 KiB

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.json stays 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 omoa
  • omoa-restart.mjs — OpenCode skill for Telegram bot integration
  • README.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 enabled
  • restart_without_omoa — Restart OpenCode without omoa (vanilla)

Installation

  1. Copy files to ~/.config/opencode/
  2. Update systemd service to use opencode-start.sh:
    [Service]
    ExecStart=/home/kenny/.config/opencode/opencode-start.sh
    
  3. 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"
      }
    }
    
  4. Restart services

Author

Kenny Hibbhome

Created

2026-05-03