A small OpenCode plugin that replaces case-insensitive occurrences of opencode with a configurable word (default: Renamer) across OpenCode outputs.
This is mainly useful for privacy/safety: it helps reduce accidental disclosure of the platform name in logs, screenshots, demos, shared transcripts, or tool output.
- Safer sharing: reduces chance your pasted output reveals “opencode”.
- Cleaner demos and screenshots: consistent wording in public materials.
- Non-invasive: avoids changing URLs, file paths, and code blocks so you don’t break commands, stack traces, or links.
The plugin runs on multiple OpenCode hooks, including chat messages, system prompts, tool output, and session titles.
It does not replace inside:
- URLs (example:
https://opencode.ai/docs/plugins) - file paths (example:
.opencode/...,/usr/local/...,C:\Users\...) - inline code and fenced code blocks (anything inside backticks)
- Install the plugin in your project:
bun add -d @sillybit/renamer-opencode-plugin- Add the plugin to your OpenCode config (
opencode.jsonoropencode.jsonc):
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["@sillybit/renamer-opencode-plugin"]
}- Restart OpenCode.
OpenCode installs npm plugins automatically at startup (cached under ~/.cache/opencode/node_modules/), so the manual install step is optional.
Config is optional. If you don’t configure anything, the plugin is enabled and replaces opencode → Renamer.
Config files are JSON and loaded from both locations:
- Global:
~/.config/opencode/renamer-config.json - Project:
.opencode/renamer-config.json
Project config overrides global config.
Example:
{
"enabled": true,
"replacement": "Renamer"
}OPENCODE_RENAMER_REPLACE_ENABLED(true/false, also supports1/0,yes/no,on/off)OPENCODE_RENAMER_REPLACE_TEXT(non-empty string)
Input:
I’m using opencode for this task
Output (default):
I’m using Renamer for this task
https://opencode.ai/docs/plugins stays unchanged.
Inline code: `opencode` stays unchanged.
Fenced code blocks stay unchanged:
echo "opencode"- Match is case-insensitive:
OpenCode,OPENCODE,opencodeall become yourreplacement. - Replacement target is intentionally fixed to
opencode(not configurable).
bun install
bun run buildThis project follows Conventional Commits specification.
Format:
<type>(<scope>): <subject>
<body>
<footer>
Types:
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changes (formatting, missing semicolons, etc.)refactor: Code refactoringperf: Performance improvementstest: Adding or updating testschore: Maintenance tasks (dependencies, build config, etc.)
Examples:
feat: add support for custom replacement patterns
fix: exclude URLs from text replacement
docs: update installation instructions
chore: update dependencies
Breaking Changes:
Use ! after the type/scope to indicate breaking changes:
feat!: change default replacement from "Renamer" to "Custom"
MIT