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

@cmrabdu/domain-checker

v1.0.0

Published

CLI tool to check domain name availability using DNS resolution and whois lookups. Zero dependencies.

Downloads

17

Readme

domain-checker

A lightweight CLI tool to check domain name availability using DNS resolution and whois lookups. Zero external dependencies.

npm Node.js License Zero dependencies


Features

  • Dual-check strategy — DNS first (fast), whois as fallback (accurate)
  • Configurable TLDs — check any combination of extensions
  • File input — pass a .txt file with one name per line
  • JSON & CSV export — pipe results into other tools or save them
  • --quiet mode — only print available domains
  • No external npm packages — uses only Node.js built-ins + system whois

Requirements

| Dependency | Notes | |---|---| | Node.js ≥ 14 | nodejs.org | | whois CLI | Pre-installed on macOS and most Linux distros |

Windows: whois is not bundled. Install it via Sysinternals or use WSL.


Installation

Use instantly with npx (no install needed)

npx @cmrabdu/domain-checker myapp mysite

Install globally

npm install -g @cmrabdu/domain-checker
domain-checker myapp mysite

Run from source

git clone https://github.com/cmrabdu/domain-chekcer.git
cd domain-chekcer
node domain-checker.js myapp mysite

Usage

domain-checker [options] [names...]

Arguments

| Argument | Description | |---|---| | names | One or more base names to check (e.g. myapp coolsite) |

Options

| Option | Default | Description | |---|---|---| | -e, --extensions <list> | .com,.io,.app,.org | Comma-separated TLD list | | -f, --file <path> | — | Text file with one base name per line | | -o, --output <path> | — | Save results to a .json or .csv file | | -d, --delay <ms> | 350 | Delay between checks (ms) | | --json | — | Print results as JSON (machine-readable) | | -q, --quiet | — | Only print available domains | | -v, --version | — | Print version | | -h, --help | — | Show help |


Examples

Check a few names across default TLDs

node domain-checker.js myapp coolsite

Check specific extensions

node domain-checker.js -e .com,.io,.fr myapp

Read names from a file

node domain-checker.js -f examples/domains.example.txt

Export results to JSON

node domain-checker.js myapp -e .com,.io -o results.json

Export results to CSV

node domain-checker.js myapp -e .com,.io -o results.csv

Only show available domains (quiet mode)

node domain-checker.js -f examples/domains.example.txt -q

JSON output (great for scripting)

node domain-checker.js myapp --json | jq '.[] | select(.available == true)'

Input file format

Create a plain text file with one base name per line. Lines starting with # are treated as comments.

# examples/my-domains.txt
myapp
coolsite
awesomeproject

Then run:

node domain-checker.js -f my-domains.txt -e .com,.io

Sample output

Domain Checker  DNS + whois · 8 domain(s)

  myapp.com                     ✗  taken  (dns:A)
  myapp.io                      ✓  available
  myapp.app                     ✗  taken  (whois:record)
  myapp.org                     ✗  taken  (dns:NS)
  coolsite.com                  ✗  taken  (dns:A)
  coolsite.io                   ✓  available
  coolsite.app                  ✓  available
  coolsite.org                  ✗  taken  (dns:A)

──────────────────────────────────────────────────

Available (3)
  myapp.io
  coolsite.io
  coolsite.app

Taken: 5

──────────────────────────────────────────────────

Tip: Always confirm on namecheap.com or porkbun.com before purchasing.

How it works

The script uses a two-step strategy:

  1. DNS check — Queries A, NS, and MX records. If any resolves, the domain is taken.
    This is fast and reliable for registered domains.

  2. whois check — Runs the system whois command on the domain.
    The output is parsed for known "free" and "taken" signals.
    Some TLD registries (e.g. .app, .io) return only TLD-level data, so the script falls back to the DNS result in ambiguous cases.

Results marked dns-clean+whois-tld mean DNS returned nothing and whois only showed TLD-level info — the domain is very likely available, but confirming with a registrar is recommended.


Result schema (JSON)

Each result object looks like this:

{
  "domain": "myapp.io",
  "available": true,
  "method": "whois:free"
}

| Field | Type | Description | |---|---|---| | domain | string | Full domain name checked | | available | true / false / null | Availability result (null = timeout/undetermined) | | method | string | How the result was determined |

Method values

| Value | Meaning | |---|---| | dns:A / dns:NS / dns:MX | Taken — DNS record found | | whois:record | Taken — domain record found in whois | | whois:registrar | Taken — registrar info found in whois | | whois:free | Available — whois returned a "free" signal | | dns-clean+whois-tld | Likely available — no DNS, no registrar info | | timeout | Undetermined — whois timed out |


Contributing

Contributions are welcome! Feel free to open an issue or submit a pull request.

  1. Fork the repo
  2. Create a feature branch: git checkout -b feature/my-feature
  3. Commit your changes: git commit -m 'feat: add something'
  4. Push: git push origin feature/my-feature
  5. Open a Pull Request

License

MIT © cmrabdu