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 🙏

© 2024 – Pkg Stats / Ryan Hefner

custody-cli

v0.6.0

Published

A developer-oriented frontend for Supervisor

Downloads

6

Readme

custody

Supervisor is great for running a bunch of processes but not for running a local, microservices development environment, where

  • services frequently become unstable due to quirks of developers' setups or bugs in Supervisor itself (Mixmax-internal link)
  • the processes monitored by Supervisor may be build e.g. gulp processes, not the services whose states change i.e. webservers
  • developers need to rapidly toggle between views of the environment's overall status and logs from individual services

supervisorctl status' is too high-level and static for such an environment, and toggling between that view and individual process logs is cumbersome.

Enter custody, which gives you a realtime view of both the environment's overall status and individual services' logs with minimum keystrokes.

Installation

npm install -g custody-cli

Configuration

By default, custody uses /usr/local/var/custody to store information and to enable probe->custody communication. You can override this directory by specifying the CUSTODY_PROC_DIR environment variable.

Usage

Make sure that Supervisor is running. Then run

custody-cli

If you're running Supervisor on a port other than 9001 (Mixmax engineers: your default), pass that using the --port flag.

This will show a view like supervisorctl status--except real-time and color-coded:

If the programs shown here are build processes, that in turn run server processes, you can use custody-probe to report the states of the servers.

Scroll through the list using your arrow keys or the mouse--or type to filter to a service of interest:

Hit enter or double-click on a service to open its logs:

Within this view, you can stop/start/restart the service using the keyboard shortcuts in the bottom toolbar.

Notifications

If you run custody-cli with --notifications, it will show desktop notifications when the services' states change. You can click the "Show" button on the notification to activate the Terminal and open custody to the corresponding service's logs. This feature is experimental--please contribute UX feedback!

If you'd like notifications to stay on the screen until dismissed, go to System Preferences -> Notifications, look for "terminal-notifier" in the list at left, and change its alert style from Banners to Alerts. We can't do this for you, unfortunately.

Automatic error recovery

If you've added probes to any of your servers, custody can automatically recover certain errors reported by those probes. In particular, if a server reports an EADDRINUSE error (see https://github.com/mixmaxhq/custody/issues/3), custody will automatically fix the port conflict by killing the process listening to your desired port, then restarting your process.

Contributing / Roadmap

We welcome bug reports and feature suggestions. PRs are even better!

Check out the issues and milestones to see what you could tackle to get this project to v1 and beyond.