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

ghl-api-cli

v0.1.0

Published

Complete HighLevel CLI with secure PIT auth, endpoint catalog, raw REST access, and Voice AI helpers.

Readme

GHL CLI

Private HighLevel CLI for full API coverage, secure Private Integration Token auth, raw REST calls, endpoint discovery, and Voice AI setup.

Install

npm install -g ghl-api-cli

For local development from this repository:

npm install
npm run build
npm link

Auth

Preferred auth is a HighLevel Private Integration Token from:

Settings -> Private Integrations -> Create New Integration

PIT auth is the smoothest local path. OAuth is also supported once you have a HighLevel Marketplace app client ID, client secret, redirect URI, and an authorization code from the app install redirect.

Use required scopes for the resources you want. For Voice AI, include:

  • voice-ai-agents.readonly
  • voice-ai-agents.write
  • voice-ai-agent-goals.readonly
  • voice-ai-agent-goals.write
  • voice-ai-dashboard.readonly

Login:

ghl auth login

This prompts for the Private Integration Token with hidden input, then the location ID.

Non-interactive login:

ghl auth login --token "pit-..." --location-id "LOCATION_ID" --no-verify

Or avoid shell history:

printf '%s' "$GHL_PRIVATE_TOKEN" | ghl auth login --stdin --location-id "LOCATION_ID" --no-verify

Config is stored at ~/.config/ghl-cli/config.json with directory mode 0700 and file mode 0600.

OAuth code exchange:

printf '%s' "$GHL_OAUTH_CLIENT_SECRET" | ghl auth exchange-code \
  --client-id "CLIENT_ID" \
  --client-secret-stdin \
  --redirect-uri "https://your-app.example.com/oauth/callback" \
  --code "AUTHORIZATION_CODE" \
  --location-id "LOCATION_ID"

Refresh later:

printf '%s' "$GHL_OAUTH_CLIENT_SECRET" | ghl auth refresh --client-id "CLIENT_ID" --client-secret-stdin

Env/flag precedence:

  1. CLI flags
  2. Environment variables
  3. Stored config

Supported env aliases:

  • GHL_PRIVATE_TOKEN, GHL_TOKEN, GHL_ACCESS_TOKEN, GHL_API_TOKEN, GHL_API_KEY
  • GHL_LOCATION_ID
  • GHL_COMPANY_ID
  • GHL_BASE_URL
  • GHL_API_VERSION
  • GHL_OUTPUT
  • GHL_TIMEOUT_MS

Full API Coverage

The CLI bundles the 590 endpoint catalog from HighLevel public API coverage. Search it:

ghl endpoints list --search voice-ai --output json
ghl endpoints show create-agent --app voice-ai --output json

Run any catalog endpoint by operationId:

ghl run get-agents --app voice-ai --query locationId=LOCATION_ID
ghl run get-agent --app voice-ai --param agentId=AGENT_ID --query locationId=LOCATION_ID
ghl run create-agent --app voice-ai --data-file agent.json --confirm

Raw escape hatch for any current or future endpoint:

ghl api GET /contacts/ --query locationId=LOCATION_ID
ghl api POST /contacts/ --data-file contact.json --confirm
ghl api DELETE /contacts/CONTACT_ID --confirm

Writes and deletes require --confirm. Use --dry-run to preview.

Voice AI

ghl voice agents list --location-id LOCATION_ID
ghl voice agents get AGENT_ID --location-id LOCATION_ID
ghl voice agents create --data-file agent.json --confirm
ghl voice agents patch AGENT_ID --field welcomeMessage="Thanks for calling" --confirm
ghl voice agents delete AGENT_ID --confirm

Actions:

ghl voice actions create \
  --agent-id AGENT_ID \
  --name "Book appointment" \
  --type "book_appointment" \
  --data-file action-parameters.json \
  --confirm

Call logs:

ghl voice logs list --agent-id AGENT_ID --start-date 2026-06-01 --end-date 2026-06-15
ghl voice logs get CALL_ID

Common Shortcuts

Shortcut groups exist for common resources:

ghl contacts list --query locationId=LOCATION_ID
ghl contacts get CONTACT_ID
ghl opportunities list --query locationId=LOCATION_ID
ghl calendars list --query locationId=LOCATION_ID

Use ghl run or ghl api when shortcut paths differ from the exact API endpoint you need.

Development

npm run typecheck
npm test
npm run build