Docs

CLI Reference

The CLI mirrors the hosted API surface for operators who want repeatable terminal workflows.

Install and authenticate

bashcd sdk/cli
pip install -e .

schift auth login
schift auth status

Config precedence

SCHIFT_API_KEY overrides ~/.schift/config.json. SCHIFT_API_URL overrides the default https://api.schift.io/v1 base URL.

Command groups

GroupCommandsNotes
authlogin, logout, statusStores the API key in ~/.schift/config.json unless you keep it in the environment
cataloglist, get MODEL_IDBrowse model metadata
embedschift embed TEXT --model ..., schift embed batch --file texts.jsonl --model ... [--output out.jsonl]Batch input requires JSONL lines with a text field
dbcreate, list, statsHosted collection management
queryquery TEXT --collection ... [--top-k] [--model] [--threshold]Natural-language retrieval
benchbench --source ... --target ... --data eval.jsonl [--top-k]Reads a local benchmark file and sends the path to the API
migratefit --source ... --target ... [--sample], run --projection ... --db ... [--dry-run] [--batch-size]Use --dry-run before a live database rewrite
usageusage [--period]Account summary plus optional per-model breakdown

End-to-end example

bashschift catalog list
schift embed "quarterly revenue report" --model openai/text-embedding-3-large
schift db create finance-docs --dim 3072
schift query "board summary" --collection finance-docs --top-k 5
schift bench --source openai/text-embedding-3-small --target google/gemini-embedding-001 --data ./eval.jsonl
schift migrate fit --source openai/text-embedding-3-small --target google/gemini-embedding-001 --sample 0.1
schift migrate run --projection proj_abc123 --db pgvector://user:pass@localhost/app --dry-run
  • Batch embedding input must be JSONL with one object per line and a text field.
  • migrate run masks passwords in displayed connection strings, but keep real credentials out of shell history anyway.
  • The CLI uses Rich output, so tables and key-value summaries are intended to be human-readable first.