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 🙏

© 2025 – Pkg Stats / Ryan Hefner

protocol-registry-cli

v1.1.1

Published

This is a command line version of protocol registry npm module.

Downloads

17

Readme

Protocol-registry-cli

This is a command line version of protocol registry npm module which helps to register custom protocols like myapp://**, etc mapped with custom commands in your system.

This is meant to be used in terminal, not in the browser.

Install

$ npm i -g protocol-registry-cli

You can download the binary version here :

Usage

For registering :

$ protoreg-cli -p "testproto" -c 'echo  \"$_URL_\"' -t -o

This will open a terminal and echo the url by which it was initiated when any url like "testproto://anything" or "testproto://anything/work/to/do" is hit in any browser.

For checking :

$ protoreg-cli check -p "http"
> true

$ protoreg-cli check -p "anythingNotRegistered"
> false

API

At present it supports 2 modes :

register

This is the default mode which helps you to register custom protocol mapped with a command in you system.

Note : No output is a successful operation

check

Checks if the provided protocol already exists or not. Prints true or false accordingly.

options

usage: protoreg-cli [-h] [-v] -p PROTOCOL [-c COMMAND] [-t] [-o] [-s] [{register,check}]

A command line tool to register custom protocols mapped with custom commands in your system.

positional arguments:
  {register,check}      Allows you to set whether you want to check or you want to register a
                        protocol.

optional arguments:
  -h, --help            show this help message and exit
  -v, --version         show program\'s version number and exit
  -p PROTOCOL, --protocol PROTOCOL
                        Helps you to specify the protocol.
  -c COMMAND, --command COMMAND
                        Helps you to specify the command you want to map with the protocol. $_URL_
                        mentioned anywhere in your command will be replaced by the url by which it is
                        initiated.
  -t, --terminal        This option tells the system to first launch a terminal and then execute the
                        command inside it. Otherwise commands are executed in background.
  -o, --override        Use this with caution as it will override all previous registrations on this
                        protocol with this command.
  -s, --script          This tells the system to save your command in a script and then run that
                        script for the protocol.

Supported platforms

  • Windows - OS - Supported
  • linux - OS - Supported
  • MacOS - OS - Supported with some anomalies mentioned below.

MacOS Anomalies

Without terminal option

In MacOS if you don't launch the terminal it will run your command without logging in.

Thus you need to use absolute address of each command in your command string.

Example

Suppose you want to run :

$ node /path/to/index.js

Then first you need to find the path of node using the command below in terminal :

$ type node
> node is /usr/local/bin/node

Then replace the address of node in original command. So your final command will be :

$ /usr/local/bin/node /path/to/index.js

Contributors:

Credits goes to these people: ✨