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

code-server-ops-agent

v0.1.1

Published

Sidecar agent for code-server-ops. REST endpoints over process and extension state, with Preview→Confirm mutations and optional bundled UI.

Readme

code-server-ops-agent

Fastify sidecar agent for code-server-ops. Runs alongside a self-hosted code-server container (shared PID namespace) and exposes a REST API over its terminals, extensions, AI processes, and extension-host memory.

Memory + OOM Timeline

Endpoints

Read (basic-auth gated):

| Method | Path | Returns | |---|---|---| | GET | /terminals | Shell-integration bash processes with age, RSS, ptyHost parent, cwd, attached/orphan status. | | GET | /extensions | Folder-on-disk vs extensions.json — orphan badges + multi-version peers. | | GET | /ai-processes | Claude Code / Copilot / Continue / Cline / Codex processes + conversation IDs. | | GET | /memory | Current ext-host RSS + 1h ring buffer @ 15s samples. | | GET | /oom-events | Parsed OOM-kill lines from journalctl (configurable window). |

Mutate (Preview→Confirm token pattern):

| Method | Path | Action | |---|---|---| | POST | /terminals/preview-kill/terminals/kill | SIGKILL by PID list or bulk (orphans older than N seconds). | | POST | /extensions/preview-gc/extensions/gc | rm -rf orphan extension folders (defaults to all orphans). | | POST | /ai-processes/preview-kill/ai-processes/kill | SIGTERM AI-process duplicates by PID list or duplicatesOnly. | | POST | /memory/preview-restart-ext-host/memory/restart-ext-host | SIGTERM the extension host; code-server respawns it. |

Every mutation requires a preview first. The server returns a 32-char hex token (60s TTL, single-use) and re-validates the plan at both preview and commit time — a stale tab cannot drive-by a destructive call.

Operator:

| Method | Path | Returns | |---|---|---| | GET | /health | { status: "ok" } — unauthenticated. | | GET | /metrics | Prometheus text format — csops_terminals_orphan_total, csops_extensions_orphan_bytes, csops_ai_processes_total{extension}, csops_oom_events_total, csops_ext_host_rss_bytes. Unauthenticated (protect via network ACL). |

Install (sidecar)

services:
  code-server-ops-agent:
    image: ghcr.io/barrymister/code-server-ops:0.1.0
    pid: "container:code-server"
    network_mode: "service:code-server"
    volumes:
      - /var/log/journal:/var/log/journal:ro
      - code-server-extensions:/home/coder/.local/share/code-server/extensions
    environment:
      CSOPS_PASSWORD: "${CSOPS_PASSWORD}"

See docs/INSTALL.md for sidecar + non-root CAP_SYS_PTRACE hardening + standalone systemd recipes.

Standalone npm install (no Docker):

# On the code-server host. The agent reads /proc and /var/log/journal natively.
export CSOPS_PASSWORD=$(openssl rand -hex 32)
npx -y [email protected]
# or pinned global:
npm install -g code-server-ops-agent

Environment

| Variable | Default | Notes | |---|---|---| | CSOPS_PASSWORD | (required) | Basic-auth password. | | CSOPS_PORT | 4242 | | | CSOPS_HOST | 0.0.0.0 | | | CSOPS_EXTENSIONS_DIR | /home/coder/.local/share/code-server/extensions | Scanned for orphan folders. | | CSOPS_UI_ROOT | auto-resolves | If set, serves a Vite SPA at /. | | CSOPS_PROC_DIR | /proc | Override for dev. | | CSOPS_LOG_LEVEL | info | |

License

MIT. See LICENSE.