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.3.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.3-py3-none-any.whl
(15.1 kB
view details)
File details
Details for the file ctxd-0.1.3.tar.gz.
File metadata
- Download URL: ctxd-0.1.3.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 |
a8dc1372674890340d430cbf53d61b83deb63d8957af114d12d3af8f04ea4d5b
|
|
| MD5 |
f6d884989db0fbd9c7a4f8de8b20e51d
|
|
| BLAKE2b-256 |
62aa4abf75e544a66ce4cb755c9ed6efdc5b35a158acc42c34a62c3d22b9e456
|
File details
Details for the file ctxd-0.1.3-py3-none-any.whl.
File metadata
- Download URL: ctxd-0.1.3-py3-none-any.whl
- Upload date:
- Size: 15.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.26
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
48c20f95f73fc10836d133950a3f40f775bb1a5d38de35aab18e97ce17f36e1e
|
|
| MD5 |
fe554965e1d3b29b2d83ddfaed136960
|
|
| BLAKE2b-256 |
728b9f6e48e72074baf5c36f1c7bfdb59819ace0e570c8b25d8840efac833a27
|