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

v1.0.0

Published

OpenCode plugin for persistent SSH connections via ControlMaster multiplexing

Readme

Bifrost

License: MIT TypeScript Bun

Persistent SSH connection plugin for OpenCode.

Bifrost maintains a single SSH connection using ControlMaster multiplexing, so every command reuses the same connection instead of reconnecting each time.

Bifrost Demo

Installation

1. Register the plugin

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

{
  "plugins": [
    "opencode-bifrost@latest"
  ]
}

2. Create the SSH config

Create ~/.config/opencode/bifrost.json:

{
  "host": "your-server-ip",
  "user": "root",
  "keyPath": "~/.ssh/id_rsa"
}

| Field | Required | Default | Description | |-------|----------|---------|-------------| | host | Yes | - | Server IP or hostname | | user | No | root | SSH username | | keyPath | Yes | - | Path to SSH private key | | port | No | 22 | SSH port |

Note: Password authentication is not supported. Use SSH keys only.

3. Restart OpenCode

The plugin is installed automatically on startup.

Usage

Once configured, the agent automatically uses Bifrost when you mention:

  • "server", "remote", "deploy", "production", "staging"
  • "check the server", "run on server", "server logs"

Available Tools

| Tool | Description | |------|-------------| | bifrost_connect | Establish SSH connection (called automatically) | | bifrost_exec | Run a command on the server | | bifrost_status | Check connection status | | bifrost_disconnect | Close the connection | | bifrost_upload | Upload a file to the server | | bifrost_download | Download a file from the server |

Example Prompts

"How's the server doing?"
"Show me the nginx logs"
"Restart the docker containers"
"Upload config.yaml to /etc/app/"
"What's using port 8080?"

How It Works

Bifrost uses SSH ControlMaster to maintain a persistent connection:

First command:  [Connect] -----> [Execute] -----> [Keep socket open]
Next commands:  [Reuse socket] -> [Execute] -----> [Still open]
Session ends:   [Auto-disconnect]

The control socket is stored at ~/.ssh/bifrost-control/.

Security

All inputs are validated before execution to prevent injection attacks:

  • Path traversal (../) blocked
  • Command injection (;, |, &, `, $()) blocked
  • Shell expansion (*, ?, ~, {}) blocked
  • Unicode bypass attempts detected and rejected
  • Null bytes and control characters rejected

Requirements

  • OpenCode with plugin support
  • SSH key-based authentication

Development

# Run tests
bun test

# Type check
bun run typecheck

# Build
bun run build

License

MIT