Strip emojis from agent outputs in Opencode
  • TypeScript 87.5%
  • Lua 12.5%
Find a file
2026-02-24 11:40:43 +00:00
data hotfix: reorganize data files into src 2025-12-28 20:27:22 +00:00
scripts hotfix: reorganize data files into src 2025-12-28 20:27:22 +00:00
src refactor: remove toast and verbose notifs 2025-12-30 17:00:38 +00:00
tests refactor: remove toast and verbose notifs 2025-12-30 17:00:38 +00:00
.gitignore chore: move data ts mappings to root data 2025-12-28 15:08:53 +00:00
.luacheckrc perf: pre-generate emoji data at build time 2025-12-21 19:10:58 +00:00
.oxlintrc.json chore: rm markdownChars config 2025-12-28 15:20:28 +00:00
biome.json chore: linters updated 2025-12-28 13:48:45 +00:00
bun.lock chore: bun lock tags 2026-02-24 11:40:43 +00:00
CHANGELOG.md docs: markdown sys entries 2025-12-28 13:49:24 +00:00
CONTRIBUTING.md docs: new badges and README structure 2025-12-29 12:13:06 +00:00
LICENSE chore: release prep; docs updates 2025-12-24 16:52:47 +00:00
package.json chore: kofi links added 2026-02-24 11:37:24 +00:00
README.md chore: kofi links added 2026-02-24 11:37:24 +00:00
tsconfig.json hotfix: reorganize data files into src 2025-12-28 20:27:22 +00:00
vitest.config.ts chore: add data files 2025-12-21 19:11:47 +00:00

UNMOJI

NPM Package NPM Version NPM Downloads Ko-fi OpenCode Cafe codeberg

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:

  1. Global: in ~/.config/opencode/opencode.json. You’ll want to use the global config for things like themes, providers, or keybinds.
  2. Per Project: You can also add a opencode.json in 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

  1. Regular agent text and summaries in the main ui thread (format agnostic).
  2. newString (new lines) in markdown files (.md, .mdx, .mdc, .markdown) when an agent calls edit tool.
  3. Whole markdown file content when the agent calls write tool.

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