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-workspaces

v0.2.1

Published

TUI workspace management plugin for OpenCode — switch between git worktrees in-session

Readme

opencode-workspaces

TUI workspace management for OpenCode — switch between git worktrees without leaving your terminal.

npm CI License: MIT

What it does

opencode-workspaces brings the desktop app's workspace sidebar to the OpenCode TUI. It lets you:

  • View all your git worktrees from any TUI screen
  • Create new sandboxes (git worktrees on new branches) without leaving the TUI
  • Switch between workspaces in-session — sessions stay in the current tab
  • Scope sessions to a workspace so tool calls run in the right directory
  • Rename, reset, and delete sandbox workspaces with keyboard-driven dialogs
  • Browse sessions across workspaces with a filterable picker

Installation

Add to ~/.config/opencode/tui.json:

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

Or with opencode plugin add:

opencode plugin add opencode-workspaces

Usage

Enable workspaces

Workspaces are opt-in. Press ctrl+p to open the command palette and search for "Enable workspaces", or type /ws in any prompt.

Slash commands

| Command | Alias | Action | |---------|-------|--------| | /ws | /workspace | Open workspace menu (sub-picker) | | /ws-new | /wsn | Create a new workspace | | /ws-switch | /wss | Switch to a different workspace | | /ws-session | /wsc | New session in current workspace | | /ws-sessions | /wsl | Browse sessions across workspaces | | /workspaces | /wsm | Full-screen workspace manager |

Keyboard shortcuts (in the workspace manager)

| Key | Action | |-----|--------| | j / | Select next workspace | | k / | Select previous workspace | | n | New workspace | | r | Rename selected workspace | | R | Reset selected workspace to default branch | | d | Delete selected workspace | | Esc | Go back to home |

Home screen

When workspaces are enabled, a dashboard appears below the prompt showing:

  • A list of your workspaces with session counts and status indicators
  • Clickable actions: + new, ⎇ switch, ≡ manage
  • A badge showing the currently active workspace

Sidebar (in session view)

The sidebar shows all workspaces with session counts. The workspace that owns the current session is highlighted with a prefix.

Configuration

Workspaces uses persistent KV storage (namespaced under workspace_tui:):

| Key | Type | Description | |-----|------|-------------| | workspace_tui:enabled | boolean | Whether workspaces feature is active | | workspace_tui:current | string | Currently selected workspace ID | | workspace_tui:names | object | Custom display names per workspace ID |

Requirements

  • OpenCode ≥ 1.0.0
  • Git repository with worktree support

How workspace switching works

When you switch workspaces, sessions created in that workspace are automatically scoped to its directory. The backend routes all session tool calls (file reads, shell commands, etc.) through the workspace's git worktree. Sessions remember their workspace — you don't need to re-select after reopening.

For new sessions, if the current workspace is a sandbox, createSession passes workspaceID so the server auto-routes all operations through that worktree.

Development

git clone https://github.com/stephengolub/opencode-workspaces
cd opencode-workspaces
npm install
npm run lint      # type check
npm test          # run 82 tests
npm run build     # emit dist/

To use the local plugin in your TUI:

{
  "plugin": ["/path/to/opencode-workspaces/src/index.tsx"]
}

License

MIT © Stephen Golub