npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

opencode-fmt

v0.3.1

Published

[![Bun Version](https://img.shields.io/badge/Bun-%3E%3D1.3.11-blue?logo=bun&logoColor=white)](https://bun.sh) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![GitHub Repository](https://img.shi

Readme

OpenCode FMT

Bun Version License: MIT GitHub Repository

A unified text optimization plugin for OpenCode that sanitizes emojis and formats markdown tables. Built for high-performance pipelines where minimal latency is a requirement.


Features

  • Deterministic Emoji Sanitizer: Removes emojis from AI outputs without altering the surrounding whitespace or layout.
  • Isolated Table Aligner: Formats Markdown tables by calculating maximum column widths and applying deterministic padding, ensuring visual correctness.
  • Low-Latency Engine: Processes AI output efficiently without a full AST-based parser, maintaining near-linear time processing.
  • Concealment-Aware Widths: Intelligently calculates table widths by accounting for markdown markers like bold, italics, bold, or italics which are hidden in many views.
  • Flat Configuration: Simple, flat boolean configuration file with nested-object validation.

Quick Start

Add the plugin name to your OpenCode config file plugins section in ~/.config/opencode/config.json:

{
  "plugins": [
    "opencode-fmt"
  ]
}

Plugin Configuration

The plugin automatically initializes a default configuration at ~/.config/opencode/fmt/config.json on its first run if it doesn't already exist.

{
  "stripEmojis": true,
  "alignTables": true,
  "concealmentAware": true,
  "logging": false
}

[!NOTE] All configuration keys are booleans. Top-level arrays and unknown keys in config.json are accepted for forward compatibility, but current core behavior only uses the documented keys below. Nested objects are strictly prohibited.

| Key | Default | Description | | :--- | :--- | :--- | | stripEmojis | true | Removes all emojis from the output. | | alignTables | true | Dynamically aligns Markdown tables for visual consistency. | | concealmentAware | true | Accounts for hidden markdown markers (e.g. **, _) in column widths. | | logging | false | Enables duration and raw/clean output logging to opencode-fmt.log. |


Examples

Emoji Sanitization

The sanitizer removes pictographic and dingbat symbols from the text stream.

Before: Hello [hand-wave], our launch [rocket] was a success [party]!
After: Hello , our launch was a success !

(Note: Surrounding whitespaces are strictly preserved for deterministic layout stability, which may result in double spaces where an emoji was removed).

[!NOTE] If a response contains only emojis (and optional whitespace characters), opencode-fmt will replace it with a redaction placeholder:
[Only emojis received and redacted by opencode-fmt]

Table Alignment

The aligner intelligently pads columns based on the longest cell in each column.

Before:

| Header 1 | H2 |
|---|---|
| Val | Long Value |

After:

| Header 1 | H2         |
| -------- | ---------- |
| Val      | Long Value |

Architectural Constraints

This plugin is governed by strict technical rules to preserve its performance:

  1. AST-Free Processing: No heavyweight parsing into an Abstract Syntax Tree.
  2. Zero Runtime Dependencies: Built purely on native Bun/Node APIs and the core plugin hook.
  3. Flat Config: No nested objects are allowed in config.json to prevent parsing overhead. The configuration is stored in ~/.config/opencode/fmt/config.json. Top-level arrays are permitted for list-based features. Any unknown keys are merged but ignored by core logic.
  4. Diff Stability: Non-target text (pure paragraphs) is preserved byte-for-byte in the output.

Inspiration

This plugin was inspired by two community plugins that pioneered single-feature plugin design:

Both showed that focused, lightweight plugins can solve specific pain points elegantly. This plugin follows the same philosophy: one concern, done well.


License

This project is licensed under the MIT License. See the LICENSE file for details.

© 2026 Ritesh Kumar Pal