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

pocketpilot

v0.1.0

Published

Control any opencode session from your phone: scan a QR, send prompts, watch answers live, approve permissions, and get push alerts.

Readme

Pocketpilot

Control any opencode session from your phone. Scan a QR code, send prompts, watch answers stream in live, approve permission requests, and get push alerts when the agent finishes or needs you.

No app install — it's a PWA served directly by the plugin. Everything runs on your machine; your phone talks to opencode over your own network.

Features

  • QR pairing — type /remote in the opencode TUI (or run qr.sh) and scan with your phone camera
  • Full session control — list sessions, create new ones, send prompts, abort runs
  • Live answers — responses stream to your phone in real time (SSE), with an accurate busy indicator
  • Permission approvals — approve/reject tool permission requests (Once / Always / Reject) from the phone
  • Alerts — web push notifications on session.idle (agent finished), permission requests, and session errors
  • Works with every opencode instance — the plugin auto-starts with each one; the TUI and your phone share the same session state
  • Secure by default — 48-hex random token, timing-safe comparison, all API routes gated; token lives only on your machine and in the QR

Install

Option A — npm plugin (one line)

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

{
  "plugin": ["pocketpilot"]
}

Restart opencode. This installs the phone server + PWA + alerts.

For the instant /remote QR command in the TUI, also add to ~/.config/opencode/tui.json:

{
  "$schema": "https://opencode.ai/tui.json",
  "plugin": ["pocketpilot/tui"]
}

Option B — install script

git clone https://github.com/AnkitPorwal04/pocketpilot.git
cd pocketpilot
./install.sh

Copies the plugins into ~/.config/opencode/ and wires up tui.json for you.

Usage

  1. Restart opencode (any project).
  2. Type /remote (alias /qr) in the TUI — a QR dialog appears instantly.
  3. Scan it with your phone camera and open the link.
  4. You're in: pick a session, prompt it, watch the answer arrive.

Other ways to connect:

  • ~/.config/opencode/remote-control/qr.sh — opens the QR page in your browser
  • ~/.config/opencode/remote-control/last-url.txt — plain-text connect URL + ASCII QR

Alerts / push notifications

In-app alerts work out of the box over your LAN.

Browser push notifications (screen-off alerts) require HTTPS. Install cloudflared and the plugin automatically opens a tunnel, upgrades the QR to an HTTPS URL, and enables push — plus you can then control sessions from anywhere, not just your WiFi:

brew install cloudflared   # macOS

Then tap the bell icon on the phone UI to subscribe.

How it works

  • A tiny HTTP server (Node http, ports 7777–7787) starts inside each opencode process via the plugin API
  • It proxies to opencode's own server API (prompt_async, messages, permissions, /event SSE)
  • The phone UI is a single embedded PWA — dark theme, chat bubbles, tool chips, typing indicator
  • State (token, VAPID keys, push subscriptions) lives in ~/.config/opencode/remote-control/state.json

Architecture

flowchart LR
    Phone["Phone (PWA)"] -->|"prompts + approvals"| Plugin["Plugin server<br/>port 7777"]
    Plugin -->|"live answers (SSE) + push alerts"| Phone
    Plugin <--> Core["opencode"]

Sending a prompt

sequenceDiagram
    participant Phone
    participant Plugin
    participant opencode

    Phone->>Plugin: send prompt
    Plugin->>opencode: run agent
    opencode-->>Phone: answer streams live
    opencode-->>Phone: push alert when done

Security

  • Every API route requires the token (?key= or Bearer), compared with SHA-256 + timingSafeEqual
  • The QR code is the password — only show it to yourself
  • To rotate the token: delete ~/.config/opencode/remote-control/state.json and restart opencode
  • Without cloudflared, traffic is plain HTTP on your LAN — fine at home, use the tunnel on untrusted networks

Troubleshooting

| Symptom | Fix | | --- | --- | | Phone can't connect | Phone and computer must be on the same WiFi (or use cloudflared) | | 401 unauthorized | Re-scan the QR; token may have rotated | | /remote not found | Restart opencode; check tui.json has the plugin entry | | No push notifications | Push needs HTTPS — install cloudflared and re-subscribe via the bell | | Port already in use | The plugin tries 7777–7787 automatically; each instance gets its own port |

License

MIT