Public Python SDK and CLI for the ctxd platform.
Project description
ctxd
Public Python SDK and CLI for the ctxd platform.
Install:
pip install ctxd
The SDK exposes sync and async clients:
ClientAsyncClient
Authentication:
- Preferred for headless and scripts: create a user-bound API key through the authenticated application backend
- For CLI automation, set
CTXD_API_KEY - The SDK sends that key as the bearer token directly to the MCP server
ctxd loginprompts for an API key interactively and stores it in plaintext in the ctxd config directory for future CLI and SDK usagectxd statuschecks whether an API key is available from the active authentication source
CLI manual:
export CTXD_API_KEY=... # Use env-based auth for this shell/session
ctxd --version # Print the installed ctxd version
ctxd login # Prompt for an API key and store it
ctxd status # Check whether an API key is configured
ctxd install-app # Open the app installation page
ctxd search "text:deployment"
ctxd search text:test application:slack
ctxd fetch doc-123
ctxd profile
ctxd logout # Remove the stored API key
CTXD_API_KEY does not require ctxd login. Commands such as ctxd search, ctxd fetch, and ctxd profile use the environment variable directly when it is set.
Stored login credentials are written in plaintext to ~/.ctxd/credentials.json by default. Set CTXD_CREDENTIALS_PATH to override that location.
Base URL resolution order:
base_url=passed to the clientCTXD_BASE_URL~/.ctxd/config.jsonhttps://mcp.ctxd.dev
Example:
from ctxd import Client
client = Client(api_key="297e24c4-4ee9-4739-828f-48f57f48ce11")
results = client.search("text:deployment application:slack")
profile = client.get_profile()
document = client.fetch_document("doc-123")
API key example:
from ctxd import Client
client = Client(api_key="297e24c4-4ee9-4739-828f-48f57f48ce11")
results = client.search("text:deployment application:slack")
Async example:
from ctxd import AsyncClient
async with AsyncClient(api_key="297e24c4-4ee9-4739-828f-48f57f48ce11") as client:
results = await client.search("text:deployment")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ctxd-0.1.12.tar.gz.
File metadata
- Download URL: ctxd-0.1.12.tar.gz
- Upload date:
- Size: 9.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.26
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d5fba0ed03c719d3c896bf6870a93009691a0f11334a2b38c4a9a0ad3f44f592
|
|
| MD5 |
463833f85667b354a9fbae7630afe87b
|
|
| BLAKE2b-256 |
20926126b261232f83ddb403479727646837e9b30c427b8b9bac63ce92d1618d
|
File details
Details for the file ctxd-0.1.12-py3-none-any.whl.
File metadata
- Download URL: ctxd-0.1.12-py3-none-any.whl
- Upload date:
- Size: 12.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.26
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6fa55acc5925a55c4a2440349ab1f9b65fc8ea8aa67780938e0ed5970d3e9626
|
|
| MD5 |
39d7588ebdee9288a104332756a72fd6
|
|
| BLAKE2b-256 |
089f889c1b6d6e8003db3e84c8cf9b735aa2c076216a73070a6c96acd555b5a2
|