Two phases, run in order:
refresh-omo.*(precursor) — force the plugin cache to the latest published version, then restart OpenCode.optimize-omo.*(debloat) — apply the efficiency configuration.
The debloat applies best-practice configuration to an existing oh-my-openagent installation:
- Disables PostHog telemetry (no network calls home)
- Disables noisy hooks (update checker, startup toast, agent-usage reminders)
- Preserves all logging and error recovery for troubleshooting
- Updates runtime cache to latest version
- Runs doctor health check
refresh-omo.sh / refresh-omo.ps1 force the OhMyOpenCode plugin cache to the true npm latest.
Why it's needed: OpenCode installs each configured plugin into a per-spec cache directory
(~/.cache/opencode/packages/<plugin>@<spec>/) and pins the resolved version there. Because of
that pin, oh-my-openagent@latest in your config never re-resolves on its own — it can stay stuck
several versions behind even though it says @latest. Updating the cache root (as the debloat's
own step 4 does) does not fix this: OpenCode loads the plugin from the per-spec dir. This script
clears that per-spec cache and reinstalls the newest version.
curl -fsSL https://gist.githubusercontent.com/dewdad/d60ef27605f6e7c8dfa590366e5d12b2/raw/refresh-omo.sh | bashor with wget:
wget -qO- https://gist.githubusercontent.com/dewdad/d60ef27605f6e7c8dfa590366e5d12b2/raw/refresh-omo.sh | bashirm https://gist.githubusercontent.com/dewdad/d60ef27605f6e7c8dfa590366e5d12b2/raw/refresh-omo.ps1 | iexThen restart OpenCode (the running process keeps the old plugin in memory) and run the debloat below.
| Step | Action |
|---|---|
| 1 | Scans ~/.cache/opencode/packages/oh-my-*@* for the cached plugin |
| 2 | Compares the installed version against npm latest — skips if already current |
| 3 | Clears the stale per-spec cache (node_modules + lockfiles) |
| 4 | Reinstalls the exact latest with --ignore-scripts (the plugin's postinstall would otherwise delete the freshly-installed dir to force a re-resolve) |
| 5 | Verifies the main package and its platform binary landed on the same version (prevents a stale startup banner) |
Options: --force / -Force (reinstall even if already current), --dry-run / -DryRun (report only, no writes). Safe and idempotent; only touches the oh-my-*@* plugin cache.
curl -fsSL https://gist.githubusercontent.com/dewdad/d60ef27605f6e7c8dfa590366e5d12b2/raw/optimize-omo.sh | bashor with wget:
wget -qO- https://gist.githubusercontent.com/dewdad/d60ef27605f6e7c8dfa590366e5d12b2/raw/optimize-omo.sh | bashirm https://gist.githubusercontent.com/dewdad/d60ef27605f6e7c8dfa590366e5d12b2/raw/optimize-omo.ps1 | iex| Step | Action |
|---|---|
| 1 | Sets OMO_SEND_ANONYMOUS_TELEMETRY=0 and OMO_DISABLE_POSTHOG=1 persistently |
| 2 | Adds disabled_hooks to oh-my-opencode.json (idempotent, won't duplicate) |
| 3 | Cleans stale .tmp files |
| 4 | Updates the runtime cache root to latest via bun or npm (for a reliable plugin update, run the Step 0 precursor first) |
| 5 | Runs oh-my-openagent doctor health check |
| Hook | Why |
|---|---|
auto-update-checker |
Periodic npm registry calls during sessions — adds latency |
startup-toast |
Startup banner noise |
agent-usage-reminder |
"Use explore/librarian instead" reminders in tool output |
- Internal
log()diagnostics (viewable viaopencode --debug) - Session recovery
- All error recovery hooks (edit, JSON, delegate-task-retry, etc.)
- Background notification
- All agent orchestration functionality
# PowerShell
& ./refresh-omo.ps1 -DryRun # report only, no writes
& ./refresh-omo.ps1 -Force # reinstall even if already on latest# Bash
./refresh-omo.sh --dry-run # report only, no writes
./refresh-omo.sh --force # reinstall even if already on latest# Dry run (no changes written)
& ./optimize-omo.ps1 -DryRun
# Skip updating the runtime cache
& ./optimize-omo.ps1 -SkipUpdateThe bash debloat script auto-detects:
- Shell type (zsh, bash, fish) for correct profile file
- Platform (macOS vs Linux) for
sedcompatibility - JSON tool (jq preferred, falls back to python3)
- opencode must be installed and initialized (run
opencodeonce first) - npm (required by the precursor) or bun for cache updates
- Precursor (
refresh-omo.*):npminPATH;node/python3used for version reads when present (falls back togrep) - Bash debloat (
optimize-omo.sh):jqorpython3for JSON manipulation - PowerShell scripts: PowerShell 5.1+ (built into Windows)
Safe to run multiple times. The precursor skips when already on latest (unless --force/-Force) and only touches the oh-my-*@* plugin cache; the debloat won't duplicate hooks and checks env vars before writing.