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-shell-tasks

v0.1.1

Published

Detached shell jobs with task management and notifications for OpenCode

Readme

OpenCode Background Tasks

An OpenCode plugin for Claude Code-style background shell jobs. It lets the Agent start a long command without blocking the current turn, continue other work, inspect status and logs, stop a task, and show a TUI toast when the task finishes.

Features

  • Detached shell commands that return a task ID immediately
  • Project-scoped task metadata persisted outside the repository
  • Combined stdout/stderr logs with bounded tail reads
  • Status and exit-code reconciliation after an OpenCode restart
  • Graceful or forced process-group cancellation
  • Completion and failure toasts in a connected OpenCode TUI
  • A native /tasks TUI panel registered automatically by the plugin
  • Automatic Agent guidance to route long-running shell work to background_bash

Install From npm

Add the published package to the server plugin list in opencode.json:

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

Add the same package name to the native TUI plugin list in ~/.config/opencode/tui.json:

{
  "plugin": ["opencode-shell-tasks"]
}

OpenCode installs npm plugins automatically into its cache. Quit and restart OpenCode after changing either configuration file.

Install From This Checkout

npm install
npm run build

Add the package directory to the server plugin list in opencode.json:

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

Use an absolute file:// URL to this package directory when loading it from a different project. Do not point at dist/plugin.js: the directory lets OpenCode resolve both the server and native TUI entrypoints.

Add the same directory to the native TUI list in ~/.config/opencode/tui.json:

{
  "plugin": ["file:///absolute/path/to/opencode-shell-tasks"]
}

Quit and restart OpenCode after changing either configuration file.

Usage

Ask naturally:

Run npm test in the background and keep working on the README.

The Agent can call these tools:

| Tool | Purpose | |---|---| | background_bash | Start a detached command. | | background_tasks | List running or finished tasks. | | background_output | Tail a task's combined output. | | background_kill | Send SIGTERM or SIGKILL to the task process group. |

Run /tasks to open the native shell-details panel immediately. It does not call the model. The normal footer shows 1 shell · ← for agents while a shell is active.

The plugin also adds routing guidance to the Agent: tests, builds, installs, downloads, sleeps, watch servers, and other commands likely to take more than a few seconds use background_bash automatically. Quick or interactive commands continue to use bash.

Panel controls:

| Key | Action | |---|---| | j / k or arrow keys | Switch between shells. | | x | Stop the selected shell. | | X | Force-stop the selected task. | | r | Refresh task state. | | / Esc / Enter / Space | Close the details panel. |

Task state defaults to:

~/.local/share/opencode/background-tasks/<project-hash>/

Set OPENCODE_BACKGROUND_TASKS_DIR to override the storage root.

Native TUI Runtime

The server and TUI entrypoints use OpenCode's native @opencode-ai/plugin/tui runtime. This is currently a development/experimental OpenCode API, so pin OpenCode if you depend on the panel behavior. The package deliberately keeps the server tools separate from the TUI entrypoint so the task list remains usable by other clients. The TUI build uses Solid's universal transform; do not replace it with TypeScript's react-jsx transform.

Development

npm run check

The process wrapper writes an exit-code sidecar before exiting. This allows the plugin to recover the final status after a restart even though the detached process is no longer owned by the restarted OpenCode server.