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

builtwith-official-cli

v1.1.0

Published

Non-interactive, scriptable CLI for the BuiltWith API

Readme

BuiltWith CLI 🔍

Non-interactive, scriptable CLI for the BuiltWith API — designed for automation, CI/CD pipelines, and AI agent consumption.

bw domain lookup shopify.com --format table
bw domain lookup shopify.com --nopii | jq '.Results[0].Technologies[].Name'
bw live feed --duration 60 > events.ndjson
bw mcp   # start MCP server for Claude Desktop, VS Code, etc.

🤔 Why this exists

The BuiltWith TUI is great for interactive exploration. This CLI is intentionally different:

  • stdout = data only (JSON/table/CSV) — safe to pipe anywhere
  • stderr = human output (spinners, errors, debug info)
  • Structured exit codes — scripts can distinguish auth failures from rate limits from network errors
  • Multiple auth paths — works in CI with env vars, locally with rc files, or inline with --key

📦 Installation

npm install -g builtwith-official-cli

Or run directly without installing:

npx builtwith-official-cli domain lookup example.com --key YOUR_KEY

Registers as both bw (short) and builtwith (discoverable).


🔑 Authentication

API key is resolved in priority order:

| Priority | Method | |---|---| | 1 | --key <value> CLI flag | | 2 | BUILTWITH_API_KEY environment variable | | 3 | .builtwithrc in current directory | | 4 | .builtwithrc in home directory |

.env files in the current directory are loaded automatically, so BUILTWITH_API_KEY=xxx in .env works too.

.builtwithrc format:

{"key": "YOUR_API_KEY"}

Copy .builtwithrc.example to get started:

cp .builtwithrc.example ~/.builtwithrc
# then edit with your key

💻 Commands

🌐 Domain

bw domain lookup <domain> [flags]

| Flag | Description | |---|---| | --nopii | Exclude PII data | | --nometa | Exclude meta data | | --noattr | Exclude attribution data | | --liveonly | Only currently-live technologies | | --fdrange <YYYYMMDD-YYYYMMDD> | First-detected date range | | --ldrange <YYYYMMDD-YYYYMMDD> | Last-detected date range |

bw domain lookup shopify.com
bw domain lookup shopify.com --format table
bw domain lookup shopify.com --nopii --liveonly | jq '.Results[0].Technologies[].Name'
bw domain lookup shopify.com --fdrange 20240101-20241231

📋 Lists

bw lists tech <tech> [--offset <n>] [--limit <n>]
bw lists tech WordPress
bw lists tech Shopify --limit 50 --offset 100

🔗 Relationships

bw relationships lookup <domain>

🆓 Free

bw free lookup <domain>

🏢 Company

bw company find <name>
bw company find "Shopify"

🏷️ Tags

bw tags lookup <lookup>

💡 Recommendations

bw recommendations lookup <domain>

↪️ Redirects

bw redirects lookup <domain>

🔤 Keywords

bw keywords lookup <domain>

📈 Trends

bw trends tech <tech>
bw trends tech React

🛍️ Products

bw products search <query> [--page <n>] [--limit <n>]
bw products search "coffee maker"
bw products search "running shoes" --page 2 --limit 50

🛡️ Trust

bw trust lookup <domain>

👤 Account

bw account whoami
bw account usage

📡 Live Feed

Stream live technology detection events as NDJSON, one event per line.

bw live feed [--duration <seconds>]
# Stream indefinitely (Ctrl+C to stop)
bw live feed

# Capture 60 seconds of events
bw live feed --duration 60 > events.ndjson

# Pipe to jq in real time
bw live feed | jq --unbuffered '.domain'

🚩 Global Flags

Available on every command:

| Flag | Description | |---|---| | --key <apikey> | API key (highest priority) | | --format <fmt> | json (default) | table | csv | | --no-color | Disable color on stderr | | --dry-run | Print request URL (key masked) and exit | | --debug | Print HTTP metadata to stderr | | --quiet | Suppress spinner/info stderr output |


🖨️ Output Formats

JSON (default)

bw domain lookup example.com | jq '.Results[0].Technologies[].Name'

Table

bw domain lookup example.com --format table

CSV

bw domain lookup example.com --format csv > results.csv

