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

@cytsai/dtp-agent-web

v1.9.1

Published

[![GitHub stars](https://img.shields.io/github/stars/btriapitsyn/dtp-agent?style=flat&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMiIgaGVpZ2h0PSIzMiIgZmlsbD0iI2YxZWNlYyIgdmlld0JveD0iMCAwIDI1NiAy

Readme

@dtp-agent/web

GitHub stars GitHub release Discord

Run OpenCode in your browser. Install the CLI, open localhost:3000, done. Works on desktop browsers, tablets, and phones as a PWA.

Full project overview, screenshots, and all features: github.com/btriapitsyn/dtp-agent

Install

curl -fsSL https://raw.githubusercontent.com/btriapitsyn/dtp-agent/main/scripts/install.sh | bash

Or install manually: bun add -g @dtp-agent/web (or npm, pnpm, yarn).

Prerequisites: OpenCode CLI installed, Node.js 20+.

Usage

dtp-agent                          # Start on port 3000
dtp-agent --port 8080              # Custom port
dtp-agent --ui-password secret     # Password-protect UI
dtp-agent tunnel help              # Tunnel lifecycle commands
dtp-agent tunnel providers         # Show provider capabilities
dtp-agent tunnel profile add --provider cloudflare --mode managed-remote --name prod-main --hostname app.example.com --token <token>
dtp-agent tunnel start --profile prod-main
dtp-agent tunnel start --provider cloudflare --mode quick --qr
dtp-agent tunnel start --provider cloudflare --mode managed-local --config ~/.cloudflared/config.yml
dtp-agent tunnel status --all      # Show tunnel state across instances
dtp-agent tunnel stop --port 3000  # Stop tunnel only (server stays running)
dtp-agent logs                     # Follow latest instance logs
OPENCODE_PORT=4096 OPENCODE_SKIP_START=true dtp-agent                    # Connect to external OpenCode server
OPENCODE_HOST=https://myhost:4096 OPENCODE_SKIP_START=true dtp-agent  # Connect via custom host/HTTPS
dtp-agent stop                     # Stop server
dtp-agent update                   # Update to latest version

Tunnel behavior notes

  • One active tunnel per running DTP Agent instance (port).
  • Starting a different tunnel mode/provider on the same instance replaces the active tunnel.
  • Replacing or stopping a tunnel revokes existing connect links and invalidates remote tunnel sessions.
  • Connect links are one-time tokens; generating a new link revokes the previous unused link.
OPENCODE_PORT=4096 OPENCODE_SKIP_START=true dtp-agent
OPENCODE_HOST=https://myhost:4096 OPENCODE_SKIP_START=true dtp-agent

| Variable | Description | |----------|-------------| | OPENCODE_HOST | Full base URL of external server (overrides OPENCODE_PORT) | | OPENCODE_PORT | Port of external server | | OPENCODE_SKIP_START | Skip starting embedded OpenCode server | | DTP_AGENT_OPENCODE_HOSTNAME | Bind hostname for managed OpenCode server (default: 127.0.0.1, use 0.0.0.0 for LAN/remote access — trusted networks only) |

DTP_AGENT_OPENCODE_HOSTNAME=0.0.0.0 dtp-agent --port 3000

Security note: binding to 0.0.0.0 exposes the server on all network interfaces — use only on trusted networks and protect with firewall rules or --ui-password.

Optional env vars:

environment:
  UI_PASSWORD: your_secure_password
  DTP_AGENT_TUNNEL_MODE: quick # quick | managed-remote | managed-local
  DTP_AGENT_TUNNEL_PROVIDER: cloudflare

For managed-remote mode, also set:

environment:
  DTP_AGENT_TUNNEL_MODE: managed-remote
  DTP_AGENT_TUNNEL_HOSTNAME: app.example.com
  DTP_AGENT_TUNNEL_TOKEN: <token>

For managed-local mode, you can set:

environment:
  DTP_AGENT_TUNNEL_MODE: managed-local
  DTP_AGENT_TUNNEL_CONFIG: /home/dtp-agent/.cloudflared/config.yml

Managed-local path note: DTP_AGENT_TUNNEL_CONFIG must use a container path under /home/dtp-agent/.... If the config file references credentials-file, ensure that JSON path is also mounted and reachable inside the container.

Data directory: mount data/ for persistent storage. Ensure permissions:

mkdir -p data/dtp-agent data/opencode/share data/opencode/config data/ssh
chown -R 1000:1000 data/
dtp-agent             # Runs in background by default
dtp-agent stop        # Stop background server

Use --foreground to keep the CLI process alive so systemd (or any other process manager) can track and restart it. Combine with OPENCODE_HOST to connect to an OpenCode instance running as a separate service.

~/.config/systemd/user/opencode.service

[Unit]
Description=OpenCode Server

[Service]
Type=simple
ExecStart=opencode serve --port 4095
Environment="PATH=/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:/home/YOU/.local/bin:/home/YOU/.npm-global/bin:/usr/local/bin:/usr/bin:/bin"
Environment=SSH_AUTH_SOCK=%t/ssh-agent.socket
Restart=on-failure
RestartSec=5

[Install]
WantedBy=default.target

Why set PATH and SSH_AUTH_SOCK? systemd user services start with a minimal environment — no shell profile is sourced. Without an explicit PATH, OpenCode won't find tools installed via Homebrew, npm, or ~/.local/bin. Without SSH_AUTH_SOCK, git operations over SSH (push, pull, clone) will fail. %t expands to $XDG_RUNTIME_DIR (e.g. /run/user/1000), where most SSH agents write their socket.

~/.config/systemd/user/dtp-agent.service

[Unit]
Description=DTP Agent Web Server
After=opencode.service

[Service]
Type=simple
ExecStart=dtp-agent serve --port 3000 --host 0.0.0.0 --ui-password your-password --foreground
Environment="OPENCODE_HOST=http://localhost:4095"
Environment="OPENCODE_SKIP_START=true"
Restart=on-failure
RestartSec=5

[Install]
WantedBy=default.target
systemctl --user daemon-reload
systemctl --user enable --now opencode dtp-agent

--host 0.0.0.0 is required to listen on all interfaces (the default is 127.0.0.1). Use --host <ip> or DTP_AGENT_HOST=<ip> to bind to a specific interface instead.

What makes the web version special

  • Remote access - Cloudflare tunnel with QR onboarding. Scan from your phone, start coding.

  • Mobile-first PWA - optimized chat controls, keyboard-safe layouts, drag-to-reorder projects

  • Background notifications - know when your agent finishes, even from another tab

  • Self-update - update and restart from the UI, server settings stay intact

  • Cross-tab tracking - session activity stays in sync across browser tabs

  • Cloudflare tunnel access with quick, managed-remote, and managed-local modes

  • One-scan onboarding with tunnel QR + password URL helpers

  • Mobile-first experience: optimized chat controls, keyboard-safe layouts, and attachment-friendly UI

  • Background notifications plus reliable cross-tab session activity tracking

  • Built-in self-update + restart flow that keeps your server settings intact

License

MIT