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

@madsoftwaredev/opencode-direnv

v0.1.1

Published

OpenCode V2 plugin that applies direnv environments to each shell command.

Readme

@madsoftwaredev/opencode-direnv

opencode plugin add @madsoftwaredev/opencode-direnv

Loads the command's direnv environment through V2's shell.create.before hook. The active plugin ID is direnv.

Requires direnv on the OpenCode service's PATH and an approved .envrc:

cd /path/to/project
direnv allow

Each shell invocation runs direnv export json in its actual working directory. direnv handles parent-directory lookup, watched files, PATH changes, variable removal, and unloading an inherited environment from another project. Values are applied only to that shell invocation, never to the shared service's process.env. There is no plugin cache, so edits and approval changes take effect on the next command.

This covers commands using OpenCode's shell hook. Provider credentials, config environment substitutions, and MCP processes have separate lifecycles. A cd inside a shell command does not rerun the hook; select the command's workdir or use direnv exec /path/to/project command explicitly.

Loading errors are reported without including environment values or .envrc output. The plugin never approves an .envrc automatically. Loading has a 60-second timeout.

This plugin uses the V2 @opencode/plugin API. The older @simonwjackson/opencode-direnv package uses V1's plugin API and fails to load in V2.

Local tests

Requires Bun and direnv:

bun test ./packages/direnv/index.test.js

Tests use temporary projects and a separate direnv approval store.

License

MIT