Files
Wesam Abousaid a3f328c043 docs: refresh for OpenCode v1.17.13, add Go coverage, and rebrand
- Bump every version pin, pricing table, and model ID to the verified
  2026-07-05 state (v1.17.13): Claude Fable 5 / Sonnet 5 on Zen, new
  free tier, deprecation sunset table, v1.17.x changelog section
- Cover gaps: OpenCode Go vs Zen billing, Anthropic subscription-login
  removal (PR #18186), MCP resources, --mini mode, --auto flag, yolo mode
- Fix correctness bugs: command-template !`cmd` syntax in docs and
  .opencode/commands, protect-secrets regex missing 'cat .env', dual
  plugin exports, quickstart PATH fix, Playwright MCP flags, ctrl+d
  keybind conflict, agent/command required-field claims
- Fix links: cursor.com, windsurf.com, platform.claude.com,
  code.claude.com, opencode.ai/discord, Vercel Grep announcement
- Rebrand: banner (Images/banner.svg), 1280x640 social preview asset,
  hero redesign with star CTA, ecosystem stats, private vulnerability
  reporting channel, CI-matching local checks, MD060 lint opt-out
2026-07-05 14:11:51 +02:00
..

.opencode/plugins/

Working examples of OpenCode plugins. Drop-in to any project — pure JS, no npm dependencies.

Plugin What it does
protect-secrets.js Blocks any tool call (read/write/bash) touching .env*, secrets/, credentials*, SSH keys, .npmrc, .pypirc.
audit-log.js Appends a one-line JSON record of every completed tool call to .opencode/audit.jsonl.

How they load

OpenCode auto-loads every .js / .ts file in .opencode/plugins/ at session start. No registration step.

opencode                       # loads both plugins automatically
opencode --pure                # skip all plugins for one run

Audit how this plugin folder fires

tail -f .opencode/audit.jsonl    # watch tool calls live

Sample line:

{"ts":"2026-06-08T19:30:12.451Z","tool":"edit","arg_keys":["filePath","oldString","newString"],"title":"src/api/auth.ts"}

Disabling temporarily

Three options:

  1. Move the plugin file out of .opencode/plugins/.

  2. Comment out all exports in the file (every export is loaded, so a leftover one keeps the plugin alive) — or rename the file to a non-.js/.ts extension.

  3. Gate the body of the plugin on an env var:

    if (process.env.OPENCODE_DISABLE_AUDIT_LOG) return {};
    

Writing your own

See docs/plugins.md for the full API, event list, and more patterns (auto-format on save, idle notifications, etc.).