CLICommands

l4 config

l4 config reads and writes the CLI's persistent defaults, so you do not repeat the same flags on every command. l4 keeps the config file in the platform-standard config directory (~/.config/levelfour/ on Linux/macOS, %APPDATA%\levelfour\ on Windows).

Subcommands

CommandPurpose
listShow all configuration values and where each one came from
get <key>Print one config value
set <key> <value>Set a config value
l4 config list
l4 config get default_provider
l4 config set default_provider aws

Resolution order

l4 resolves each settable value in this order. The first match wins:

  1. Command-line flag (e.g. --provider gcp)
  2. Environment variable (e.g. LEVELFOUR_API)
  3. Config file (l4 config set …)
  4. Built-in default
A flag or an environment variable outranks the config file, so a value you set with l4 config set can sit in the file and never be the one in use. An exported LEVELFOUR_API you have forgotten about sends every command to another host. l4 config list annotates each value with its source, so read that before you decide the file is wrong.

Common keys

KeyPurpose
default_providerDefault --provider for costs and recommendations
api_baseDefault API base URL (overrides built-in production URL)
  • Authentication: how l4 resolves credentials, and pointing at another API host with --api or LEVELFOUR_API
  • l4 telemetry: the opt-in flag stored alongside these settings
  • CLI overview: the flags every command accepts