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:
- Run
ctxd loginwith the CLI to store OAuth credentials in a secure local store - The CLI starts a device-style login session through the backend auth API
- The browser flow continues on
https://app.ctxd.dev/cli-login, so login can finish on a different machine than the terminal session - The backend dynamically registers the CLI session with the MCP authorization server and completes the OAuth callback server-side
- The SDK keeps only non-secret metadata in
~/.ctxd/config.json - The SDK reads the stored access token and refreshes it automatically when needed
- Tokens are loaded from the OS keychain when available, otherwise from an encrypted local credential store unlocked with a passphrase entered interactively or provided through
CTXD_PASSPHRASE
Base URL resolution order:
base_url=passed to the clientCTXD_BASE_URL~/.ctxd/config.jsonhttps://mcp.ctxd.dev
Auth API URL resolution order:
CTXD_AUTH_API_URLhttps://api.ctxd.dev
Example:
from ctxd import Client
client = Client()
results = client.search("text:deployment application:slack")
profile = client.get_profile()
document = client.fetch_document("doc-123")
Async example:
from ctxd import AsyncClient
async with AsyncClient() 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
ctxd-0.1.1.tar.gz
(12.1 kB
view details)
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
ctxd-0.1.1-py3-none-any.whl
(15.0 kB
view details)
File details
Details for the file ctxd-0.1.1.tar.gz.
File metadata
- Download URL: ctxd-0.1.1.tar.gz
- Upload date:
- Size: 12.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.26
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c4528077dfea9d354e22df0ce5bc7049842941c473f8d215998fdb3656faa4e2
|
|
| MD5 |
633d4dcce155f94763b45e18c139e664
|
|
| BLAKE2b-256 |
a248d47d97a393b17afff8f3ef00e14894f7c35d0539f5452e159ef6eb63a03b
|
File details
Details for the file ctxd-0.1.1-py3-none-any.whl.
File metadata
- Download URL: ctxd-0.1.1-py3-none-any.whl
- Upload date:
- Size: 15.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.26
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
873f077b2f7b4bf86a0d37b45e8f858a7afd38b30e7ff0411a68936162b9605e
|
|
| MD5 |
33e388c46dc7df09eb083471659e0f19
|
|
| BLAKE2b-256 |
070f4baa3465f68c375c6df78e7cb34cb2f1d6771048ce6f1e9d27e3a85d4cb0
|