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

apihealthz

v1.1.3

Published

A command-line tool to monitor your API and website uptime and health. Keep track of your services' availability, receive alerts when they go down, and manage all your health checks from the terminal.

Readme

APIHealthz CLI

A command-line tool to monitor your API and website uptime and health. Keep track of your services' availability, receive alerts when they go down, and manage all your health checks from the terminal.

Features

  • 🔐 OAuth Authentication - Secure login with Google
  • 📊 Health Monitoring - Monitor any API or website endpoint
  • ⏱️ Flexible Intervals - Choose from 5 minutes, 15 minutes, 30 minutes, or 1 hour check intervals
  • 🔔 Multiple Alert Channels - Get notified via Slack, Email, or WhatsApp when your services go down
  • 📋 Easy Management - List, add, and delete health checks with simple commands
  • 🎯 Interactive Setup - User-friendly prompts guide you through configuration

Installation

Prerequisites

  • Node.js (v22 or higher)
  • npm or yarn

Setup

  1. Clone the repository:
git clone https://github.com/ThePratikSah/apihealthz-cli.git
cd apihealthz-cli
  1. Install dependencies:
npm install
  1. Build the project:
npm run build
  1. Link the CLI globally:
npm link

After linking, you can use the apihealthz command from anywhere in your terminal.

Usage

Authentication

Before you can use the CLI, you need to authenticate:

# Login with Google
apihealthz auth login --provider google

# Check your authentication status
apihealthz auth status

# Logout
apihealthz auth logout

Adding a Health Check

Add a new API or website to monitor:

apihealthz add

The interactive prompt will guide you through:

  • URL: The API or website endpoint to monitor (must start with http:// or https://)
  • Check Interval: Choose how often to check (5 min, 15 min, 30 min, or 1 hour)
  • Alert Configuration: Set up notifications via Slack, Email, WhatsApp, or skip alerts

Example:

API URL to monitor: https://api.example.com/health
Select check interval: Every 5 minutes
How do you want to receive alerts?: Slack
Slack webhook URL: https://hooks.slack.com/services/YOUR/WEBHOOK/URL

Listing Health Checks

View all your configured health checks:

apihealthz list

This displays a table with:

  • Health check ID
  • Monitored URL
  • Check interval
  • Last status (UP ✅ or DOWN ❌)
  • Last checked timestamp

Deleting a Health Check

Remove a health check:

apihealthz delete

You'll be prompted to enter the health check ID and confirm deletion.

Commands Reference

| Command | Description | | ------------------------------------------- | ---------------------------------------- | | apihealthz auth login [--provider google] | Authenticate with ApiHealthz | | apihealthz auth logout | Logout from ApiHealthz | | apihealthz auth status | Show current authentication status | | apihealthz add | Add a new API health check (interactive) | | apihealthz list | List all configured health checks | | apihealthz delete | Delete a health check (interactive) | | apihealthz --version | Show version number | | apihealthz --help | Show help message |

Alert Configuration

Slack Alerts

To receive Slack notifications, you'll need a Slack webhook URL:

  1. Go to your Slack workspace settings
  2. Create a new incoming webhook
  3. Copy the webhook URL (format: https://hooks.slack.com/services/...)
  4. Provide it when adding a health check

Email Alerts

Simply provide your email address when configuring alerts. You'll receive email notifications when your monitored endpoints go down.

WhatsApp Alerts

WhatsApp alerts are configured during the health check setup process.

Development

Project Structure

apihealthz-cli/
├── src/
│   ├── commands/      # CLI command implementations
│   ├── services/      # API and business logic
│   └── utils/         # Utility functions (config, etc.)
├── dist/              # Compiled JavaScript output
└── package.json

Building

npm run build

This compiles TypeScript to JavaScript in the dist/ directory.

Development Setup

npm run setup

This builds the project and links it globally in one command.

Requirements

  • Node.js 14+
  • An ApiHealthz account (created during first login)

License

ISC

Support

For issues, questions, or contributions, please open an issue on the repository.