Expand description
XDG Base Directory paths and config file (no .env at runtime).
XDG Base Directory layout for browser-automation-cli (no .env at runtime).
Canonical product paths use the directories crate:
- config:
$XDG_CONFIG_HOME/browser-automation-cli(Linux) - data:
$XDG_DATA_HOME/browser-automation-cli - cache:
$XDG_CACHE_HOME/browser-automation-cli - state:
$XDG_STATE_HOME/browser-automation-cli(when available) or data/state
Flags on the CLI override file config. Environment variables are not used for
product settings; system paths (PATH, locale) remain OS concerns.
Structs§
- Product
Config - On-disk product configuration (TOML). Flags override these at parse time.
Functions§
- browsers_
dir - Default browsers cache under XDG cache.
- cache_
dir - Cache directory (lighthouse reports, HTTP scrape cache, browsers cache).
- chrome_
path_ from_ config - Chrome/Chromium binary from XDG config only.
- config_
dir - Config directory (
…/browser-automation-cli). - config_
file - Path to the TOML config file.
- config_
get - Get one config key (or full dump when key is empty).
- config_
list_ keys - List supported XDG config keys (GAP-018).
- config_
set - Set one string key in config and persist.
- data_
dir - Data directory (sessions, journals, durable artifacts).
- encryption_
key - Load optional encryption key from XDG config only (never product env vars).
- ensure_
dir - Ensure a directory exists with restrictive permissions when possible.
- init_
layout - Create all standard XDG product directories.
- lighthouse_
path_ from_ config - Lighthouse binary path from XDG config only.
- llm_
base_ url - Optional LLM base URL from XDG config only.
- llm_
model - Optional LLM model id from XDG config only.
- load_
config - Load config from XDG path; missing file yields defaults.
- mitm_
ca_ dir - Default MITM CA directory.
- mitm_
capture_ dir - Default MITM capture directory for the invocation artifacts.
- openrouter_
api_ key - Optional LLM API key from XDG config only (never product env vars).
- paths_
snapshot - JSON snapshot of all resolved paths (for
config path/ doctor). - project_
dirs - Resolve platform project directories or a deterministic fallback under the system temp dir.
- sessions_
dir - Default sessions directory under XDG state.
- state_
dir - State directory (runtime state, workflow journal default).
- workflow_
dir - Default workflow journal directory.
- write_
config - Write config atomically (temp + rename).