🚦 Exit Codes

Scripts can use exit codes to handle different failure modes:

| Code | Meaning | |---|---| | 0 | ✅ Success | | 1 | 💥 Unexpected error | | 2 | 🔐 Auth failure (missing key, 401, 403) | | 3 | 🔍 Not found (404) | | 4 | ⏱️ Rate limit (429) | | 5 | ⚠️ Other API error | | 6 | 🌐 Network failure | | 7 | ❌ Invalid input | | 8 | 🛑 Interrupted (SIGINT) |

bw domain lookup example.com
case $? in
  0) echo "success" ;;
  2) echo "check your API key" ;;
  4) echo "rate limited — slow down" ;;
  6) echo "network error" ;;
esac

🔧 Pipeline Examples

# Get all live tech names for a domain
bw domain lookup shopify.com --liveonly | \
  jq -r '.Results[0].Technologies[].Name' | sort

# Check if a domain uses WordPress
bw domain lookup example.com --quiet --liveonly | \
  jq -e '.Results[0].Technologies[] | select(.Name == "WordPress")' > /dev/null \
  && echo "uses WordPress"

# Export tech stack to CSV
bw domain lookup shopify.com --format csv > shopify-tech.csv

# Capture 5 minutes of live events
bw live feed --duration 300 --quiet > feed.ndjson

# Find all sites using a technology (paginated)
for offset in 0 20 40 60 80; do
  bw domain lists tech React --offset $offset --limit 20 --quiet
done | jq -s 'add'

# CI/CD: fail build if domain check fails
bw domain lookup mysite.com --key "$BUILTWITH_API_KEY" --quiet || exit 1

🐛 Dry Run & Debugging

# Preview the URL that would be called (key is masked)
bw domain lookup example.com --key MYKEY --dry-run
# → https://api.builtwith.com/v22/api.json?KEY=REDACTED&LOOKUP=example.com

# See HTTP response metadata
bw domain lookup example.com --debug

🤖 MCP Server

bw mcp starts a Model Context Protocol server over stdio, exposing all BuiltWith API endpoints as structured tools that any MCP-compatible client can call — Claude Desktop, VS Code, Cursor, Zed, and more.

bw mcp
bw mcp --key YOUR_API_KEY   # pass key inline instead of env/rc file
bw mcp --debug              # log JSON-RPC traffic to stderr

⚙️ Client configuration

Add to your MCP client config (e.g. claude_desktop_config.json):

{
  "mcpServers": {
    "builtwith": {
      "command": "bw",
      "args": ["mcp"]
    }
  }
}

If your API key isn't in an env var or .builtwithrc, pass it inline:

{
  "mcpServers": {
    "builtwith": {
      "command": "bw",
      "args": ["mcp", "--key", "YOUR_API_KEY"]
    }
  }
}

🧰 Available tools

| Tool | Description | |---|---| | domain_lookup | 🌐 Technology stack for a domain (supports nopii, liveonly, date ranges) | | lists_tech | 📋 Domains currently using a technology | | relationships_lookup | 🔗 Related domains (shared infra, ownership) | | free_lookup | 🆓 Free-tier category counts for a domain | | company_find | 🏢 Domains associated with a company name | | tags_lookup | 🏷️ Domains related to an IP or tag attribute | | recommendations_lookup | 💡 Technology recommendations for a domain | | redirects_lookup | ↪️ Live and historical redirect chains | | keywords_lookup | 🔤 Keyword data for a domain | | trends_tech | 📈 Historical adoption trend for a technology | | products_search | 🛍️ Search ecommerce products across indexed stores | | trust_lookup | 🛡️ Trust/quality score for a domain | | account_whoami | 👤 Authenticated account identity | | account_usage | 📊 API usage statistics |

🔬 Implementation note

The MCP server is implemented as a pure JSON-RPC 2.0 stdio server with no additional dependencies — auth, HTTP calls, and error handling all use the same code paths as the regular CLI commands.


🛠️ Development

git clone https://github.com/builtwith/builtwith-cli
cd builtwith-cli
npm install
npm test        # 24 tests, node:test built-in (no extra framework)
# Run without installing globally
node bin/bw.js domain lookup example.com --key YOUR_KEY

🔗 Related


📄 License

MIT