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-gbk-tools

v1.6.18

Published

Auto-encoding text tools plus GBK/GB18030 tools for OpenCode

Readme

opencode-gbk-tools

只保留 gbk-workspace 单文件工作流的 OpenCode 插件。

当前模式

  • 不再暴露 gbk_readgbk_writegbk_editgbk_search 等工具
  • 不再保留旧的 GBK 直接编辑模式
  • 只保留:
    • gbk-workspace-engine
    • /gbk-workspace-import
    • /gbk-workspace-export
    • workspace-status

工作方式

  1. 把当前要修改的单个 GBK 源文件导入 gbk-workspace/
  2. gbk-workspace/ 中按 UTF-8 普通文件编辑
  3. 执行导出,把工作区内容写回原始 GBK 源目录
  4. 如果工作区里新建了文件,也会自动在原始源目录创建对应文件

安装

项目安装:

npx opencode-gbk-tools setup --project

全局安装:

npx opencode-gbk-tools setup --global

命令

导入单个文件到工作区:

npx opencode-gbk-tools workspace-import <源文件> gbk-workspace --gbk

如果文件是 gb18030

npx opencode-gbk-tools workspace-import <源文件> gbk-workspace --gb18030

导出工作区到原始源目录:

npx opencode-gbk-tools workspace-export gbk-workspace

查看工作区状态;若目录不存在会自动创建空的 gbk-workspace/

npx opencode-gbk-tools workspace-status gbk-workspace

自动创建行为

  • workspace-status gbk-workspace 会自动创建空的 gbk-workspace/
  • workspace-import 会自动创建 gbk-workspace/
  • workspace-export 会自动创建原始源目录中缺失的目标目录和新文件

适用规则

  • 只导入当前要操作的那个文件,不做整目录导入
  • gbk-workspace/ 中新增的文件,导出时会自动写回原始源目录
  • gbk-workspace/ 只是 UTF-8 工作区,不是最终源文件位置

版本历史

| 版本 | 说明 | |------|------| | 1.6.18 | 增加文件读取效率规则:禁止每次只读 200 行,文件不超过 2000 行一次读完,超过则每次 2000 行连续分段 | | 1.6.17 | 修正 agent 模板中 npm 包名 opencode-gbk -> opencode-gbk-tools;增加效率指引:禁止导入前置的 where/which/版本检查等无意义步骤 | | 1.6.16 | 修正 dist/agents/gbk-workspace-engine.md 未从 src 重新构建导致旧版 agent 规则仍停留在提示用户手动导入的问题;ensure 构建产物与源码一致 | | 1.6.15 | gbk-workspace-engine agent 改为自主执行导入/导出:agent 有 bash 权限,工作区空时不再要求用户手动运行 | | 1.6.14 | 同步修正 gbk-workspace-engine agent 规则:如果用户通过命令进入流程,默认先相信 plugin 的前置自动导入结果并检查工作区 | | 1.6.13 | 在 plugin 层增加 command.execute.before 自动执行导入/导出 | | 1.6.12 | 回退到更适配 OpenCode 的 slash command 方案 | | 1.6.11 | 修正 slash command 的执行语义 | | 1.6.10 | 版本号提升,包含可直接执行的命令与自动同步 | | 1.6.9 | 版本号提升,包含 gbk-workspace 单文件工作流 | | 1.6.8 | 收敛为唯一的 gbk-workspace 单文件工作流 | | 1.6.7 | 删除旧工作流,只保留固定 gbk-workspace/ 方案 |