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.0.tar.gz (13.1 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.0-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tokensaver_cli-0.1.0.tar.gz
  • Upload date:
  • Size: 13.1 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.0.tar.gz
Algorithm Hash digest
SHA256 3a185adc8ae8898e3fdee7e55c1a8f1a2292e75fcf6b574e34b263dc28d5d8cb
MD5 d070967529ee7913d72d9c7c9b7c378d
BLAKE2b-256 473aecc813a744c0852bb54ea1d11ea59d07a68de991a376726eaa4e25567bb0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tokensaver_cli-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 13.3 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1584e42ce0f5f56a6c7f202df84c481960f471cd79ce89c135be2570e6cc6b18
MD5 60738526d12378d2f1c818e961ee5d24
BLAKE2b-256 8d6e8a7c694c8bc485a1325f363b1afc776a1524d8ad1c472dc05e80ef905eed

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