Skip to main content

Module config

Module config 

Source
Expand description

Config resolution — layer 5 of ADR-0008.

The four-layer stack from ADR-0007: flag → env var → .env (CWD) → fail. .env is loaded via dotenvy::dotenv() at startup; no hard-coded default server.

By the time Config::resolve is called, the chain has already collapsed to a single Option<&str>: clap’s env = "DSP_SERVER" attribute merged the flag and env-var tiers; dotenvy::dotenv() in main populated the env from .env before clap ran. This function handles only the final two cases: expand a shortcut or literal, or fail.

Re-exports§

pub use auth_cache::AuthCache;
pub use token::ResolvedToken;
pub use token::TokenOrigin;
pub use token::resolve_token;

Modules§

auth_cache
On-disk token cache at ~/.config/dsp-cli/auth.toml. See ADR-0007 and ADR-0012.
token
Token resolution — resolves the effective bearer token from env or cache.

Structs§

Config
Resolved configuration for a single command invocation.