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

dsh-kill-restart

v0.1.0

Published

One-click kill button for the DSH Web GUI – kill the server process so you can restart without taskkill.

Readme

dsh-kill-restart ☠

One-click kill button for the DSH Web GUI. Kill the server process instantly so you can restart DSH without taskkill or hunting for the PID.

How it works

  1. A small ☠ button appears at the bottom-right corner of the DSH Web GUI.
  2. Click it → confirm the dialog.
  3. The browser sends POST /api/kill-dsh.
  4. The server responds { "ok": true }, waits 200 ms so the browser receives the confirmation, then calls process.exit(0).
  5. The page displays a "server terminated — restart DSH" message.

Installation

From npm (recommended)

dsh plugin --profile <profile-name> add dsh-kill-restart

From GitHub

dsh plugin --profile <profile-name> add github:mozhi5795/dsh-kill-restart

Note: Git installs fetch sources, not built artifacts. You must either:

  • Use a tag that includes prebuilt lib/ files, or
  • Allow the prepare script in the profile's pnpm-workspace.yaml:
    allowBuilds:
      dsh-kill-restart: true

From a local checkout

# From the directory containing dsh-kill-restart
dsh plugin --profile <profile-name> add ./dsh-kill-restart

Usage

  1. Start DSH with the profile that includes this bundle.
  2. Open the Web GUI (http://127.0.0.1:3080 by default).
  3. Click the ☠ button at the bottom-right corner.
  4. Confirm the dialog.
  5. The server exits; restart DSH manually.

Project structure

dsh-kill-restart/
├── package.json          # Bundle manifest (dsh.bundle + dsh.client)
├── cordis.patch.yml      # Cordis patch layer — inserts the plugin row
├── README.md             # This file
├── .gitignore
└── lib/
    ├── index.js          # Server half — POST /api/kill-dsh route
    └── client.js         # Client half — ☠ button UI

Architecture

This is a DSH bundle — an installable npm package that ships a configuration layer.

| Concept | File | What it does | |---------|------|-------------| | Bundle manifest | package.json | Declares dsh.bundle.patch (the patch file) and dsh.client (client module injection) | | Patch layer | cordis.patch.yml | Inserted when a profile lists this bundle; adds the kill-dsh-restart plugin row | | Server plugin | lib/index.js | Injects webServer, registers POST /api/kill-dsh, calls process.exit(0) after the response | | Client plugin | lib/client.js | Injected into the browser via exports["./client"]; adds the floating ☠ button with click handler |

Loading order

Per the DSH plugin development docs, the effective configuration composes over an empty root by applying:

  1. Each bundle patch named in the profile's bundles list (in order)
  2. The profile's own cordis.patch.yml
  3. The home-level $DSH_HOME/cordis.patch.yml
  4. Each --patch <path> overlay

This bundle's patch (cordis.patch.yml) is applied at step 1 when the profile lists dsh-kill-restart.

Publishing to npm

This package is ready to publish to npm. To publish:

# Build (if needed — currently plain JS, no build step)
# Login to npm
npm login
# Publish
npm publish

After publishing, users can install it with:

dsh plugin --profile <profile-name> add dsh-kill-restart

Development

This is a plain JavaScript (ESM) plugin — no build step required. Edit the files in lib/ and test locally with a --patch overlay or dsh plugin add ./dsh-kill-restart.

License

MIT