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-vibeguard

v0.1.0

Published

OpenCode 插件:参考 VibeGuard 的占位符格式(__VG_...__)在发送给 LLM 前脱敏、在响应完成后自动还原、在工具执行前还原参数

Readme

English | 中文

npm downloads license node

opencode-vibeguard

An OpenCode plugin that:

  • Replaces configured sensitive strings with placeholders before requests are sent to the LLM provider (the provider never sees plaintext)
  • Restores placeholders back to the original text after the model output completes (more natural local display/persistence)
  • Restores placeholders before tool execution (e.g. bash / write / edit) so local tools run with real values

Note: OpenCode tool calls are stored in the DB with the real executed args/output. Before each request, this plugin also redacts historical tool inputs/outputs to prevent plaintext from being sent upstream in later turns.

Placeholder format (aligned with VibeGuard):

  • Prefix: __VG_
  • Shape: __VG_<CATEGORY>_<hash12>__ or __VG_<CATEGORY>_<hash12>_<N>__
  • hash12 is the first 12 hex chars of HMAC-SHA256(session-random secret, original), stable within a session and irreversible to the provider

Install / Use (local dev)

  1. Put this plugin directory in your project (e.g. ./opencode-vibeguard/).
  2. Load it in your OpenCode config:
{
  "$schema": "https://opencode.ai/config.json",
  "plugin": ["file://./opencode-vibeguard/src/index.js"]
}
  1. Put vibeguard.config.json in your project root (copy from vibeguard.config.json.example).

Safety note: to avoid unexpected modifications, the plugin becomes a no-op if the config file is missing or enabled=false.

Install / Use (npm)

After publishing to npm, reference the package name in opencode.json:

{
  "$schema": "https://opencode.ai/config.json",
  "plugin": ["opencode-vibeguard"]
}

Configuration

Config lookup order (first match wins):

  1. Path specified by env var OPENCODE_VIBEGUARD_CONFIG
  2. Project root: ./vibeguard.config.json
  3. Project .opencode dir: ./.opencode/vibeguard.config.json
  4. Global dir: ~/.config/opencode/vibeguard.config.json

See vibeguard.config.json.example for an example.

Tests

cd opencode-vibeguard
npm test

Debug

Enable debug logs (will not print any plaintext secrets; only config path and replace counts):

OPENCODE_VIBEGUARD_DEBUG=1 opencode .

Or set in vibeguard.config.json:

{ "debug": true }

Known limitations

  • During streaming (text-delta) the placeholder may briefly appear; it will be restored at text-end.