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

@siddharthjain25/beaconcli

v1.0.2

Published

CLI utility to publish and subscribe to Beacon real-time notification streams directly from the terminal.

Readme

Beacon CLI Client (beaconcli)

beaconcli is a lightweight, zero-dependency, real-time command-line interface utility to publish, ingest, and subscribe to telemetry signals and notification streams directly from your terminal. It integrates seamlessly with the Beacon event server.


✨ Features

  • Instant Subscription: Stream live JSON payloads matching specific topics.
  • Interactive Selector: Run beaconcli sub with no arguments to dynamically fetch your topics and select one using an interactive arrow-key menu.
  • Flexible Publishing: Send JSON payloads or pipe log streams directly into a topic via standard input (stdin).
  • Easy Authentication: Authenticate instantly via your browser using beaconcli login.
  • Zero Dependencies: Pure native Node.js implementation (fast bootup, tiny footprint).
  • Developer Friendly: Supports a --raw output mode for clean piping to formatting utilities like jq.

🚀 Installation

Install the package globally from the npm registry:

npm install -g @siddharthjain25/beaconcli

🔑 Authentication & Setup

Before sending or receiving signals, connect your CLI client to your Beacon account.

1. Interactive Browser Login (Recommended)

Run the login command:

beaconcli login

This automatically spins up a local loopback server, opens your default web browser, guides you through the UI login, and securely writes your active session token and username back to your local CLI configuration.

2. Check Configuration

You can view your currently stored configuration profile by running:

beaconcli config get

3. Log Out

To clear your active session credentials and purge the local configuration, run:

beaconcli logout

📖 Command Guide

beaconcli sub [topic]

Subscribes to a topic stream and outputs messages in real-time.

  • Interactive Mode: If you omit the topic path, the CLI queries the server and displays an interactive list of your available topics. Use the Up/Down arrow keys to navigate and Enter to select:
    beaconcli sub
  • Direct Mode:
    beaconcli sub username/topic-name
  • Options:
    • -r, --raw: Outputs the raw JSON payloads without timestamp labels or formatting. Perfect for scripts and piping:
      beaconcli sub username/topic-name --raw | jq .data.status

beaconcli pub <topic> [payload]

Publishes a notification payload to a specific topic.

  • Argument Payload:
    beaconcli pub username/topic-name '{"status":"operational","cpu":42}'
  • Stream/Pipe Payload (stdin): If the payload argument is omitted, the CLI reads directly from stdin. This is ideal for streaming active system logs:
    tail -f /var/log/syslog | beaconcli pub username/syslog
  • Options:
    • -s, --silent: Suppresses successful publish confirmation logs (HTTP 200) for clean background processes.

beaconcli config

Manage persistent client settings locally.

  • Set a value:
    beaconcli config set base-url https://custom-beacon-server.com
  • Get a value / list config:
    beaconcli config get base-url

⚙️ Global Options

You can override your saved profile configuration on the fly using these flags:

  • -u, --url <url>: Override the default Beacon API server URL.
  • -k, --key <key>: Override the saved authentication token/API key.
  • -h, --help: Display the CLI usage help menu.

📄 License

This project is licensed under the ISC License.