Skip to main content
The Whilst CLI provides fast, scriptable access to documents, folders, and search directly from your terminal. Zero dependencies, single 32KB binary.

Installation

Requirements: Node.js 20+

Authentication

Three ways to authenticate, in priority order:
1

Interactive login (recommended)

Run whilst auth login and paste your API key when prompted. Credentials are stored securely in ~/.config/whilst/credentials.json and persist across sessions.
Or pass the key directly:
2

Environment variable

Set WHILST_API_KEY for session-wide access. Add to your shell profile (~/.bashrc, ~/.zshrc) to persist.
3

Per-command flag

Use --api-key to override for a single command.
Get your API key from Settings → API Keys. Keys start with whl_live_ (production) or whl_test_ (testing). Verify the connection:
Use whilst auth login instead of environment variables — it’s simpler and persists automatically.

Commands

Auth

Documents

List documents with optional filtering.
Get full document content and metadata.
Create a document from inline content, a file, or piped stdin.
Content resolution order: --file > --content > stdin.
Update specific fields of a document.

Folders

View the full folder hierarchy.
Table output:
Search the web for current information with AI-synthesized answers and citations.

Bulk Operations

Status

Returns connection status and CLI version. Use to verify your API key is valid.

Output Formats

All commands support multiple output formats:
Data goes to stdout, errors go to stderr — safe for piping. Colors are automatically disabled when output is piped or the NO_COLOR environment variable is set.

Scripting & Piping

The CLI is designed for scripting and automation:

Environment Variables

Exit Codes

Global Options

UX Features

The CLI includes several quality-of-life features:
  • Colors — Table output uses colored headers, IDs, and dates for readability. Automatically disabled in non-TTY environments or when NO_COLOR is set.
  • Spinners — Network requests show a spinner on stderr so you know the CLI is working.
  • Did-you-mean — Mistyped commands get helpful suggestions (e.g., whilst dcs list → “Did you mean docs?”).
  • Actionable errors — Error messages include what to do next, not just what went wrong.