Documentation

Datpaq CLI

The official command-line interface for Datpaq APIs. Discover endpoints, run requests, generate snippets, and wire Datpaq into scripts, CI, and agents from your terminal. Get your API_Key in the dashboard.

Datpaq CLI
1

Install

Install with Go, a prebuilt Homebrew tap is planned and will be announced when the formula is published.

bash
go install github.com/datpaq/cli/cmd/datpaq@latest
2

Authenticate

Pick whichever fits your environment:

Browser SSO (recommended)

bash
datpaq auth login

Paste a dashboard token

bash
datpaq auth set-token YOUR_DATPAQ_API_KEY

Environment variable (CI)

bash
export DATPAQ_API_KEY=YOUR_DATPAQ_API_KEY

Credentials are stored at ~/.config/datpaq/config.toml with file mode 0600.

3

Run your first command

datpaq api lists every active interface and a short description. From there you can drill into a method and run it.

bash
# Browse what's available
datpaq api

# Run an endpoint
datpaq ip-geolocation get --ip 8.8.8.8 --json
4

Copy-paste code samples

datpaq sample emits a ready-to-run snippet for any endpoint in curl, js, py, or go.

bash
datpaq sample ip-geolocation get --lang py
5

Agent / CI mode

Append --agent to any command and the CLI switches to --json --compact --no-input --no-color --yes in one flag — predictable output for scripts, CI jobs, and MCP-aware agents.

bash
datpaq ip-geolocation get --ip 8.8.8.8 --agent | jq '.country'
6

Health check

datpaq doctor verifies your config, stored auth, environment variables, and live API reachability. Run it first whenever something looks off.

bash
datpaq doctor
7

MCP server

datpaq-mcp is a sibling binary that exposes every CLI command as an MCP tool for Claude Desktop and other MCP-capable clients.

bash
go install github.com/datpaq/cli/cmd/datpaq-mcp@latest