Documentation Index
Fetch the complete documentation index at: https://docs.knowledgestack.ai/llms.txt
Use this file to discover all available pages before exploring further.
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.- uv (recommended)
- pipx
- pip
- From source
uv tool install builds an isolated venv and puts kscli on your PATH. Upgrade later with uv tool upgrade kscli.Get an API key in 60 seconds
Open the dashboard
Go to app.knowledgestack.ai and sign in. New users can sign up with email/password or Google SSO.
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-.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.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 formats —
table(default),json,yaml,tree,id-only - Bulk operations —
kscli folders bulk-ingest ./dir --folder-id <id>uploads entire directory trees in one shot - Semantic + full-text search —
kscli chunks search --search-type dense_only|full_text - Workflow monitoring — track ingestion with
kscli workflows list,describe,cancel,rerun - Scriptable — pipe
--format id-onlyintoxargs, pipe--format jsonintojq
Output formats
| Format | Description | Use case |
|---|---|---|
table | Rich formatted table | Interactive use (default) |
json | Pretty-printed JSON | Scripting, API debugging |
yaml | YAML output | Eyeballing config, readability |
id-only | One ID per line | Piping into other commands |
tree | Hierarchical tree view | Viewing folder / document structure |
--no-header (or -H). Set a persistent default with the KSCLI_FORMAT env var.
PathPart vs domain ID
Configuration
Resolution order: CLI flags > environment variables > config file > defaults.| Env var | Description | Default |
|---|---|---|
KSCLI_BASE_URL | API base URL | https://api-staging.knowledgestack.ai |
KSCLI_FORMAT | Default output format | table |
KSCLI_VERIFY_SSL | Enable TLS verification | true |
KSCLI_CA_BUNDLE | Custom CA certificate bundle | certifi / system default |
KSCLI_CONFIG | Config file path | ~/.config/kscli/config.json |
KSCLI_CREDENTIALS_PATH | Credentials directory | /tmp/kscli |
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

