Skip to content

CLI

The ctxd CLI gives you full access from the terminal. Search, manage integrations, and inspect indexed data.

Terminal window
pip install ctxd
Terminal window
# Print the installed version
ctxd --version
# Prompt for an API key and store it
ctxd login
# Check whether auth is configured
ctxd status
# Logout
ctxd logout

For scripts and headless environments, set CTXD_API_KEY. Commands use it directly when it is set.

Terminal window
# Basic search
ctxd search "text:deployment"
# Filter by app, quoted or unquoted
ctxd search "text:deployment application:slack"
ctxd search text:deployment application:slack
# Boolean operators
ctxd search "text:(bug* OR issue) repo:team/backend"
# Date range
ctxd search "text:meeting date:>2025-03-01"

Search output is always JSON.

Terminal window
# Fetch full content of a document
ctxd fetch DOCUMENT_UID
# JSON output
ctxd fetch DOCUMENT_UID --json
Terminal window
# See all integrations and their status
ctxd status
# Open the app installation page
ctxd install-app
# View profile and file tree
ctxd profile
VariablePurpose
CTXD_API_KEYAPI key for scripts, CI, and headless use