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

v1.1.0

Published

Adds context about ddev setup and improves command calling

Readme

opencode-ddev-plugin

DDEV Plugin for OpenCode - Detects DDEV availability and provides optional container execution guidance.

Features

  • Automatic DDEV Detection: Checks if DDEV is available using ddev describe -j for structured JSON output
  • Status-Aware Context Message: Announces running/stopped status with a clear ddev exec example
  • Optional Container Execution: Commands run on the host by default; use ddev exec when you need container context
  • Session and Compaction Prompts: Sends the context message on session creation and after compaction
  • Custom DDEV Logs Tool: Provides a ddev_logs tool for retrieving logs from DDEV services

Installation

Add to your opencode.json or ~/.config/opencode/opencode.json:

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

OpenCode auto-installs plugins on startup.

Update

Force update to latest:

rm -rf ~/.cache/opencode Then restart OpenCode.

Usage

Once installed, the plugin will:

  1. Detect DDEV availability and status on session creation and compaction
  2. Add a context message with a clear example for optional container execution
  3. Keep commands on the host by default (no automatic wrapping)
  4. Register ddev_logs when a DDEV project is detected

Manual Container Execution

If you need a command to run inside the container, execute it manually:

  • ddev exec --dir="/var/www/html" bash -c "composer install"

The --dir value in the context message reflects your current working directory mapped into the container.

DDEV Availability Check

The plugin checks DDEV status using ddev describe -j to determine if a project exists and whether it's running. Results are cached for 2 minutes when DDEV is running to avoid repeated checks. Stopped or unavailable states are not cached and will be re-checked on every bash command to detect when DDEV starts.

Agent Skill

The plugin ships with a bundled DDEV agent skill in skills/ddev/. It teaches the AI agent how to work with DDEV projects, including:

  • CLI syntactic sugar -- shortcut commands like ddev composer, ddev npm, ddev wp, ddev drush, ddev artisan, ddev console, etc.
  • Container execution -- when and how to use ddev exec --dir for targeting specific container paths
  • Subpath mapping -- resolving the correct container path when the agent runs from a subdirectory of a DDEV project (e.g., wp-content/plugins/my-plugin inside a WordPress site)

The skill includes a resolve-ddev-root.sh script that walks up the directory tree to find the DDEV project root and computes the matching container path. It is excluded from the npm package via .npmignore.

Custom Tools

The plugin provides custom tools that are registered when a DDEV project is detected:

ddev_logs Tool

Retrieve logs from DDEV services for debugging and monitoring.

Arguments:

  • service (optional): Service to get logs from (e.g., 'web', 'db'). Defaults to 'web'.
  • follow (optional): Follow logs in real-time (stream as they appear). Cannot be used with tail.
  • tail (optional): Number of lines to show from the end of logs. Defaults to 50 lines if not specified. Mutually exclusive with follow.
  • time (optional): Add timestamps to log output.

Default Behavior:

  • When neither follow nor tail is specified, returns the last 50 lines to prevent context pollution.
  • The 50-line default is conservative to keep responses concise while providing sufficient debugging context.

Examples:

// Get last 50 lines from web service (default)
ddev_logs()

// Get last 100 lines from database service
ddev_logs({ service: "db", tail: 100 })

// Follow web service logs in real-time with timestamps
ddev_logs({ follow: true, time: true })