Skip to main content

Module config

Module config 

Source
Expand description

Configuration and authentication for the ROMM client.

This module is deliberately independent of any particular frontend: both the TUI and the command-line subcommands share the same Config and AuthConfig types.

§Environment file precedence

Call load_layered_env before reading config:

  1. Variables already set in the process environment (highest priority).
  2. Project .env in the current working directory (via dotenvy).
  3. User config: {config_dir}/romm-cli/.env — fills keys not already set (so a repo .env wins over user defaults).
  4. OS keyring — secrets stored by romm-cli init (lowest priority fallback).

Structs§

Config

Enums§

AuthConfig

Functions§

keyring_store
Store a secret in the OS keyring under the romm-cli service name.
load_config
load_layered_env
Load env vars from ./.env in cwd, then from the user config file. Later files only set variables not already set (env or earlier file), so a project .env overrides the same keys in the user file.
normalize_romm_origin
RomM site URL: the same origin you use in the browser (scheme, host, optional port).
openapi_cache_path
Where the OpenAPI spec is cached (.../romm-cli/openapi.json).
persist_user_config
Write user-level romm-cli/.env and store secrets in the OS keyring when possible (same layout as interactive romm-cli init).
user_config_dir
Directory for user-level config (romm-cli under the OS config dir).
user_config_env_path
Path to the user-level .env file (.../romm-cli/.env).