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-next-prompt

v0.1.0

Published

Predicts your next message after the assistant replies in OpenCode — accept it with the right arrow

Readme

opencode-next-prompt

Predicts your next message after the assistant replies and shows it at the prompt — accept it with a keypress (like Claude Code's "next message suggestion").

Requires OpenCode ≥ 2.0 (V2 plugin API).

Install

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

{
  "plugins": ["opencode-next-prompt"]
}

Restart opencode. The package and its dependencies are installed automatically.

TUI plugins are declared in cli.json's plugins array (the successor of tui.json's plugin array); the plugin array in opencode.json is for server plugins.

Usage

  • After each reply, a suggested next message appears at the input in gray
  • Press the accept key (→ by default) while the input is empty to fill it; with text in the input, the key keeps its normal cursor behavior
  • Typing hides the suggestion; clearing the input re-shows it

Config

{
  "plugins": [
    {
      "package": "opencode-next-prompt",
      "options": {
        "acceptKey": "right",
        "timeoutMs": 20000,
        "model": "my-provider/fast-model",
        "includeToolContext": false
      }
    }
  ]
}

| Key | Default | Description | |---|---|---| | acceptKey | right | Key to accept the suggestion (only effective while the input is empty) | | timeoutMs | 20000 | Per-prediction timeout; the timed-out call is aborted and retried once | | model | unset | Fast model for predictions as provider/model; a bare model id uses the session's provider. Defaults to the current session's model. Unknown providers/models are rejected with an error toast | | variant | auto | Model variant (reasoning effort) used for predictions. By default the lowest variant the model supports is picked automatically (e.g. low); models without variants are left untouched. Set it explicitly (e.g. "high") to override, or "default" to disable | | includeToolContext | false | Include summarized tool calls and outputs in the prediction context (more context, more tokens) |

The accept command is registered as opencode-next-prompt.accept, so it can be rebound in cli.json's keybinds.

How it works

After each reply, the plugin predicts your next input with a single tool-free text-generation call built from the recent conversation (the last few turns plus the original goal). No background session is created, no tools are ever available to the prediction, and the main conversation is never modified. The suggestion is written into the input placeholder, so what you see is exactly what gets accepted.

Each suggestion costs one extra model call. Failed or timed-out predictions are retried once. A suggestion disappears when you type, when you revert or compact the conversation, or when the session changes.

License

MIT