hackagent.interfaces.cli.config
CLI Configuration Management
Adds CLI flags and verbosity on top of :class:hackagent.core.settings.Settings,
so the CLI resolves settings exactly like the SDK:
CLI args > Environment > Config file > Default.
API keys come from HACKAGENT_API_KEY or an explicit ${VARIABLE} file reference. The local storage default is independent of credentials.
VERBOSITY_ERROR
Only errors
VERBOSITY_WARNING
Errors and warnings
VERBOSITY_INFO
Errors, warnings, and info
VERBOSITY_DEBUG
Everything including debug
CLIConfig Objects
class CLIConfig()
CLI configuration: resolved settings plus CLI-only options.
reload
def reload() -> None
Re-resolve every value from CLI flags, environment and config file.
save
def save(path: Optional[str] = None)
Save non-secret settings and credential references.
validate
def validate()
Require a nonempty base URL. Credentials are checked during settings resolution.
require_remote
def require_remote()
Raise an error if no api_key is set (for commands that need cloud access).
source_of
def source_of(key: str) -> str
Where the current value of key came from.
set_user_override
def set_user_override(key: str, value)
Explicitly set a configuration value and track it for persistence