Skip to main content
The Tensormesh CLI, tm, covers two surfaces:
  • Control Plane workflows such as authentication, models, users, billing, support, logs, and metrics.
  • Inference API workflows for shared OpenAI-compatible Serverless and On-Demand endpoints, with explicit X-User-Id routing on On-Demand.
Use the guides below for end-to-end tasks. Use the generated reference pages when you need exact flags, arguments, and related commands. The authentication guide covers both browser login and automation-safe token usage. Install the CLI first with Installation if tm is not already on your PATH. The examples below assume tm is available on your PATH. If you are working from this repo checkout without activating a shell that already exposes tm, use ./.venv/bin/tm.

Choose A Starting Path

Use the serverless path when you already know the model name you want:
tm version
tm infer chat \
  --surface serverless \
  --api-key YOUR_INFERENCE_API_KEY \
  --model YOUR_SERVERLESS_MODEL_NAME \
  --json '[{"role":"user","content":"Say hello."}]'
If you have Control Plane access for the same Tensormesh environment and need to discover a serverless model name first, run tm auth login, then tm billing pricing serverless list, and copy the returned pricing[].model value. For the other verified serverless endpoints, use the same --api-key and --model flow:
tm infer models --api-key YOUR_INFERENCE_API_KEY
tm infer responses --api-key YOUR_INFERENCE_API_KEY --model YOUR_SERVERLESS_MODEL_NAME --json '{"input":"Say hello."}'
Use the On-Demand path when you want the standard CLI-assisted setup flow:
tm version
tm auth login
tm init --sync
tm config show --sources
tm infer doctor
tm auth whoami
If you do not already know a valid serverless model name, use tm billing pricing serverless list first or use the On-Demand flow above. For a first gateway request after setup:
tm infer chat --json '[{"role":"user","content":"Say hello."}]'

Guides

Reference