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

@mcd0luo/dsh-opencode-statusline

v0.3.0

Published

OpenCode Go statusline for dsh web: context usage, Go subscription usage, working directory

Readme

@mcd0luo/dsh-opencode-statusline

Claude Code style statusline for dsh web UI.

Shows a status block at the bottom of the web app's sidebar:

  • 目录 — current session's working directory
  • 上下文 — context-window usage bar (from dsh's contextPressure session projection)
  • Go 用量 — OpenCode Go subscription usage (rolling / weekly / monthly, colored bars + reset countdown)

screenshot

The Go usage is fetched server-side from the OpenCode Go API; the API key is read from the dsh credentials service (OPENCODE_API_KEY), never exposed to the browser.

Install

Requires dsh and an OpenCode Go subscription.

本包是 Celestea 系列成员,由基座 @mcd0luo/dsh-celestea 的 bundle 统一挂载 (基座补丁给每个成员预留带条件的挂载行,本包装进 profile 后下次启动自动启用)。 基座必须显式安装一次dsh plugin 只把直接依赖挂进 bundles):

# 1. 一次性:安装基座(设置中心 + 系列挂载点)
dsh plugin --profile web add @mcd0luo/dsh-celestea
# 2. 安装本包,重启后自动挂载
dsh plugin --profile web add @mcd0luo/dsh-opencode-statusline

0.3.0 之前的老版本需要手动两步:装依赖后在 ~/.dsh/profiles/web/cordis.patch.yml 添加 statusline 行(并手写 config); 0.3.0+ 不要再手写这行,否则 loader 会报 duplicate loader entry id

Store your Go API key with the credentials service (the web Models page writes it, or add OPENCODE_API_KEY: sk-... to ~/.dsh/.credentials.yaml).

Restart dsh web and hard-refresh the browser (Ctrl+Shift+R). The status block appears at the bottom of the sidebar (expand the sidebar if collapsed).

Configuration

0.3.0+ 的配置接入 Celestea 设置中心:设置 → Celestea → statusline(表单 编辑、实时生效、顶部显示"当前生效"——/api/statusline/status)。

| key | type | default | description | |---|---|---|---| | usageUrl | url | https://opencode.ai/zen/go/v1/usage | OpenCode Go usage endpoint | | apiKeyEnv | string | OPENCODE_API_KEY | credential name resolved through the dsh credentials service | | cacheTtlMs | int | 60000 | how long a usage response is cached server-side | | fetchTimeoutMs | int | 2500 | upstream request timeout |

Build

npm run build

lib/client.js (the browser bundle) is generated from src/client.js; lib/index.js (the host plugin) is copied from src/index.js.

Compatibility

Tested with @deepseek-ai/dsh 0.1.0-rc.6. The client registers into the sidebar.footer.action slot and reads the contextPressure session projection; both are internal dsh web contracts and may change in future releases.