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-sandbox-win

v0.5.1

Published

OpenCode plugin that sandboxes agent commands using @anthropic-ai/sandbox-runtime (seatbelt on macOS, bubblewrap on Linux)

Readme

CI npm version License: MIT

opencode-sandbox-win

An OpenCode plugin that sandboxes agent-executed commands using @anthropic-ai/sandbox-runtime. Every bash tool invocation is wrapped with OS-level filesystem and network restrictions.

| Platform | Mechanism | Bash FS isolation | File-tool FS policy | Network isolation | |----------|-----------|:-----------------:|:-------------------:|:-----------------:| | macOS | sandbox-exec (Seatbelt) | Yes | Yes | Yes | | Linux | bubblewrap (namespaces) | Yes | Yes | Yes | | Windows | srt-win (WFP) | No | Yes | Yes |

Install

// opencode.json
{
  "plugin": ["opencode-sandbox-win"]
}

Linux prerequisites

1. Install bubblewrap:

# Debian/Ubuntu
sudo apt install bubblewrap

# Fedora
sudo dnf install bubblewrap

# Arch
sudo pacman -S bubblewrap

2. Ubuntu 24.04+ (AppArmor fix):

sudo apt install apparmor-profiles
sudo ln -s /etc/apparmor.d/bwrap-userns-restrict /etc/apparmor.d/force-complain/bwrap-userns-restrict
sudo apparmor_parser -r /etc/apparmor.d/bwrap-userns-restrict

Verify with: bwrap --ro-bind / / --dev /dev --proc /proc -- echo "sandbox works"

Windows prerequisites

1. Install srt-win:

cargo install --git https://github.com/LLukas22/sandbox-runtime.git --branch elevation srt-win

2. Set SRT_WIN_PATH:

$env:SRT_WIN_PATH = (Get-Command srt-win).Source
[System.Environment]::SetEnvironmentVariable("SRT_WIN_PATH", $env:SRT_WIN_PATH, "User")

3. Install the network sandbox:

srt-win install --name sandbox-runtime-net

Log out and back in after installing.

What it does

  • Write protection — commands can only write to the project directory and temp. Everything else is read-only.
  • Credential protection — access to ~/.ssh, ~/.aws/credentials, ~/.gnupg, etc. is blocked.
  • Network allowlist — only approved domains (npm, PyPI, GitHub, etc.) are reachable.

If anything goes wrong (sandbox init fails, wrapping fails), commands run normally. The plugin never breaks your workflow.

Default restrictions

| Deny-read path | Linux/macOS | Windows | |----------------|:-----------:|:-------:| | ~/.ssh, ~/.aws/credentials, ~/.azure | Yes | Yes | | ~/.kube, ~/.docker/config.json | Yes | Yes | | ~/.npmrc, ~/.netrc, ~/.env, ~/.gnupg | Yes | Yes | | ~/.config/gcloud, ~/.config/gh | Yes | — | | %APPDATA%\gnupg, %APPDATA%\gcloud, %APPDATA%\GitHub CLI | — | Yes |

Allow-write: project directory, worktree, system temp.

Network allow-only: registry.npmjs.org, pypi.org, crates.io, github.com, gitlab.com, bitbucket.org, api.openai.com, api.anthropic.com, *.googleapis.com (and their wildcards).

Configuration

The plugin uses ~/.srt-settings.json as its config file (the same path used by @anthropic-ai/sandbox-runtime). On first run it creates the file with all defaults written out so you can edit them.

The OPENCODE_SANDBOX_CONFIG env var (JSON string) overrides the file. See the sandbox-runtime configuration docs for the full schema.

Disable

OPENCODE_DISABLE_SANDBOX=1 opencode

Or set "disabled": true in the config file.

Contributing

See CONTRIBUTING.md for development setup, architecture, and guidelines.

Related