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

v0.13.0

Published

Automation daemon for OpenCode - polls for work and spawns sessions

Readme

opencode-pilot

Automation daemon for OpenCode - polls for work and spawns sessions.

Note: This is a community project and is not built by or affiliated with the OpenCode team.

Features

  • Polling automation - Automatically start sessions from GitHub issues, Linear tickets, etc.
  • Readiness evaluation - Check labels, dependencies, and priority before starting work
  • Template-based prompts - Customize prompts with placeholders for issue data
  • Built-in presets - Common patterns like "my GitHub issues" work out of the box

Installation

npm install -g opencode-pilot

Quick Start

  1. Create config - Copy examples/config.yaml to ~/.config/opencode/pilot/config.yaml and customize

  2. Create templates - Add prompt templates to ~/.config/opencode/pilot/templates/

  3. Enable the plugin - Add to your opencode.json:

    {
      "plugin": ["opencode-pilot"]
    }

    The daemon will auto-start when OpenCode launches.

    Or start manually:

    opencode-pilot start

Configuration

See examples/config.yaml for a complete example with all options.

Key Sections

  • server_port - Preferred OpenCode server port (e.g., 4096). When multiple OpenCode instances are running, pilot attaches sessions to this port.
  • defaults - Default values applied to all sources
  • sources - What to poll (presets, shorthand, or full config)
  • tools - Field mappings to normalize different MCP APIs
  • repos - Repository paths and settings (use YAML anchors to share config)

Source Syntax

Three ways to configure sources, from simplest to most flexible:

  1. Presets - Built-in definitions for common patterns (github/my-issues, github/review-requests, etc.)
  2. GitHub shorthand - Simple github: "query" syntax for custom GitHub searches
  3. Full syntax - Complete control with tool, args, and item for any MCP source

Available Presets

  • github/my-issues - Issues assigned to me
  • github/review-requests - PRs needing my review
  • github/my-prs-feedback - My PRs with change requests
  • linear/my-issues - Linear tickets (requires teamId, assigneeId)

Prompt Templates

Create prompt templates as markdown files in ~/.config/opencode/pilot/templates/. Templates support placeholders like {title}, {body}, {number}, {html_url}, etc.

CLI Commands

opencode-pilot start              # Start the service (foreground)
opencode-pilot status             # Check status
opencode-pilot config             # Validate and show config
opencode-pilot clear              # Show state summary
opencode-pilot clear --all        # Clear all processed state
opencode-pilot clear --expired    # Clear expired entries (uses configured TTL)
opencode-pilot clear --source X   # Clear entries for source X
opencode-pilot clear --item ID    # Clear specific item
opencode-pilot test-source NAME   # Test a source
opencode-pilot test-mapping MCP   # Test field mappings

How It Works

  1. Poll sources - Periodically fetch items from configured MCP tools (GitHub, Linear, etc.)
  2. Evaluate readiness - Check labels, dependencies, and calculate priority
  3. Spawn sessions - Start opencode run with the appropriate prompt template
  4. Track state - Remember which items have been processed

Known Issues

Sessions attached to global server run in wrong directory

When using server_port to attach sessions to a global OpenCode server (e.g., OpenCode Desktop with worktree="/"), sessions are created in the server's working directory (typically home) instead of the project directory. This means:

  • File tools resolve paths relative to home, not the project
  • The agent sees the wrong Working directory in system prompt
  • Git operations may target the wrong repository

Workaround: Don't set server_port in your config. Sessions will run in the correct directory but won't appear in OpenCode Desktop.

Upstream issue: anomalyco/opencode#7376

Working directory doesn't switch when templates create worktrees/devcontainers

When a template instructs the agent to create a git worktree or switch to a devcontainer, OpenCode's internal working directory context (Instance.directory) doesn't update. This means:

  • The "Session changes" panel shows diffs from the original directory
  • File tools may resolve paths relative to the wrong location
  • The agent works in the new directory, but OpenCode doesn't follow

Workaround: Start OpenCode directly in the target directory, or use separate terminal sessions.

Upstream issue: anomalyco/opencode#6697

Related: opencode-devcontainers#103

Related

License

MIT