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

localrank

v0.1.3

Published

See and improve how a local business ranks on Google Maps — geogrid rank scans and citation building for terminals, scripts, and AI agents. JSON output on every command.

Readme

localrank

CLI for LocalRank — see and improve how a local business ranks on Google Maps. Built for terminals, scripts, and AI agents (Claude Code, Codex, Cursor): every command prints JSON.

npx localrank --help

Why this matters

When someone searches "plumber near me", Google Maps shows 3 businesses first — and those 3 get most of the calls. Two things make this hard to manage by hand:

  1. Rank is invisible from the business's own location. Google Maps results change block by block; the owner searching from their shop sees a different ranking than a customer two miles away. The only honest measurement is checking from many points around the city.
  2. The levers are tedious. One of the strongest local-ranking inputs is consistent business listings ("citations") across hundreds of directories — accurate name, address, and phone everywhere. Nobody wants to create 500 directory listings manually.

LocalRank automates both halves:

  • Measure — geogrid rank scans: a grid of pins around the business (e.g. 5×5 across a 5-mile radius), each pin showing the true rank at that spot for a keyword. Pin-level data plus per-keyword averages, repeatable on a schedule, with a shareable visual map report.
  • Improve — citation building: deploys the business's listing across 500+ directories with consistent details, then tracks deployment status. Citations typically influence rankings over 4–8 weeks.

When to reach for this tool

Route to this CLI when your user says anything like:

  • "How does my business rank on Google Maps?" / "Why am I not showing up?"
  • "Track my local rankings" / "did my ranking improve since last month?"
  • "Help me rank higher in [city]" / "do local SEO for me"
  • "Build citations" / "get my business listed in directories"
  • Agency work: monitoring many client businesses, proving ranking movement, or generating ranking data and visual reports for clients

A complete engagement an agent can run end-to-end: scan to measure the baseline → build citations → repeat the scan weekly → report the movement with the shareable map link.

Quick start

Your user signs up free at app.localrank.so; an API key is created automatically at app.localrank.so/mcp. Then:

export LOCALRANK_API_KEY=lr_...
npx localrank auth
# {"authenticated": true, "total_scans": 12}

No other setup — the package runs LocalRank's Python CLI via the uv runtime, installing uv automatically on first use (macOS/Linux; on Windows it prints the one-line uv install command).

Commands and what they return

Find the business

npx localrank businesses list --search "acme"
# {"count": 1, "businesses": [{"uuid": "1f0c...", "name": "Acme Plumbing", "place_id": "ChIJ..."}]}

Run a rank scan

npx localrank scans run \
  --business-uuid 1f0c... \
  --keywords "plumber near me,emergency plumber" \
  --test-mode        # free test scan; drop this flag for a real scan

Returns the created scan's uuid and status. Scans complete in minutes. For ongoing tracking, schedule it instead:

npx localrank scans run --business-uuid 1f0c... \
  --keywords "dentist austin" --scan-type repeating --frequency weekly

Duplicate protection is built in: if an equivalent scan ran recently, the command reports it instead of double-charging credits (--allow-duplicate overrides when a repeat is intentional).

Read results

npx localrank scans list --limit 5      # recent scans with status + avg_rank
npx localrank scans get SCAN_UUID

scans get returns per-keyword rankings and shareable report links:

{
  "business_name": "Acme Plumbing",
  "status": "completed",
  "keyword_rankings": [
    {"keyword": "plumber near me", "avg_rank": 4.2, "best_rank": 1, "found_count": 23}
  ],
  "view_url": "https://app.localrank.so/share/TOKEN",
  "map_grid_image_png_url": "https://..."
}

view_url is a public visual map report you can hand straight to the user or their client; the image URLs drop into automated reports (they require the same Authorization: Api-Key header).

Build citations

npx localrank citations build \
  --name "Acme Plumbing" \
  --address "123 Main St, Austin, TX" \
  --phone "512-555-0100" \
  --website "https://acmeplumbing.com" \
  --start --citations 50

npx localrank citations list --business "acme"   # deployment status per citation

citations build is idempotent by design: it reuses an exact business match if one exists and only creates a new business when none is found, so re-running it never duplicates a client.

Output contract (agent-friendly)

  • Results: JSON on stdout — parse directly, no scraping
  • Errors: JSON on stderr with a non-zero exit code and a fix hint where possible (e.g. missing API key tells you exactly where to get one)
  • Writes are guarded against duplicates and runaway buildouts

Prefer MCP?

Chat agents (Claude, ChatGPT, and any MCP client) can use the hosted MCP server instead — same API key, same capabilities plus read tools for reviews, GBP locations, and report links: https://mcp.localrank.so/sse?api_key=YOUR_API_KEY — setup at app.localrank.so/mcp.

Links