CaptureKit

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 --help
npx @capturekitdev/cli --help

Get 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.com
capturekit content --help     # parameters of one command
capturekit endpoints                # every command and its HTTP path
capturekit endpoints search         # filter the list
capturekit capture --url https://example.com --format png -o screenshot.png
echo '{"url": "https://example.com"}' | capturekit content --params -
capturekit content --params params.json --compact
capturekit request get /v1/usage
capturekit request post /v1/some/new/endpoint --params body.json
capturekit content --url https://example.com | jq .

Exit codes

  • 0: success
  • 1: API or network failure
  • 2: invalid usage, such as an unknown command, a missing API key or a missing parameter

On this page