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

sortlist-max-cli

v1.5.2

Published

Max CLI - Command line interface for the Max lead intelligence API. Discover leads, manage subscriptions, and automate workflows from the terminal or AI agents.

Readme

Max CLI

npm License: MIT

Lead intelligence CLI for developers and AI agents -- Discover leads, manage subscriptions, and automate workflows from the terminal.

The Max CLI provides a command-line interface to the Max API, enabling developers and AI agents to monitor sources (LinkedIn, funding databases, etc.) and discover new leads programmatically.


Installation

npm install -g sortlist-max-cli

For AI Agents

Install the Max skill for your AI agent (Cursor, Claude Code, OpenClaw, etc.):

npx skills add sortlist/max-cli

This installs the SKILL.md which gives your agent full knowledge of the CLI commands, patterns, and workflows.


Authentication

The recommended way to authenticate is the interactive login command:

max login

This prompts for your API key (get it from Settings > API Keys in your dashboard), validates it, and saves it to ~/.max/config.json.

Alternatively, set the MAX_API_KEY environment variable (takes priority over saved config):

export MAX_API_KEY=your_api_key

To remove saved credentials:

max logout

API keys are scoped to your team. Use --business (-b) to specify which business to operate on for leads, subscriptions, and webhooks.


Commands

Signals (catalog)

The signal catalog lists all available monitoring types. This is read-only and public.

# List all signal types
max signals:list

# Get details for a specific signal
max signals:get linkedin-company-engagers

Businesses

Each team can have multiple businesses. All leads, subscriptions, and webhooks are scoped to a business.

# List all businesses in your team
max businesses:list

# Get a business with its Ideal Customer Profile
max businesses:get 1

# Create a business from a website (auto-analyzes name, description, and ICP)
max businesses:create --website https://acme.com

# Create a business manually
max businesses:create --name "Acme Corp" --website https://acme.com

# Create with ICP attributes
max businesses:create --name "Acme Corp" \
  --icp '{"target_job_titles":["CTO","VP of Engineering"],"target_locations":["North America"]}'

businesses:create options:

| Option | Required | Description | |---|---|---| | --website | Conditional | Website URL. If passed alone, auto-analyzes name/description/ICP | | --name | Conditional | Business name (required when not using website-only mode) | | --description | No | Short description | | --icp | No | Ideal Customer Profile attributes as JSON string |

# Update a business name
max businesses:update 1 --name "New Name"

# Update the ICP (include the ICP id from businesses:get response)
max businesses:update 1 --icp '{"id":1,"target_job_titles":["CTO","VP Engineering"]}'

businesses:update options:

| Option | Description | |---|---| | --name | Business name | | --website | Website URL | | --description | Short description | | --icp | ICP attributes as JSON string (include id to update existing ICP) |

Subscriptions

A subscription is a signal you've activated with a specific configuration (e.g. "Track engagers on Apple's LinkedIn page"). All subscription commands require --business (-b).

# List all subscriptions
max subscriptions:list --business 1

# Get a subscription with stats
max subscriptions:get 42 --business 1

# Create a subscription
max subscriptions:create --business 1 \
  --signal linkedin-company-engagers \
  --name "Apple Engagers" \
  --config '{"linkedin_url":"https://www.linkedin.com/company/apple/"}'

# Update a subscription
max subscriptions:update 42 --business 1 --name "Renamed Subscription"

# Pause (stops scanning for new leads)
max subscriptions:pause 42 --business 1

# Resume
max subscriptions:resume 42 --business 1

# Delete
max subscriptions:delete 42 --business 1

subscriptions:create options:

| Option | Required | Description | |---|---|---| | --business | Yes | Business ID | | --signal | Yes | Signal slug from the catalog | | --name | Yes | Name for this subscription | | --config | No | Signal-specific config as JSON string |

subscriptions:update options:

| Option | Description | |---|---| | --name | Updated name | | --active | Set active state (true/false) | | --config | Updated config as JSON string |

Leads

Leads are enriched profiles discovered by your active subscriptions. Each lead includes name, company, LinkedIn URL, email, phone, and more. All lead commands require --business (-b).

# List leads (paginated)
max leads:list --business 1
max leads:list --business 1 --page 2 --per-page 50

# Get a single lead with full details and delivery history
max leads:get 1234 --business 1

# Delete a lead (soft-delete)
max leads:delete 1234 --business 1

leads:list options:

| Option | Default | Description | |---|---|---| | --business | — | Business ID (required) | | --page | 1 | Page number | | --per-page | 25 | Results per page (max 100) |

Webhooks

Register URLs to receive an HTTP POST in real-time whenever a new lead is discovered. All webhook commands require --business (-b).

# List webhooks
max webhooks:list --business 1

# Create a webhook with HMAC signature verification
max webhooks:create --business 1 --url https://example.com/webhook --secret whsec_abc123

# Delete a webhook
max webhooks:delete 10 --business 1

webhooks:create options:

| Option | Required | Description | |---|---|---| | --business | Yes | Business ID | | --url | Yes | URL to receive POST requests | | --secret | No | Secret for HMAC-SHA256 signature verification |


All Output is JSON

Every command outputs JSON for easy parsing with jq or consumption by AI agents:

# Get all lead emails
max leads:list --business 1 --per-page 100 | jq '.leads[] | .payload.email'

# Get subscription IDs that are active
max subscriptions:list --business 1 | jq '.subscriptions[] | select(.active) | .id'

# Count total leads
max leads:list --business 1 | jq '.meta.total_count'

# List business names
max businesses:list | jq '.businesses[] | .name'

Common Workflows

Set up a new business and start monitoring

# 1. Create a business from a website (auto-generates ICP)
max businesses:create --website https://acme.com

# 2. Note the business ID from the response, then browse signals
max signals:list

# 3. Create a subscription
max subscriptions:create --business 1 \
  --signal linkedin-company-engagers \
  --name "Acme Engagers" \
  --config '{"linkedin_url":"https://www.linkedin.com/company/acme/"}'

# 4. Check for leads
max leads:list --business 1

Pause and resume scanning

max subscriptions:pause 42 --business 1    # Stop scanning
max subscriptions:resume 42 --business 1   # Start scanning again

Set up real-time notifications

# Register a webhook
max webhooks:create --business 1 --url https://my-app.com/signals --secret my_secret

# Verify
max webhooks:list --business 1

Environment Variables

| Variable | Required | Description | |---|---|---| | MAX_API_KEY | No | Your Max API key (overrides saved config from max login) |


Error Handling

| Exit Code | Meaning | |---|---| | 0 | Success | | 1 | Error (message on stderr) |

| HTTP Status | Meaning | |---|---| | 401 | Missing or invalid API key | | 404 | Resource not found | | 422 | Validation error | | 429 | Rate limited (60 req/min) |


Development

git clone https://github.com/sortlist/max-cli.git
cd max-cli
npm install
npm run dev    # Watch mode
npm run build  # Production build

Project Structure

src/
  index.ts              # CLI entry point (yargs)
  api.ts                # ApiClient client class
  config.ts             # Config management (~/.max/config.json)
  commands/
    login.ts            # login, logout
    signals.ts          # signals:list, signals:get
    businesses.ts       # businesses:list, businesses:get, businesses:create, businesses:update
    subscriptions.ts    # Subscription management
    leads.ts            # Lead management
    webhooks.ts         # Webhook management

API Documentation

Full API docs: https://api.yourmax.ai/docs/api


License

MIT


Links