Shared core for Paradigx product CLIs — OAuth device-flow, token cache, HTTP client
Project description
paradigx-cli-core
Shared core for Paradigx
product CLIs (botu, tokenroute, ...).
This is a library, not a CLI — it has no command entry point. Product CLIs depend on it and keep only their command layer.
What it provides
- OAuth device-flow login against Logto (
auth,device_flow) - Shared token cache at
~/.paradigx/auth.json, keyed by API URL, so one login is reused across every Paradigx CLI (config) - Automatic JWT refresh — cached tokens are transparently renewed via
the stored refresh token (
auth.valid_access_token) - HTTP client with per-product trailing-slash / redirect handling
(
client) --jsonoutput helpers — rich tables for humans, JSON for agents (output)
Usage (by a product CLI)
from paradigx_cli_core import do_login, valid_access_token, request
# login
do_login("https://botu.io/api/auth/discovery/", "https://botu.io",
on_code=lambda c: print("visit", c.verification_uri_complete))
# authenticated call (auto-refreshes the token)
token = valid_access_token("https://botu.io")
sites = request("GET", "https://botu.io", "/api/sites",
token=token, trailing_slash=True)
See docs/specs/cli-phase-b.md in the workspace repo for the design.
© 2026 Paradigx. All Rights Reserved.
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 paradigx_cli_core-0.1.0.tar.gz.
File metadata
- Download URL: paradigx_cli_core-0.1.0.tar.gz
- Upload date:
- Size: 10.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
47e6761e3cda79fe3bbf915e939e577203ae5fd5b77259f8a79eeae00795f595
|
|
| MD5 |
c82f400b0377e0aedcd36fdb2ca76d0c
|
|
| BLAKE2b-256 |
e0be05c00d9e550bd6217af3449714d95003478b5edd3eeb498acf922eb4c778
|
File details
Details for the file paradigx_cli_core-0.1.0-py3-none-any.whl.
File metadata
- Download URL: paradigx_cli_core-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d90598c9dcb7e296b4fd7bfafce9ee9564226dee61197baa346ef143fa73251a
|
|
| MD5 |
5e10280dc47623ce84f3bd2c189438fa
|
|
| BLAKE2b-256 |
cbc4f4f1b0f7d4e1ccd36a79a5843e6caf2c4d4d105fc35937cd73584f2e805b
|