@whilst/cli
v1.1.0
Published
CLI tool for managing Whilst documents and folders
Maintainers
Readme
@whilst/cli
Command-line interface for Whilst — manage documents, folders, and search your knowledge base.
Quick Start
npm install -g @whilst/cliOr run directly with npx:
npx @whilst/cliSet your API key:
export WHILST_API_KEY=whl_live_your_key_hereGet your API key from your Whilst workspace settings under "API Keys".
Verify the connection:
whilst statusCommands
| Command | Description |
|---------|-------------|
| whilst docs list | List documents |
| whilst docs get <id> | Get a document |
| whilst docs create | Create a document |
| whilst docs update <id> | Update a document |
| whilst docs delete <id> --yes | Delete a document |
| whilst docs move <id> | Move a document to a folder |
| whilst folders list | List folders |
| whilst folders get <id> | Get folder details |
| whilst folders create <name> | Create a folder |
| whilst folders tree | View folder hierarchy |
| whilst search <query> | Search documents |
| whilst web-search <query> | Search the web |
| whilst bulk move | Move multiple documents |
| whilst status | Check connection |
Run whilst --help for full usage details.
Output Formats
whilst docs list # JSON (default)
whilst docs list -t # Human-readable table
whilst docs list -q # Quiet (IDs only)
whilst docs list --fields id,title # Specific fieldsPiping & Scripting
# Create a document from a file
cat report.md | whilst docs create --folder "Reports"
# Chain commands
FOLDER_ID=$(whilst folders create "Notes" -q)
whilst docs create --content "# Hello" --folder "$FOLDER_ID"
# JSON input mode
echo '{"content":"# Doc","folder":"Eng"}' | whilst docs create --jsonEnvironment Variables
| Variable | Description |
|----------|-------------|
| WHILST_API_KEY | Your API key (required) |
| WHILST_ENDPOINT | Custom API endpoint (optional) |
| WHILST_CONFIRM | Set to true to skip --yes on deletions |
| WHILST_VERBOSE | Set to 1 for verbose logging |
Exit Codes
| Code | Meaning | |------|---------| | 0 | Success | | 2 | Usage error | | 3 | Authentication error | | 4 | Not found | | 5 | Permission denied | | 6 | Validation error | | 7 | Network error |
License
MIT
