The official command-line interface for the Datpaq API.
go install github.com/datpaq/cli/cmd/datpaq@latestRequires Go 1.26.3+. Once installed, datpaq is on your PATH (assuming $HOME/go/bin is exported).
Homebrew install coming soon:
brew install datpaq/tap/datpaq # not yet availabledatpaq auth login # sign in via browser (Clerk SSO)
datpaq api # list available APIs
datpaq ip-geolocation --ip 8.8.8.8 # call any endpoint
datpaq sample ip-geolocation --lang py # generate copy-paste codeThat's the loop: discover → call → integrate.
- 88 endpoints across 13 APIs, one consistent interface — geolocation, image processing, sample data, WHOIS, working days, and more.
datpaq api— browse every endpoint by interface, with descriptions pulled from the live OpenAPI spec.datpaq sample— emit ready-to-paste snippets incurl,JavaScript,Python, orGo. Uses$DATPAQ_API_KEYas the credential placeholder so snippets are safe to share.- Browser-based SSO via
datpaq auth login— no copy-pasting tokens from the dashboard. - Agent-friendly mode — append
--agentto any command for JSON output, non-interactive defaults, and stable exit codes. Drop it into a Claude Code workflow or a CI job. - Bundled MCP server (
datpaq-mcp) — every command auto-mirrored as an MCP tool for Claude Desktop and other MCP clients. For a remote/hosted MCP server, seegithub.com/datpaq/mcp. - Generated, not hand-stitched — built with
cli-printing-pressfrom the live OpenAPI spec. New endpoints land in the CLI when the spec updates.
Three paths, listed in order of how a real developer typically uses them:
# 1. Browser-based SSO (recommended for human use)
datpaq auth login
# 2. Paste an API key from https://datpaq.com (CI, headless, or SSH sessions)
datpaq auth set-token YOUR_KEY
# 3. Environment variable (CI, secret-managers, ephemeral runs)
export DATPAQ_API_KEY=YOUR_KEYCredentials persist to ~/.config/datpaq/config.toml (mode 0600, never committed). The DATPAQ_API_KEY env var always wins when set. Run datpaq doctor to verify auth and connectivity end-to-end.
Look up an aircraft tail number:
$ datpaq aircraft lookup-by-tail --tail N12345Validate a batch of email addresses from a file:
$ datpaq email-validation validate-batch --emails-file ./list.txt --json | jq '.[] | select(.deliverable == false)'Resize an image inline:
$ datpaq image-processing image-resize --url https://example.com/photo.jpg --width 800 > photo-800.jpgGenerate Python code for the IP intelligence endpoint:
$ datpaq sample ip-intelligence get --lang pyUse in a Claude Code agent or CI:
$ datpaq dns example.com --agent | jq '.records'The CLI's discovery surface (datpaq api, datpaq sample, splash) only shows endpoints listed in internal/cli/active-apis.json. When a new API ships on datpaq.com, add its slug there and rebuild.
The same file powers the hosted MCP server at mcp.datpaq.com and lives at github.com/datpaq/mcp — keep both in sync. If the MCP repo is checked out as a sibling directory, mirror the file with:
./scripts/sync-active-apis.sh- docs/cli-auth-spec.md — the website-side OAuth contract for
datpaq auth login - docs/release-process.md — how to cut a tagged release and publish to Homebrew
- API reference — full endpoint documentation on the website
- Dashboard ↗ — manage your API keys and usage
| Variable | Purpose |
|---|---|
DATPAQ_API_KEY |
API credential — overrides any value in the config file |
DATPAQ_BASE_URL |
Override the API base URL (default: https://datpaq.com/api/v1) — handy for pointing at staging |
DATPAQ_CONFIG |
Override the config file path (default: ~/.config/datpaq/config.toml) |
git clone https://github.com/datpaq/cli && cd cli
go build ./cmd/datpaq
./datpaq doctorThe CLI is generated from the OpenAPI spec at spec.yaml. To regenerate after the spec changes:
printing-press generate --spec spec.yaml --name datpaq --force--force uses AST-based merge to preserve hand-edits (the OAuth auth login command, the gradient banner, the splash menu, the sample command, the active-APIs filter).
Apache 2.0 — see LICENSE.
Generated by CLI Printing Press.