Configuration File¶
The configuration file is a TOML file that holds the target instance address and the authentication credentials of
tlm-cli.
This file and its search paths belong to the CLI: the tlm-cloud-sdk library reads no configuration file, as described
in Session and Token Storage.
File Location¶
The CLI searches for the configuration file in the following directories, in order:
| Priority | Path |
|---|---|
| 1 | Current working directory (./) |
| 2 | ~/.config/tlm-cli/ |
| 3 | /etc/tlm-cli/ |
The first file found is used. The default filename is .config.toml. Override it with the TLM_CONFIG_FILENAME
environment variable:
The global option --config / -c skips the search and uses the given file instead:
File Format¶
[application]
instance = "your-instance.example.com"
[auth]
username = "user@example.com"
password = "your-password"
Fields¶
[application]¶
| Field | Type | Required | Description |
|---|---|---|---|
instance |
string | Yes | Hostname of the ToloMEO Manager instance, e.g. tolomeo.io. Do not include https:// or a trailing slash. |
The client derives all API base URLs from this value:
- Resource APIs:
https://apis.<instance> - Authentication:
https://accounts.<instance>
[auth]¶
| Field | Type | Required | Description |
|---|---|---|---|
username |
string | Yes | Email address used to authenticate against the instance. |
password |
string | Yes | Password for the account. |
Example¶
Create ~/.config/tlm-cli/.config.toml and fill in your actual values:
[application]
instance = "your-instance.example.com"
[auth]
username = "you@example.com"
password = "your-password"
If you are working from a cloned repository, a .config.toml.sample file is provided at the repository root as a
starting point.
Security
The configuration file contains plaintext credentials. Restrict its permissions to the owning user:
Token Cache¶
The CLI caches the login token in ~/.tlm-cli/token.json, one entry per instance and username, so it authenticates
only when no valid token is cached.
Runtime Options¶
These options control CLI behavior at runtime and are independent of the TOML config file.
| Option | Type | Default | Description |
|---|---|---|---|
--config / -c |
path | — | Use this configuration file instead of searching the paths above. |
--plain / TLM_CLI_PLAIN |
bool | false |
Emit plain JSON output; see Output Mode. |
TLM_CONFIG_FILENAME |
string | — | Filename to search for instead of .config.toml. |
Output Mode¶
| Mechanism | How to use |
|---|---|
--plain flag |
tlm-cli --plain pms devices list |
TLM_CLI_PLAIN env var |
TLM_CLI_PLAIN=1 tlm-cli pms devices list |
| Automatic (non-TTY stdout) | Pipe or redirect stdout: tlm-cli pms devices list \| jq |
When plain mode is active:
- stdout emits newline-delimited JSON: arrays for list commands, objects for show/detail commands.
- stderr emits
warning:anderror:prefixed plain-text messages. - Interactive prompts, TUI editors, progress spinners, and Rich formatting are all disabled.
Plain mode activates automatically whenever stdout is not a TTY — for example in Docker containers without an attached
terminal, CI pipelines, or shell redirects. You do not need to set --plain explicitly when piping output.
See also
- Getting Started — create your first configuration file
- Use in Scripts — pipe plain JSON output to
jqand shell scripts - Session and Token Storage — pass configuration to the
tlm-cloud-sdklibrary from your code - Architecture — how the CLI loads this file and builds its session