Skip to content

Quickstart

You need about a minute. Pick one way to get the server, start it with an administrator password, then run a query.

macOS on Apple silicon and Linux (x86-64 or arm64, glibc 2.28 or newer: RHEL, Rocky and Alma Linux 8, Debian 10, Ubuntu 20.04, Amazon Linux 2023):

Terminal window
$ curl https://install.hardcharger.gizmodata.com | sh
…
$ ~/.hardcharger/bin/hardcharger-server --version
Hardcharger …

The installer puts every version under ~/.hardcharger/versions/ and links the current one into ~/.hardcharger/bin; add that directory to your PATH. It checks each download against the release’s SHA-256 before switching. HARDCHARGER_VERSION=0.3.0 installs a given version, and sh -s -- --list lists what you have.

Start the server:

Terminal window
HARDCHARGER_ADMIN_PASSWORD='change-me' ~/.hardcharger/bin/hardcharger-server --database my.duckdb
Terminal window
$ curl -s localhost:31337/warp/v1/health
{"status":"serving"}

The health endpoint needs no credentials. For load balancers and Kubernetes probes, also serve it on its own plaintext port with --health-port 31338 (the Docker image does). Port 31337 describes itself at /warp:

Terminal window
$ curl -s localhost:31337/warp | jq -r '.server.name, .protocol'
Hardcharger
warp-sql

Warp SQL is plain HTTP, so curl is enough. Get a token, open a session, run SQL:

Terminal window
TOKEN=$(curl -s localhost:31337/warp/v1/auth/token -H 'Content-Type: application/json' \
-d '{"grant_type": "password", "username": "hardcharger", "password": "change-me"}' | jq -r .access_token)
SESSION=$(curl -s localhost:31337/warp/v1/sessions -H "Authorization: Bearer $TOKEN" \
-H 'Content-Type: application/json' -d '{}' | jq -r .session_id)
curl -s localhost:31337/warp/v1/sessions/$SESSION/statements -H "Authorization: Bearer $TOKEN" \
-H 'Content-Type: application/json' -d '{"sql": "SELECT 42 AS answer"}' | jq .result.kind
"rows"

That answer is a statement document. Ask for Accept: application/vnd.apache.arrow.stream and the rows themselves arrive as an Arrow IPC stream in the same response; the plain HTTP client page shows both.