CLI
Install the CaptureKit CLI SDK and make your first API call.
The official CaptureKit command-line interface, with one command per endpoint.
Requirements
- Node.js 20+
Install
npm install --global @capturekitdev/cli
capturekit --helpnpx @capturekitdev/cli --helpGet your API key
Copy your API key from the CaptureKit dashboard and set it in the CAPTUREKIT_API_KEY environment variable, which the SDK reads by default. Keep it out of source control.
export CAPTUREKIT_API_KEY="YOUR_API_KEY"$env:CAPTUREKIT_API_KEY = "YOUR_API_KEY"Usage
capturekit content --url https://example.comcapturekit content --help # parameters of one command
capturekit endpoints # every command and its HTTP path
capturekit endpoints search # filter the listcapturekit capture --url https://example.com --format png -o screenshot.pngecho '{"url": "https://example.com"}' | capturekit content --params -
capturekit content --params params.json --compactcapturekit request get /v1/usage
capturekit request post /v1/some/new/endpoint --params body.jsoncapturekit content --url https://example.com | jq .Exit codes
0: success1: API or network failure2: invalid usage, such as an unknown command, a missing API key or a missing parameter
Links
- Package:
@capturekitdev/cli - Source code: github.com/capturekitdev/capturekit-cli
- API reference