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

@entro314labs/entro-cli

v1.1.0

Published

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

Readme

@entro314labs/entro-cli

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

Installation

npm install -g @entro314labs/entro-cli
# or
pnpm add -g @entro314labs/entro-cli

Quick Start

# Initialize Entrolytics in your project (recommended)
cd your-project
entro init

# Verify tracking is working
entro verify

# View analytics
entro stats <website-id>

Features

  • 🚀 One-command setup - entro 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 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 init                          # Auto-detect everything
entro init --framework nextjs       # Specify framework
entro init --domain example.com     # Set domain
entro init --website-id abc-123     # Use existing website
entro init --skip-install           # Don't install package

# Verify tracking is working
entro verify                        # Check current project
entro verify --website-id abc-123   # Check specific website

# Update configuration
entro update                        # Refresh current config
entro update --website-id new-id    # Switch website
entro update --host https://custom  # Change API host

Authentication

entro login                # Authenticate with Entrolytics
entro logout               # Clear local credentials
entro whoami               # Display current user
entro switch <org>         # Switch active organization

Website Management

entro sites list                  # List all websites
entro sites add <domain>          # Add new website
entro sites remove <website-id>   # Remove website
entro sites verify <website-id>   # Verify tracking installation
entro sites info <website-id>     # Show website details

Analytics

entro stats [website-id]                 # Today's overview
entro stats --period 7d                  # Last 7 days
entro stats --period 30d                 # Last 30 days
entro realtime [website-id]              # Live visitor count
entro top pages [website-id]             # Top pages by views
entro top referrers [website-id]         # Top referral sources
entro top countries [website-id]         # Geographic breakdown

Link Shortener

entro links list                    # List all short links
entro links create <url>            # Create short link
entro links create <url> --slug x   # Create with custom slug
entro links stats <link-id>         # Link click analytics
entro links delete <link-id>        # Delete link

Integration Helpers

entro snippet --framework next      # Get Next.js snippet
entro snippet --framework react     # Get React snippet
entro snippet --framework astro     # Get Astro snippet
entro snippet --framework vue       # Get Vue snippet
entro snippet --framework html      # Get plain HTML snippet
entro 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 @entro314labs/entro-cli init

# Start your dev server
npm run dev

# Verify tracking is working
npx @entro314labs/entro-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 init

# If you already have a website ID
entro init --website-id abc-123-def --skip-install

# Verify it's working
entro 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 login

# Verify their setup works
entro verify

# View shared analytics
entro stats

Configuration

entro config list                   # List all config
entro config get <key>              # Get config value
entro config set <key> <value>      # Set config option

Available config keys:

  • apiHost - Entrolytics API URL (default: https://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 '@entro314labs/entro-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.