Skip to main content
Bulk ingesting a directory of PDFs
Every snippet assumes you’ve already run kscli login. For the happy path, see the Quickstart.

Bulk ingest a directory of PDFs

The folders bulk-ingest verb uploads every file in a local directory to a target folder in one shot.
Pair with kscli workflows list --limit 50 to watch the ingestion workflows drain.

Search from a shell script

Usage:

Pipe IDs into another command

--format id-only emits one ID per line — perfect for xargs.

Extract the top search hit as structured data

Ingest a document and wait for it to be searchable

Run a search from GitHub Actions

Store the key in repository secrets as KSCLI_API_KEY and the folder ID in repository variables as KSCLI_FOLDER_ID.

Copy a document between folders (by re-ingesting)

There is no move verb — download the source file locally, then ingest under the new folder.

Switch between local dev and prod quickly

Keep credentials for each environment in separate directories:
Wrap the two in shell functions (kscli-local, kscli-prod) to flip between them.

YAML for config review, table for humans, JSON for scripts

Troubleshoot a stuck ingestion

See also

Quickstart

The happy path for new users

Authentication

API key flow, credential storage

Commands

Every resource and verb

Configuration

Env vars, precedence, TLS