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

serman

v0.3.2

Published

Easily managing Windows services

Downloads

10

Readme

Services Manager (serman)

serman is a language agnostic Windows services manager built on top of winsw. Without manual configuration at installation time, it can quickly and correctly install any app or script as a Windows service. The usage scenario is described as below.

  1. The developer writes his/her app (app.js) that's meant to be deployed as a service. Along with the app, the developer writes a simple manifest file (app.xml) by running serman init app to describe the service.
  2. The developer uploads the application to the machine using whatever preferable way it is.
  3. The developer runs serman install app.xml to install and start the service.
  4. The developer runs serman uninstall app to uninstall the service.

Quick Links

Install

Get the binary from releases.

Or from NPM:

npm install -g serman

Usage

Usage: serman [options] [command]

Commands:

  install [options] <service-config>  install a service: serman install app.xml key1=val1,key2=val2,..
  uninstall <service_id>              uninstall a service

Options:

  -h, --help  output usage information

Benefits

Usually, it takes a lot of effort or boilerplate to write a service. With serman, all it takes in addition to the app itself is a simple manifest file, allowing the developer to better focus on the app.

An example manifest file looks like this (document):

<service>
  <id>hello</id>
  <name>hello</name>
  <description>This service runs hello continuous integration system.</description>
  <env name="NODE_ENV" value="production"/>
  <executable>node</executable>
  <arguments>"{{dir}}\hello.js"</arguments>
  <logmode>rotate</logmode>
  <persistent_env name="FOO_SERVICE_PORT" value="8989" />
</service>

serman wraps winsw. And the manifest file is used by winsw and documented here in detail. The additional features that serman adds are described below.

Serman Features

Variable Substitutions In Service Configuration

The manifest file is actually a Mustache template. Upon installing a service, serman attempts to fill every double curly brace field ({{XXX}}) with a corresponding substitution.

Currently, the supported fields are:

dir

The absolute path of the directory containing the manifest file before calling serman install.

Details: This is different than winsw's %BASE%. %BASE% is always dynamically evaluated by winsw. If it's used to specify the app path, it only works when the manifest and app are co-located. However, for ease of management (by human), serman groups all manifest files under a common top level directory (by default c:\serman\services\), while the actual locations of each app are scattered around the file system. In this case, you would want to use {{dir}} rather than %BASE%.

Additional substitutions

A powerful feature is that serman install allows you to pass in additional substitutions as an argument. This is suitable for cases you want to pass secret API key as environment variable to your app, but don't want to directly put that in the manifest.

For example, specify {{API_KEY}} in the manifest:

<!-- manifest file -->
<service>
  <id>hello</id>
  <name>hello</name>
  <description>This service runs hello continuous integration system.</description>
  <env name="API_KEY" value="{{API_KEY}}"/>
  <env name="NODE_ENV" value="{{NODE_ENV}}"/>
  <executable>node</executable>
  <arguments>"{{dir}}\hello.js"</arguments>
  <logmode>rotate</logmode>
</service>

When installing the service, run:

serman install app.xml --values API_KEY=1234_abcd,NODE_ENV=development

The installed manifest file would have:

<!-- manifest file -->
<service>
  <id>hello</id>
  <name>hello</name>
  <description>This service runs hello continuous integration system.</description>
  <env name="API_KEY" value="1234_abcd"/>
  <env name="NODE_ENV" value="development"/>
  <executable>node</executable>
  <arguments>"c:\path\to\app\hello.js"</arguments>
  <logmode>rotate</logmode>
</service>

Persistent Environment Variables

<persistent_env name="FOO" value="BAR"> can be used to add FOO=BAR as a machine-wide persistent environment variable. This is great for service discoverability where an installed service can make itself discoverable to other apps by looking at the global environment variables.

Environment variable persisting is done after the variable substitutions, so that you can use {{}} in <persistent_env>.