Skip to content

CLI

The CLI renders documents to PDF locally, with no account and no card: it downloads Chromium the first time, validates the document, and produces the PDF on your machine. It is for local work and CI. For your app in production you use the hosted API, which is the main surface; the CLI is a handy companion for trying things out and running renders on your own machine.

Terminal window
npx kove render invoice.json -o invoice.pdf

There is nothing to install: npx handles it. If you would rather keep it around, run npm i -g kove.

Validates, compiles, and renders a document to PDF with local Chromium.

Terminal window
npx kove render <doc.json> [-o|--out <file.pdf>]
  • -o, --out · path of the output PDF (default out.pdf).
Terminal window
npx kove render invoice.json -o invoice.pdf
# ✓ invoice.pdf (28431 bytes)

If the document does not validate, it lists the errors and exits with code 1 without rendering.

Validates a document without rendering. Useful in CI.

Terminal window
npx kove validate invoice.json
# ✓ valid document (spec https://spec.kove.dev/document/v0.json)

Exits with 0 if valid, with 1 if not (listing · path: message for each error).

Signs in to kove cloud with device-flow (the same pattern as wrangler login and gh auth login): the browser opens, you sign in, and the API key comes back on its own to the terminal. You copy nothing.

Terminal window
npx kove login

Step by step:

  1. The CLI opens the login page (hosted Clerk: GitHub, Google, or email).
  2. The terminal shows you a verification code. Confirm it in the browser only if it matches (anti-phishing).
  3. You authorize in the browser.
  4. The CLI was polling; as soon as you authorize, it gets the key and saves it to ~/.kove/credentials.json.
Opening the browser to sign in to kove…
https://kove.dev/?code=WDJB-MJHT
Check that the browser shows this code: WDJB-MJHT
Waiting for you to finish signing in…
✓ session saved, you can go back to the terminal

No browser on that machine (SSH, container)? Use the manual fallback:

Terminal window
npx kove login --paste

The page shows you the key and you paste it into the terminal.

Manages your API keys (requires a session).

Terminal window
npx kove keys list # lists your keys (id and name)
npx kove keys revoke <id> # revokes a key
key_2abc… kove cli
key_2def… ci (revoked)

A key secret is shown only when you create it. Here you see metadata, not secrets.

Deletes the saved session (~/.kove/credentials.json). It does not fail if there was no session.

Terminal window
npx kove logout
# ✓ session deleted

Starts a local dev server with the same endpoints as the hosted API, so you can build against kove without touching the cloud.

Terminal window
npx kove dev [-p|--port <port>] # default 8787
# ▶ kove dev on http://localhost:8787
Variable Default What for
KOVE_API_URL https://api.kove.dev Point the CLI at another API instance (for example your kove dev).
KOVE_LOGIN_URL https://kove.dev/login Login URL for the --paste flow.
Terminal window
KOVE_API_URL=http://localhost:8787 npx kove keys list