Skip to main content
kscli 45-second demo — click to play

▶ Watch the 45-second demo — from uv tool install to semantic search

kscli is the official command-line interface for Knowledge Stack. It wraps the auto-generated ksapi Python SDK with a resource-first routing pattern (kscli <resource> <verb>, e.g. kscli folders list, kscli documents ingest) and a Click-based UX designed for humans and scripts.

Start here

Quickstart

Zero to first semantic search in under two minutes. Includes dashboard screenshots for API key creation.

Authentication

How to create an API key, how kscli login stores it, TLS, and exit codes.

Commands

Full reference for every resource group and verb — folders, documents, chunks, tags, workflows, threads, and more.

Recipes

Bulk ingest, shell scripts, CI pipelines, pipe-into-jq tricks, multi-environment setups.

Install

Requires Python 3.12+ and uv.

Get an API key in 60 seconds

1

Open the dashboard

Go to app.knowledgestack.ai and sign in. New users can sign up with email/password or Google SSO.
2

Open My Account → API Keys

Click your avatar (top-right) → My AccountAPI Keys tab.
3

Create and copy the key

Click Create API key, give it a descriptive label (e.g. kscli on my laptop), and copy the key immediately — it is shown exactly once. Keys begin with sk-user-.
4

Log in from the terminal

kscli validates the key by calling /users/me, stores it at /tmp/kscli/.credentials with mode 0600, and records the resolved base URL in ~/.config/kscli/config.json.
5

Verify

Revoke a key at any time from the same dashboard page. See Authentication for the full auth model and TLS options.

Two-minute quickstart

Full walkthrough →

Step-by-step quickstart with embedded screencasts for each step.

Key features

  • Resource-first commands — every resource (folders, documents, chunks, tags, workflows, …) has consistent verbs: list, describe, create, update, delete
  • Multiple output formatstable (default), json, yaml, tree, id-only
  • Bulk operationskscli folders bulk-ingest ./dir --folder-id <id> uploads entire directory trees in one shot
  • Semantic + full-text searchkscli chunks search --search-type dense_only|full_text
  • Workflow monitoring — track ingestion with kscli workflows list, describe, cancel, rerun
  • Scriptable — pipe --format id-only into xargs, pipe --format json into jq

Output formats

Suppress table headers with --no-header (or -H). Set a persistent default with the KSCLI_FORMAT env var.

PathPart vs domain ID

Every folder has two UUIDs:
  • id — the folder’s record ID. Use with describe, update, delete.
  • path_part_id — its position in the folder tree. Use with anything that needs a parent — creating a child folder, ingesting a document under the folder, scoping a search.
kscli folders describe ... --format yaml prints both so you can copy the right one.

Configuration

Resolution order: CLI flags > environment variables > config file > defaults. Point at a different environment for a single command:
Full reference: Configuration.

Where to next

Quickstart →

Step-by-step with screenshots

Authentication →

API keys, credential storage, TLS

Commands →

Every resource and verb

Configuration →

Env vars and precedence

Recipes →

Bulk ingest, CI, scripting tricks

GitHub →

Source, issues, releases