Skip to content

CLI Reference

The Schift CLI provides a terminal-first interface for workspace operations such as uploading files, searching buckets, running embedding benchmarks, and inspecting usage.

There are two packages that share the schift executable name:

PackageSurfaceUse for
schift-cli (Python)Canonical, maintainedBuckets, upload, search, catalog, embeddings, jobs, usage, benchmarks, migrations
@schift-io/cli (npm)Compatibility-onlyLegacy deploy, provider, agent, AWP, and memory workflows

Note: New terminal workflows should use the Python schift-cli. The npm CLI intentionally redirects canonical data commands such as upload, search, catalog, and migrate to the Python CLI with an install hint.

Terminal window
python3 -m pip install schift-cli

For local development from the repository:

Terminal window
cd clients/sdk/cli
python3 -m pip install -e '.[dev]'

The package installs a schift executable through the pyproject.toml console entry point.

Terminal window
npm install -g @schift-io/cli

Use this only when you need the older TypeScript-only command surface such as schift deploy, schift providers, or schift agent.

Authenticate interactively or through environment variables.

Terminal window
# Interactive login — stores the API key in ~/.schift/config.json
schift auth login
# Inspect the current authentication source
schift auth status
# Remove the stored key
schift auth logout

The CLI resolves credentials in this order:

  1. SCHIFT_API_KEY environment variable
  2. ~/.schift/config.json

If both are present, the environment variable wins. The config file is written with 0600 permissions.

The API base URL is resolved from SCHIFT_API_URL. The CLI does not assume a production origin when this variable is missing, so set it explicitly for local, staging, or hosted workspaces.

Terminal window
export SCHIFT_API_KEY=sch_your_key_here
export SCHIFT_API_URL=http://localhost:8080/v1
CommandPurpose
schift auth ...Manage local authentication state
schift catalog ...Browse supported embedding models
schift embed ...Generate embeddings from text
schift bench ...Evaluate migration quality between two models
schift migrate ...Fit projections and run quote/start/status database migrations
schift db ...Create, list, and inspect buckets
schift upload ...Upload files into a bucket
schift jobs ...Inspect, reprocess, and cancel ingest jobs
schift search ...Run bucket search
schift query ...Compatibility alias for search
schift usage ...Show aggregated usage and billing summary
CommandPurpose
schift auth login|logout|statusAuthenticate or clear stored credentials
schift deployLegacy deploy compatibility (upload data, create bucket)
schift agent callCall a deployed agent query endpoint
schift awp publish-packPublish first-party AWP YAML pack(s)
schift providers setConfigure org-level LLM provider access
schift remember, ask, ingestLegacy memory workflows
Terminal window
schift auth login
schift upload ./handbook.pdf --bucket company-docs
schift jobs list --bucket company-docs
schift search "revenue report" --bucket company-docs --top-k 5
Terminal window
schift catalog list
schift catalog get openai/text-embedding-3-large
schift embed "quarterly revenue report" --model openai/text-embedding-3-large
Terminal window
schift embed batch \
--file ./texts.jsonl \
--model google/gemini-embedding-004 \
--output ./embeddings.jsonl

Input format:

{"text":"First document"}
{"text":"Second document"}

Output format:

{"text":"First document","embedding":[0.123,0.456]}
{"text":"Second document","embedding":[0.789,0.012]}
Terminal window
schift bench \
--source openai/text-embedding-3-large \
--target google/gemini-embedding-004 \
--bucket-source ./bucket-source.npy \
--bucket-target ./bucket-target.npy \
--query-source ./query-source.npy \
--query-target ./query-target.npy \
--bucket-document-id doc_1 \
--bucket-document-id doc_2 \
--top-k 10

Use bench as a safety gate before a live migration. Low recall should block rollout.

Terminal window
schift migrate fit \
--source openai/text-embedding-3-large \
--target google/gemini-embedding-004 \
--source-embeddings ./source.npy \
--target-embeddings ./target.npy \
--project-name docs-migration
schift migrate quote --from 'pgvector://user:password@localhost:5432/app?table=docs'
schift migrate start \
--from 'pgvector://user:password@localhost:5432/app?table=docs' \
--to schift://bucket_abc123

Note: migrate run is retired because the public API no longer exposes /migrate/run. Use migrate quote, migrate start, and migrate status instead.

VariablePurpose
SCHIFT_API_KEYAPI key for authentication. Takes precedence over ~/.schift/config.json.
SCHIFT_API_URLBase URL for the Schift API, for example http://localhost:8080/v1.
  • Authentication failures print a direct action message telling you to run schift auth login.
  • Connection failures mention the resolved API URL and suggest checking SCHIFT_API_URL.
  • API errors exit non-zero and surface server-provided detail text when available.
  • Empty result sets are handled as normal output, not crashes.