Skip to content

tld config

View Markdown

tld config is the management interface for your global configuration file.

Terminal window
tld config

Where is your global config file?

/Users/you/.config/tldiagram/tld.global.yaml
tld config path

See everything that’s currently configured:

Terminal window
tld config list
KEY VALUE SOURCE ENV DESCRIPTION
server_url https://tldiagram.com file TLD_SERVER_URL tlDiagram cloud/server URL used by sync commands.
api_key ******** file TLD_API_KEY API key used to authenticate with tlDiagram.
serve.host 127.0.0.1 default TLD_HOST Host address for the local web server.
serve.port 8060 file PORT Port for the local web server.
...

Each row shows the effective value, where it came from (config file, environment variable, or built-in default), and whether it’s a secret. To see secret values unmasked:

Terminal window
tld config list --show-secrets

Read one specific value:

Terminal window
tld config get serve.port
# 8060
tld config get server_url
# https://tldiagram.com

Change a value:

Terminal window
tld config set serve.port 9090
# Set serve.port
tld config set apply.target local
# Set apply.target

Reset the global config file to defaults:

Terminal window
tld config reset

Check your config and environment overrides for issues:

Terminal window
tld config validate
# Global config valid.

If there are problems, it lists them.

All config subcommands support --format json:

Terminal window
tld config list --format json
[
{
"key": "server_url",
"value": "https://tldiagram.com",
"source": "file",
"env": "TLD_SERVER_URL",
"description": "tlDiagram cloud/server URL used by sync commands.",
"secret": false
}
]

See the full configuration reference for every key, what it does, and its defaults.

Quick categories:

  • server_url, api_key, org_id — cloud connection
  • apply.target — where CLI commands apply
  • serve.host, serve.port, serve.data_dir — local server
  • validation.* — architectural warning strictness
  • index.tools.* — external SCIP indexers
  • map.* — tld index --map grouping and budgets

When to use this vs editing the file directly

Section titled “When to use this vs editing the file directly”

tld config is convenient and validates input — the recommended way to change settings.

For bulk edits or setting up a new machine from a template, editing ~/.config/tldiagram/tld.global.yaml directly is fine too. Just run tld config validate afterward.