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

v0.1.1

Published

React component library + standalone SPA for the code-server-ops admin dashboard.

Readme

code-server-ops-ui

React 19 + Tailwind v4 + shadcn component library and standalone SPA for the code-server-ops admin dashboard. Dark-mode default, zinc palette.

Extension Folder Explorer

What's in the box

  • <Dashboard> — four tabs, login gate, configurable base URL. Drop-in replacement when you want the full experience.
  • Individual panels<TerminalsPanel>, <ExtensionsPanel>, <AiProcessesPanel>, <MemoryTimelinePanel> when you want your own layout.
  • ApiClient / api / configureApi(url) — thin fetch wrapper, sessionStorage-based password helpers.

Every destructive action is gated by a Preview-before-commit modal listing the exact change. No confirm dialogs on buttons you didn't expect to click.

Install

npm install code-server-ops-ui

Peer deps: react@>=19, react-dom@>=19.

Use it

"use client"; // if you're on Next.js App Router
import { Dashboard } from "code-server-ops-ui";
import "code-server-ops-ui/styles.css";

// Option 1 — server-side proxy. Host app's auth (e.g. Better Auth, NextAuth)
// protects the proxy route. The agent password never reaches the browser.
export default function CodeServerOps() {
  return (
    <Dashboard
      skipAuth
      baseUrl="/api/infrastructure/code-server"
      title="code-server ops"
    />
  );
}

// Option 2 — direct connection to the agent. Library prompts for the
// CSOPS_PASSWORD on first load and caches in sessionStorage.
export default function CodeServerOps() {
  return <Dashboard baseUrl="https://code-server-ops.example.com" />;
}

Individual panels — if you want custom navigation:

import { TerminalsPanel, configureApi } from "code-server-ops-ui";
import "code-server-ops-ui/styles.css";

configureApi("/api/infrastructure/code-server"); // call once at app boot

function Page() {
  return (
    <main>
      <h1>My custom admin</h1>
      <TerminalsPanel />
    </main>
  );
}

Proxy route (Next.js App Router)

The recommended pattern keeps the agent password off the browser. Here's a complete catch-all proxy you can drop at app/api/infrastructure/code-server/[...path]/route.ts:

import { NextResponse, type NextRequest } from "next/server";

const AGENT_URL = process.env.CSOPS_AGENT_URL;
const AGENT_PASSWORD = process.env.CSOPS_AGENT_PASSWORD;
const auth = () => "Basic " + Buffer.from(`ops:${AGENT_PASSWORD ?? ""}`).toString("base64");

async function forward(req: NextRequest, path: string[], method: "GET" | "POST") {
  if (!AGENT_URL || !AGENT_PASSWORD) {
    return NextResponse.json({ error: "agent not configured" }, { status: 503 });
  }
  const target = `${AGENT_URL.replace(/\/$/, "")}/${path.map(encodeURIComponent).join("/")}${req.nextUrl.search}`;
  const init: RequestInit = {
    method,
    headers: { authorization: auth(), "content-type": "application/json" },
  };
  if (method === "POST") init.body = await req.text();
  const res = await fetch(target, init);
  return new NextResponse(await res.text(), {
    status: res.status,
    headers: { "content-type": res.headers.get("content-type") ?? "application/json" },
  });
}

export async function GET(req: NextRequest, ctx: { params: Promise<{ path: string[] }> }) {
  return forward(req, (await ctx.params).path ?? [], "GET");
}
export async function POST(req: NextRequest, ctx: { params: Promise<{ path: string[] }> }) {
  return forward(req, (await ctx.params).path ?? [], "POST");
}

License

MIT. See LICENSE.