Skip to main content

Module config

Module config 

Source

Structsยง

ConfigFile
On-disk shape of the CLIโ€™s legacy server-URL config, written by bw config server and read by bw status when no user is logged in.

Enumsยง

ConfigCommand

Constantsยง

DEFAULT_SERVER_URL ๐Ÿ”’
Cloud server URL reported when none has been configured, matching the Node CLIโ€™s default region.

Functionsยง

collapse_default_alias ๐Ÿ”’
Reproduces Node CLIโ€™s literal-string check in config.command.ts: the strings "null", "bitwarden.com", and "https://bitwarden.com" collapse to a missing server (i.e. fall back to the default cloud URL on read).
config_json_path ๐Ÿ”’
format_url ๐Ÿ”’
Reproduces Node CLIโ€™s formatUrl from default-environment.service.ts: empty input collapses to None, trailing slashes are stripped, https:// is prepended when no scheme is present, and surrounding whitespace is trimmed.
read_config_json
Reads the config JSON from disk
read_config_json_from ๐Ÿ”’
resolve_server_url ๐Ÿ”’
The base server URL saved by bw config server <url>, or DEFAULT_SERVER_URL when unset.
write_config_json
Writes the config JSON to disk, creating parent directories as needed
write_config_json_to ๐Ÿ”’