Skip to main content

TokenSaver CLI — route AI agents (Claude Code, Cursor, Codex) through the SaaS control plane

Project description

TokenSaver CLI (tokensaver-cli)

Console command tokensaver to route AI agents through the TokenSaver SaaS control plane (api.tokensaver.fr) — cache, compression, PII, MCP gateway, observability.

Companion package to tokensaver-sdk (Python API client). The CLI configures your local machine; the pipeline runs on TokenSaver servers.

Get started: sign up at platform.tokensaver.fr, create a ts_… API key, then:

pip install tokensaver-cli
export TOKENSAVER_API_KEY=ts_your_key
tokensaver route claude --launch
tokensaver doctor

Installation

pip install tokensaver-cli

Development inside the monorepo:

cd packages/cli
python -m venv .venv && . .venv/bin/activate
pip install -e ".[dev]"

Requirements: Python ≥ 3.10, no extra runtime dependencies (stdlib only).

Commands

Command Purpose
tokensaver route claude Configure Claude Code (~/.claude/settings.json + .mcp.json)
tokensaver route claude --launch Configure + start claude
tokensaver route cursor Write .cursor/mcp.json + print Override URL steps
tokensaver route codex Print OpenAI-compat env vars for Codex
tokensaver route proxy Show base URLs for LangChain / OpenAI SDK / your code
tokensaver unroute <target> Restore backed-up config
tokensaver doctor Check API key and SaaS endpoint reachability

SaaS defaults (no local server)

Surface URL
API https://api.tokensaver.fr
OpenAI-compat https://api.tokensaver.fr/openai/v1
Anthropic-compat https://api.tokensaver.fr/anthropic
MCP tools https://mcp.tokensaver.fr/mcp
MCP gateway https://gateway.tokensaver.fr/mcp

Override with TOKENSAVER_API_URL, TOKENSAVER_MCP_URL, etc. if you use a private deployment.

Environment

export TOKENSAVER_API_KEY=ts_…   # required
# optional scope for MCP gateway headers:
export X-Organisation-ID=export X-Workspace-ID=

Related packages

PyPI package Role
tokensaver-cli This package — tokensaver route / doctor
tokensaver-sdk Python API client — TokenSaver(api_key=…).ask(…)

API reference (public): tokensaver.fr/sdk-api

Tests

cd packages/cli && pip install -e ".[dev]" && pytest -q

Publishing to PyPI

Maintainers: see docs/PYPI-CLI-RELEASE.md.

Tag format: cli-vX.Y.Z (version in src/tokensaver_cli/__init__.py).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tokensaver_cli-0.1.3.tar.gz (15.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tokensaver_cli-0.1.3-py3-none-any.whl (14.7 kB view details)

Uploaded Python 3

File details

Details for the file tokensaver_cli-0.1.3.tar.gz.

File metadata

  • Download URL: tokensaver_cli-0.1.3.tar.gz
  • Upload date:
  • Size: 15.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for tokensaver_cli-0.1.3.tar.gz
Algorithm Hash digest
SHA256 8ed79d8cc76f9c163922736443ba1021ce529e3e17ecac531cf577e51af8b6f5
MD5 89d31ceedd3741aefae9bb9e737b5e5b
BLAKE2b-256 e588330671fd98dee58c48dc7666fd22649f0d115df785c712c9271c7d8c8c50

See more details on using hashes here.

File details

Details for the file tokensaver_cli-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: tokensaver_cli-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 14.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for tokensaver_cli-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 5298c7f6e1969b625a98f4ab002b840b8a722a0a0bd9f3b25abbcfa82df8fa5c
MD5 4de5a97d197b8842d002e477fac18164
BLAKE2b-256 cd1aed283e20a89e7bf887280b1ebbcf65d0ff96e8cfebebb26e1607294c7961

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page