CLI

The khotan CLI is the first-party command-line interface for the Khotan API. It is a thin adapter over /api/v1, driven by a shared capability catalog. Adding a command updates khotan help and these pages together.

Start here

npx @khotan/cli --help

Then authenticate once. Never commit a key.

khotan auth set-key --api-url https://app.example.com --api-key khk_live_...
khotan whoami

Pin the repo to its organization so a stray machine-global profile cannot leak another customer's data:

# .env.khotan.local (git-ignored)
KHOTAN_API_URL='https://<workspace>.khotan.com'
KHOTAN_API_KEY='<org-scoped key>'
KHOTAN_ORG_ID='<org id>'

If apps list returns unfamiliar product names, stop. See errors.

What the CLI covers

khotan help and khotan <command> --help are authoritative. If a docs page and the CLI disagree, trust the CLI.