@alltuner/vacant
v0.4.11
Published
Fast domain availability checker — asks authoritative TLD nameservers directly instead of WHOIS.
Downloads
151
Maintainers
Readme
@alltuner/vacant — domain availability via authoritative DNS
JavaScript / TypeScript bindings for the vacant Rust engine. Asks the authoritative TLD nameservers directly instead of WHOIS — fast, no rate limits, no waiting.
The package ships the same Rust engine compiled in via napi-rs, with a small TypeScript facade and a vacant CLI entry point. Lockstep-versioned with the vacant crate: @alltuner/vacant 0.4.x wraps vacant 0.4.x (Rust) exactly.
Prefer a browser? vacant.alltuner.com is a hosted web UI built on vacant — a separate app that uses this package, not something it installs.
Install
Pick the path that matches how you'll use it:
CLI
brew install alltuner/tap/vacant # macOS, Linux — native Rust binary
cargo install vacant # any platform with a Rust toolchain
npx -y @alltuner/vacant google.com # one-shot, no install (Node wheel)The brew / cargo paths give you the native Rust binary (instant startup, ideal for daily use). npx runs the Node package — convenient when you don't want a global install, slightly slower to start because it boots Node.
MCP server
Expose vacant to AI agents over the Model Context Protocol (stdio):
npx -y @alltuner/vacant mcpIt registers one tool — check_domains(domains, verify=false) — returning a {domain, status} per input. Point any MCP client at it:
{ "mcpServers": { "vacant": { "command": "npx", "args": ["-y", "@alltuner/vacant", "mcp"] } } }Library
npm install @alltuner/vacant
# or
pnpm add @alltuner/vacantimport { checkMany, Status } from '@alltuner/vacant'
const results = checkMany(['example.com', 'anthropic.com', 'totally-made-up-zxqv.cat'])
for (const r of results) {
console.log(r.domain, r.status, r.detail)
}The on-disk SQLite cache is shared with the Rust CLI — runs against the same ~/.cache/vacant/results.db, so the brew binary and a Node script see each other's results.
import { DiskCache, checkMany } from '@alltuner/vacant'
const cache = new DiskCache() // default ~/.cache/vacant/results.db
const results = checkMany(['example.com'], { cache })How it works
checkMany calls into the Rust engine via napi-rs. The engine:
- Normalizes the input.
- Looks up cache; returns hits immediately.
- Runs a per-zone precheck (length, charset, reserved labels) from the bundled
rules.toml. - For inputs that pass, asks the parent zone's NS directly. Delegation →
registered; NXDOMAIN/NODATA →unconfirmed(not delegated, not verified). Pass{ verify: true }to confirmunconfirmednames against the registry's RDAP endpoint, promoting them toavailable(404) orregistered(200, e.g. a held domain).availableonly ever means RDAP-confirmed.
available is not a registrability guarantee, though: new gTLD registries (especially community/city zones like .barcelona, .cat, .amsterdam, .berlin) keep reservation and premium lists invisible to DNS, WHOIS, and RDAP, so a name can read available yet still be refused at checkout (e.g. radio.barcelona). Tracked for an in-engine fix in #26.
Cache shape, rules format, and verdict semantics are all the engine's — see alltuner/vacant for the source of truth.
Supported platforms
Prebuilt binaries ship for:
darwin-arm64(Apple silicon)darwin-x64(Intel macs)linux-arm64-gnulinux-x64-gnu
npm picks the right one via optionalDependencies at install time. Other platforms aren't supported in v1; build from source via the Rust crate (cargo install vacant) if you need them.
Develop
The Node package lives in the alltuner/vacant monorepo alongside the Rust engine, so dev commands run from the repo root:
just # menu
just js-develop # build the napi-rs extension into js/
just js-check # tsc + node:test smoke
just js-pack # produce a publishable tarballLicense
MIT — see ../LICENSE.
