@bastiangx/opencode-unmoji
v0.3.12
Published
OpenCode plugin to strip or replace emojis from agent outputs
Maintainers
Readme
UNMOJI
An OpenCode plugin that strips all kinds of emojis from your agent outputs.
Installation
Add the following to your opencode.json file:
{
"plugin": ["@bastiangx/opencode-unmoji"]
}You can find your OpenCode file in a couple of different locations:
- Global: in
~/.config/opencode/opencode.json. You’ll want to use the global config for things like themes, providers, or keybinds.- Per Project: You can also add a
opencode.jsonin your project. Settings from this config are merged with and can override the global config.
Visit OpenCode docs for more info.
What It Does
UNMOJI automatically removes all standard unicode emojis and glyphs from your agent outputs.
Especially useful when you are using models like Claude which seem to LOVE spamming emojis on summaries, README files and various documentations.
- ~ 30,000 emojis covered.
Output targets
- Regular agent text and summaries in the main ui thread (format agnostic).
newString(new lines) in markdown files (.md, .mdx, .mdc, .markdown) when an agent callsedittool.- Whole markdown file content when the agent calls
writetool.
Thinking tokens as output targets are not supported at this time.
Configuration
Create and add the unmoji.json file to your OpenCode config path.
{
"enabled": true,
"mode": "strip",
"processMarkdown": true,
"markdownExtensions": [".md"],
"showNotification": true,
"preserveCodeBlocks": true,
"preserveInlineCode": true,
"skipQuotes": false,
"replacementStyle": "github",
"replacementFormat": "[:name:]"
}Full options spec
| Option | Default | Possible Values | Desc |
| :------------------- | :--------: | :---------------------------------------------------------- | :----------------------------------------------------- |
| enabled | true | true, false | Enable / disable the plugin without uninstalling it |
| mode | strip | strip, replace | strip removes emojis, replace puts shortcodes |
| processMarkdown | true | true, false | Process emojis in markdown files written by tools |
| markdownExtensions | [".md"] | [".md", ".mdx", ".mdc", ".markdown"] | File extensions treated as markdown for tool hooks |
| showNotification | true | true, false | Shown when emojis are removed |
| preserveCodeBlocks | true | true, false | Do not process emojis inside code blocks |
| preserveInlineCode | true | true, false | Do not process emojis inside inline code |
| skipQuotes | false | true, false | Do not process emojis inside quoted text blocks |
| replacementStyle | github | github, slack, discord, cldr, iamcal, joypixels | Shortcode style used when mode is replace |
| replacementFormat | [:name:] | :name:, [:name:], {name} | Template format [literal string] for shortcode outputs |
Contributing
Contributions are welcome!
Follow the Contributing guide for instructions.
License: MIT
