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

v0.4.5

Published

OpenCode plugin for native ocwt worktree workflows

Downloads

799

Readme

opencode-ocwt

Standalone npm plugin for native ocwt workflows in OpenCode.

This repository builds opencode-ocwt, an installable OpenCode plugin package that is loaded through opencode.json without requiring a local .opencode/ runtime directory.

Goals

  • implement ocwt natively as an installable OpenCode npm plugin
  • keep worktree lifecycle safe and deterministic
  • preserve current branch, symlink, and session behavior
  • keep the codebase small, typed, and testable

Stack

  • pnpm for package management
  • TypeScript in strict mode
  • vitest for tests
  • oxlint for linting
  • prettier for formatting
  • zod for schemas and runtime validation

Layout

src/
  config/     Config loading and precedence helpers
  lib/        Shared domain logic and types
  plugin*.ts  Plugin entrypoint and injected command definitions
  tools/      Native ocwt tool entrypoints
tests/        Unit and integration tests

The code lives under src/. The published package entrypoint is src/plugin.ts, which injects commands and registers tools through the OpenCode plugin API.

Install

Add the plugin to your OpenCode config:

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

OpenCode installs npm plugins automatically with Bun at startup.

Scripts

pnpm install
pnpm clean
pnpm check
pnpm typecheck
pnpm lint
pnpm test
pnpm build
pnpm pack:dry-run
pnpm format:check

Release workflow

The repository now ships with GitHub Actions for CI, stable releases, and nightly prereleases.

  • CI runs on pushes and pull requests, executes pnpm check, and verifies the publishable tarball with npm pack --dry-run
  • .github/workflows/release.yml handles both stable and nightly publishing so npm trusted publishing only needs one workflow file
  • stable publishing runs when a GitHub release is published, verifies that the release tag matches package.json, and publishes to npm with provenance
  • nightly publishing runs from the same workflow on every push to main or manual dispatch, always checks out main, stamps a unique -nightly.<timestamp> version, publishes it to npm under the nightly dist-tag, and creates a GitHub prerelease

npm trusted publishing

Stable and nightly publishing are configured for npm trusted publishing with GitHub Actions.

Before the workflows can publish, configure an npm trusted publisher for this repository and this workflow file:

  • .github/workflows/release.yml

The workflows use id-token: write and publish with:

npm publish --provenance --access public

No long-lived NPM_TOKEN secret is required when trusted publishing is configured correctly.

The release workflow also avoids actions/setup-node token-auth registry configuration during publish, and upgrades npm in CI to meet npm's current trusted-publishing requirement (npm 11.5.1+).

Current status

The project now includes deterministic branch, path, git, session, config, and symlink helpers plus real ocwt_open, ocwt_close, and ocwt_list flows for the core worktree lifecycle. Commands are now injected from the plugin at runtime, and the package is structured for standalone npm distribution through OpenCode's plugin config. The implementation plan is documented in:

  • OPENCODE_NATIVE_OCWT_DESIGN.md
  • OPENCODE_NATIVE_OCWT_IMPLEMENTATION_PLAN.md

Engineering rules

  • keep tool entrypoints thin and move domain logic into src/lib/
  • return stable JSON envelopes from tool boundaries
  • fail closed for destructive worktree operations
  • prefer deterministic behavior over implicit heuristics
  • add tests alongside any branch, git, path, or symlink logic
  • harden edge cases before moving orchestration into tool entrypoints
  • keep config precedence explicit: tool input overrides config, config overrides defaults
  • back up conflicting files before replacing them with shared-state symlinks
  • keep the shipping surface plugin-first: npm package plus plugin config only

Runtime behavior

With the plugin loaded in OpenCode:

  • /wt-open creates or reuses the worktree and switches the TUI to the target session
  • /wt-build does the same and starts a planning prompt in the target session
  • /wt-open also starts planning when auto_plan is enabled in ~/.config/ocwt/config.json
  • session creation and planning use the live OpenCode SDK, and TUI switching is applied after tool completion so the next interaction lands in the target session