The CLI resolves settings in this order:Documentation Index
Fetch the complete documentation index at: https://docs.tensormesh.ai/llms.txt
Use this file to discover all available pages before exploring further.
- CLI flags
- Environment variables
~/.config/tensormesh/config.toml- Built-in defaults
--controlplane-base,
TENSORMESH_CONTROL_PLANE_BASE_URL, or top-level controlplane_base in
config.toml.
If you need an alternate local state root for scripting or side-by-side environments, set TM_CONFIG_HOME. That moves both config.toml and auth.json together under the directory you choose.
Within config.toml, inference credentials live under [overrides].
Use tm config show --sources when you need to confirm which layer actually won for each value.
Create A Starter Config
Canonical Config File
The standard persistent CLI setup lives in:~/.config/tensormesh/config.toml
Or, when TM_CONFIG_HOME is set:
- config:
$TM_CONFIG_HOME/config.toml - auth:
$TM_CONFIG_HOME/auth.json
tm config init creates the file with user-owned request settings plus an
[overrides] section for the optional inference API key.
Config File Schema
The starter template is the real schema the CLI understands today:controlplane_base: optional Control Plane base URL override for auth and other Control Plane commandstimeout_seconds: default HTTP timeout for commands that use the shared request clientmax_retries: default retry count for idempotent requestsca_bundle: optional PEM CA bundle path for TLS verification
[overrides] keys:
gateway_api_key: stored serverless inference API key. The name staysgateway_api_keyfor config compatibility. The SDK reads the same value asinference_api_key.
Single-File Design
The CLI uses a single canonical config file. If you want to change behavior manually, edit[overrides] in ~/.config/tensormesh/config.toml instead of switching between named profiles or maintaining a separate runtime file.
If you want that same single-file design in a different local root, set TM_CONFIG_HOME instead of introducing another profile layer.
Example:
tm doctor, tm infer doctor, and tm auth status report local config and credential presence. Use tm auth whoami when you need a live Control Plane auth check.
Interpreting config show --sources
Use --sources when debugging precedence:
values: resolved config after redacting secrets such asgateway_api_keysources: where each value came from, such asconfig:timeout_secondsorconfig:gateway_api_key
built-in:config_path: CLI defaultTENSORMESH_CONTROL_PLANE_BASE_URL: environment override for the Control Plane base URLconfig:controlplane_base: explicit top-level Control Plane host fromconfig.tomlconfig:gateway_api_key: explicit user override from[overrides]inconfig.toml
tm config show and tm config show --sources redact secrets such as
gateway_api_key in both text and JSON output. That is intentional.
Environment Variables
| Variable | Overrides flag | Description |
|---|---|---|
TENSORMESH_CONTROL_PLANE_BASE_URL | --controlplane-base | Override the Control Plane base URL for CLI auth and Control Plane requests. |
TENSORMESH_CA_BUNDLE | --ca-bundle | Path to a PEM CA bundle for TLS verification. |
TENSORMESH_TIMEOUT_SECONDS | --timeout | Default HTTP timeout in seconds. |
TENSORMESH_MAX_RETRIES | --max-retries | Max retries for idempotent requests on transient errors. |
TM_CONFIG_HOME | — | Override the config and auth root directory. Moves both config.toml and auth.json to $TM_CONFIG_HOME/. |
gateway_api_key does not have an environment variable equivalent in the CLI. Set it in [overrides] in config.toml.
If you need an environment-variable-only credential workflow without a config file, use the Tensormesh SDK instead, which supports TENSORMESH_INFERENCE_API_KEY and related credential variables.

