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-agent-dock

v1.0.0

Published

OpenCode TUI plugin — a Claude-Code-style bottom panel of running subagents with inline keyboard navigation.

Readme

opencode-agent-dock

License: MIT OpenCode Plugin npm version GitHub repo

An OpenCode TUI plugin that adds a Claude-Code-style bottom panel of your running subagents — visible at a glance under the prompt, with inline keyboard navigation to browse them collapsed and open any one.

Subagents normally only surface inline in the chat, and the chat scrolls away from where they were spawned. opencode-agent-dock keeps the active session's subagents pinned to the bottom of the screen, each with its status, elapsed time and token spend.

How it works

active session route
  ↓
resolve current session
  ├─ parent session → client.session.children() → keep the RUNNING ones
  └─ subagent session → pin the one currently in focus (panel stays up)
  ↓
app_bottom slot renders the roster:  ● title  elapsed · tokens
  ↓
navigation: keymap.intercept catches ↑/↓/Enter BEFORE the prompt textarea
            (the same mechanism opencode uses for copy-on-select), so while the
            dock is focused the prompt is "locked" and arrows move the cursor

Features

  • Persistent bottom panel — running subagents stay visible under the prompt (Claude-Code-style: plain rows, no panel chrome).
  • Per-subagent telemetry — status glyph, elapsed time and total token usage on every row.
  • Inline keyboard navigation — browse the list collapsed, Enter opens the selected subagent's session.
  • Stays visible inside a subagent — the focused subagent is highlighted; native ←/→ between siblings updates it live.
  • Self-cleaning — finished/cancelled subagents drop out of the panel automatically; it hides when there are none.
  • Escape stays nativeEsc is never hijacked, so it still cancels subagents.

Install

This is a TUI plugin, so it is configured in tui.json (not opencode.json):

// ~/.config/opencode/tui.json  (user)  or  .opencode/tui.json  (project)
{
  "$schema": "https://opencode.ai/tui.json",
  "plugin": ["opencode-agent-dock"]
}

Restart OpenCode after adding it.

Keybindings

| Key | Action | | --- | --- | | ctrl+x v  — or /subagents | Focus the dock (toggle) | | / | Previous / next subagent | | Enter | Open the selected subagent's session | | from the first row, or ctrl+x v again | Leave the dock | | Esc | (native) cancel subagents |

The toggle key (<leader>v) can be remapped in tui.json under the agent-dock.toggle command if you prefer a different one.

Why a toggle and not bare ? In the parent session the prompt textarea captures arrow keys, and a plugin cannot blur the host prompt. keymap.intercept runs before the textarea, so once the dock is focused the arrows are ours. itself is also the prompt's history key, which made it an unreliable trigger.

Architecture

Clean Architecture — dependencies point inward, the domain is pure, and the only place that knows about the opencode SDK / TUI API is the composition root + adapters.

src/
  domain.ts                       pure: Subagent, selection math, formatting (unit-tested)
  ports.ts                        SubagentStore, Logger contracts
  sdk.ts                          SDK Session/SessionStatus -> domain Subagent
  constants.ts                    plugin id, slot name, limits
  adapters/
    opencode-subagent-store.ts    SubagentStore via client.session.children + events
    opencode-logger.ts            Logger via client.app.log
  view/
    Dock.tsx                      Solid render into the app_bottom slot
  index.tsx                       composition root: slot + inline nav (intercept)

Develop

npm install
npm test        # vitest — domain unit tests
npm run typecheck

OpenCode runs on Bun and loads .ts/.tsx natively, so there is no build step for local file-plugin use:

{ "plugin": [["file:///absolute/path/to/opencode-agent-dock/src/index.tsx"]] }

License

MIT © Artem Bambalov