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

@entrolytics/cli

v2.3.0

Published

CLI for Entrolytics - First-party growth analytics for the edge

Readme

npm License: MIT Node.js


Overview

@entrolytics/cli is the official command-line interface for Entrolytics - first-party growth analytics for the edge. Set up projects, verify tracking, and view analytics directly from your terminal.

Why use this CLI?

  • One-command project setup with entro-ng init
  • Auto-detects Next.js, React, Vue, Svelte, and Astro
  • Verify tracking is working without leaving terminal
  • View real-time analytics and manage short links

Key Features

Setup & Management

  • entro-ng init - One-command setup
  • Auto framework detection
  • Safe .env management
  • OAuth authentication

Analytics & Tools

  • Real-time visitor count
  • Top pages, referrers, countries
  • Link shortener management
  • Framework-specific snippets

Quick Start

Installation

npm install -g @entrolytics/cli

# or

pnpm add -g @entrolytics/cli

# Initialize Entrolytics in your project (recommended)

cd your-project
entro-ng init

# Verify tracking is working

entro-ng verify

# View analytics

entro-ng stats <website-id>

Features

  • 🚀 One-command setup - entro-ng init configures everything automatically
  • 🔍 Auto framework detection - Detects Next.js, React, Vue, Svelte, Astro
  • ⚙️ Safe environment management - Preserves existing .env variables and comments
  • Verification tools - Test tracking without leaving terminal
  • 🔄 Configuration updates - Easy credential refresh with entro-ng update
  • 🔐 OAuth authentication - Secure token storage
  • 📊 Real-time analytics - View stats directly in terminal
  • 🔗 Link management - Create and track short links
  • 📝 Code snippets - Generate framework-specific integration code

Commands

Setup & Initialization


# Initialize Entrolytics in your project

entro-ng init                          # Auto-detect everything

entro-ng init --framework nextjs       # Specify framework

entro-ng init --domain example.com     # Set domain

entro-ng init --website-id abc-123     # Use existing website

entro-ng init --skip-install           # Don't install package

# Verify tracking is working

entro-ng verify                        # Check current project

entro-ng verify --website-id abc-123   # Check specific website

# Update configuration

entro-ng update                        # Refresh current config

entro-ng update --website-id new-id    # Switch website

entro-ng update --host https://custom  # Change API host

Authentication

entro-ng login                # Authenticate with Entrolytics

entro-ng logout               # Clear local credentials

entro-ng whoami               # Display current user

entro-ng switch <org>         # Switch active organization

Website Management

entro-ng sites list                  # List all websites

entro-ng sites add <domain>          # Add new website

entro-ng sites remove <website-id>   # Remove website

entro-ng sites verify <website-id>   # Verify tracking installation

entro-ng sites info <website-id>     # Show website details

Analytics

entro-ng stats [website-id]                 # Today's overview

entro-ng stats --period 7d                  # Last 7 days

entro-ng stats --period 30d                 # Last 30 days

entro-ng realtime [website-id]              # Live visitor count

entro-ng top pages [website-id]             # Top pages by views

entro-ng top referrers [website-id]         # Top referral sources

entro-ng top countries [website-id]         # Geographic breakdown

Link Shortener

entro-ng links list                    # List all short links

entro-ng links create <url>            # Create short link

entro-ng links create <url> --slug x   # Create with custom slug

entro-ng links stats <link-id>         # Link click analytics

entro-ng links delete <link-id>        # Delete link

Integration Helpers

entro-ng snippet --framework next      # Get Next.js snippet

entro-ng snippet --framework react     # Get React snippet

entro-ng snippet --framework astro     # Get Astro snippet

entro-ng snippet --framework vue       # Get Vue snippet

entro-ng snippet --framework html      # Get plain HTML snippet

entro-ng test-event --site <id>        # Send test event

Workflows

New Project Setup


# Start a new Next.js project

npx create-next-app@latest my-app
cd my-app

# Set up Entrolytics (one command does it all!)

npx @entrolytics/cli init

# Start your dev server

npm run dev

# Verify tracking is working

npx @entrolytics/cli verify

The init command will:

  1. Authenticate you (opens browser)
  2. Detect your framework automatically
  3. Create or find your website
  4. Add credentials to .env.local
  5. Optionally install the appropriate package
  6. Show you the integration code

Existing Project


# Navigate to your project

cd existing-project

# Initialize Entrolytics

entro-ng init

# If you already have a website ID

entro-ng init --website-id abc-123-def --skip-install

# Verify it's working

entro-ng verify

Team Collaboration


# Team member clones repo

git clone https://github.com/company/project.git
cd project

# Credentials are already in .env.local, just login

entro-ng login

# Verify their setup works

entro-ng verify

# View shared analytics

entro-ng stats

Configuration

entro-ng config list                   # List all config

entro-ng config get <key>              # Get config value

entro-ng config set <key> <value>      # Set config option

Available config keys:

  • apiHost - Entrolytics API URL (default: https://api.entrolytics.click)
  • defaultSiteId - Default website ID for commands
  • outputFormat - Output format: table or json

Programmatic Usage

You can also use the CLI as a library:

import { api, isAuthenticated } from '@entrolytics/cli';

if (isAuthenticated()) {
  const websites = await api.getWebsites();
  console.log(websites.data);
}

Development


# Install dependencies

pnpm install

# Watch mode

pnpm dev

# Build

pnpm build

# Run locally

node dist/cli.js --help

License

MIT License - see LICENSE file for details.