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.

Prerequisites
- Python 3.12+ (
python --version) - uv installed (
uv --version). On macOS:brew install uv. - A Knowledge Stack account at app.knowledgestack.ai — sign up with email/password or Google SSO.
The happy path
Install kscli
uv tool install builds an isolated venv and puts kscli on your PATH. Upgrade later with uv tool upgrade kscli.Create an API key

- Open app.knowledgestack.ai and sign in.
- Click your avatar (top-right) → My Account.
- Open the API Keys tab.
- Click Create API key.
- Give the key a descriptive label —
kscli on macbook,kscli ingest job, etc. - Copy the key now. It is shown exactly once.
Log in

ksclicallsGET /users/mewith the key as a bearer token.- On success, the key is written to
/tmp/kscli/.credentialswith mode0600. - The resolved base URL and TLS settings are saved to
~/.config/kscli/config.json. - You should see
Logged in successfully (https://api-staging.knowledgestack.ai).
Find a folder to put documents in
Every document lives under a folder. Every tenant has a root folder; you can create subfolders.Pick a folder and grab its Create a dedicated subfolder for this tutorial:Save the
path_part_id — not id. The two are different UUIDs; see the note at the bottom of this page.path_part_id from the response — the next step needs it.Ingest a document

kscli returns immediately with the new document’s id and a workflow handle.Watch the workflow progress:completed, the document is fully indexed and searchable. Small PDFs take seconds; large ones take a minute or two.Run your first semantic search

content column holds the actual text that matched. Try:Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
Not authenticated. Run: kscli login --api-key <key> | No credentials file | Run kscli login --api-key ... |
Exit code 2, Session expired... | Key revoked or invalid | Create a new key in the dashboard and re-login |
SSL certificate verification failed | Self-signed backend / corporate proxy | Set KSCLI_CA_BUNDLE or KSCLI_VERIFY_SSL=false for dev |
kscli: command not found after install | uv tool bin directory not on PATH | Run uv tool update-shell and open a new terminal |
Ingestion stuck in running | Worker not picking up tasks | kscli workflows describe <id> and check backend logs |
422 on folders create | Passed a folder id where a path_part_id is required | Use --format yaml on describe to see both |
PathPart vs domain ID
Next steps
Recipes
Bulk ingest, shell scripts, CI pipelines, multi-environment setups
Authentication
Credential storage, TLS, exit codes
Commands
Full reference for every resource and verb
Configuration
Env vars, config file, precedence rules
