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-pi-augment-plugin

v0.1.0

Published

OpenCode plugin that ports pi-augment style prompt enhancement through a command-driven workflow.

Readme

OpenCode Pi Augment Plugin

An OpenCode plugin that ports the core idea of pi-augment into a command-driven workflow for OpenCode.

Version 1 is intentionally scoped to a single command:

  • /augment

It does not attempt transparent prompt interception or automatic editor rewrites before send.

What it does

This plugin enhances raw user prompts into a more structured, execution-ready form.

Current behavior includes:

  • intent detection for common request types
  • rewrite mode selection (plain vs execution-contract)
  • structured prompt expansion for implementation, planning, bugfix, analysis, and documentation tasks
  • optional model-family and project-context hints

The plugin exposes that behavior through an OpenCode TUI command handler instead of trying to patch the editor input pipeline.

Install

1. Install dependencies

npm install

2. Build the plugin

npm run build

3. Make the plugin available to OpenCode

This repository is designed as a standalone plugin package. Load it using your OpenCode plugin workflow.

At a high level, OpenCode plugins are typically loaded from one of these paths:

  • .opencode/plugins/
  • OpenCode plugin configuration

Depending on your setup, that usually means either:

  1. linking the built plugin into an OpenCode plugin directory, or
  2. referencing the built package from your OpenCode config

Because OpenCode environments can differ, treat this repository as the plugin source package and connect it to your local OpenCode installation using the plugin-loading mechanism supported by your setup.

Usage

Once the plugin is loaded into OpenCode, use the command-oriented workflow:

/augment write release notes for the latest bugfixes

You can also invoke /augment with the prompt text supplied through command arguments if your OpenCode setup passes command payload fields separately.

The plugin will:

  1. detect the likely intent of the request
  2. choose a rewrite mode
  3. return an augmented prompt body

The current implementation is designed for command execution via tui.command.execute.

Example

Input:

/augment plan a plugin migration from pi to opencode

Expected outcome:

  • the command is recognized as /augment
  • the input prompt is extracted
  • the prompt is rewritten into a more structured result
  • the rewritten result is returned by the plugin command handler

Development

Build

npm run build

Typecheck

npm run typecheck

Lint

npm run lint

Limitations

Version 1 is deliberately conservative.

Included in v1

  • /augment command handling
  • reusable augmentation core
  • command-result-based prompt rewriting

Not included in v1

  • transparent pre-send prompt interception
  • automatic replacement of whatever is already in the editor
  • deep OpenCode core patches
  • richer TUI customization beyond command execution

These limitations are intentional because current planning evidence supports a command-triggered plugin path more strongly than an editor-interception path.

Repository layout

src/augment.ts   # reusable prompt augmentation logic
src/index.ts     # OpenCode-facing plugin command entrypoint
package.json     # package manifest and scripts

Status

This repository is currently focused on the first usable milestone:

  • greenfield plugin structure
  • reusable augment core
  • /augment command-only integration

If later OpenCode plugin APIs expose stronger input/editor hooks, a future version can expand beyond the current command-only model.