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-tab-status

v1.1.3

Published

Show OpenCode running status (status, model, tool, usage) in the Windows Terminal tab title via OSC escape sequences. Zero dependencies.

Readme

opencode-tab-status

Show OpenCode running status in the terminal tab title (Windows Terminal / ConEmu / Tabby / VS Code integrated terminal) via OSC 0 escape sequences.

Pure OpenCode plugin — zero dependencies, zero companion process, zero wrapper. Drop it in (or add one line to opencode.json) and the tab title updates live as OpenCode works.

Status shown

Tab title layout (status first, then task, then details):

<状态图标> · <标题> · <模型> · [<工具>] · <用量>

By default the status is shown as icon only (e.g. ✅, 💭) to save tab space — no "完成/思考" text. Set STATUS_TAB_ICON_ONLY=0 to show the labels.

| Icon | Meaning | When | |------|--------------------|------| | 🌱 | 空闲 (fresh) | just opened, no session yet | | 💭 | 思考 (thinking) | model is generating | | 🔧 | 工具 (tool) | running a tool (name shown) | | ✅ | 完成 (done) | turn finished — you can type again | | ⏳ | 等待 (waiting) | paused, needs your input (permission / ask) | | ⚠️ | 错误 (error) | session error | | 🗜️ | 压缩 (compacting) | session compaction |

Switching to an existing session shows its title + model (✅) instead of a blank idle. A transient idle between sub-steps (e.g. right after a tool like Edit/Wrote) does not flash "完成" — only a true end-of-turn does.

Install

Via npm (recommended)

Add the package to your opencode.json:

{
  "plugin": ["opencode-tab-status"]
}

OpenCode installs it automatically on next start (via Bun). That's it.

Local (no npm)

Copy the plugin entry into your plugins directory:

# global (all projects)
cp plugins/opencode-tab-status.js ~/.config/opencode/plugins/

# or per-project
cp plugins/opencode-tab-status.js .opencode/plugins/

Then just run opencode.

Configuration

All configuration is via environment variables (zero-config by default):

| Variable | Values | Default | Effect | |----------|--------|---------|--------| | STATUS_TAB_LANG | zh | en | zh | status label language | | STATUS_TAB_ICON_ONLY | 0 | 1 (on) | icon-only status (default). Set 0 to also show 完成/思考 text | | STATUS_TAB_NO_EMOJI | 1 | off | use plain text instead of emoji icons | | STATUS_TAB_FIELDS | status,title,model,tool,usage | all | field order / which to show | | STATUS_TAB_NOTIFY | 1 | off | ring the terminal bell on done/error (error also flashes) |

Example (PowerShell profile):

$env:STATUS_TAB_NOTIFY = "1"
$env:STATUS_TAB_LANG = "en"

Notifications

When STATUS_TAB_NOTIFY=1:

  • Turn finished (✅完成) → terminal bell (BEL).
  • Error (⚠️错误) → terminal bell and a brief reverse-video flash.

This is zero-dependency and cross-platform (Windows Terminal honors the bell when "Bell notification" is enabled). For native OS toast notifications, use the OpenCode desktop app, which sends them automatically.

Development & tests

git clone https://github.com/xwh5/opencode-tab-status.git
cd opencode-tab-status
npm test          # runs node --test on the pure state machine

The status logic lives in src/status.js (pure, side-effect-free) and is covered by test/status.test.mjs. The plugin entrypoint (plugins/opencode-tab-status.js) inlines the same logic so it loads with no relative-import fragility, and wraps it with OSC output + notifications.

License

MIT