Expand description
CLI appdata directory resolution.
Returns the directory that holds the legacy config.json, the session DB,
and any other CLI state. The lookup order mirrors Node CLIโs
service-container.ts so users keep one appdata location across CLI
versions:
- A
bw-datadirectory next to the running executable, if it exists (portable install). BITWARDENCLI_APPDATA_DIRenv var (if set and non-empty).- OS default:
- macOS:
$HOME/Library/Application Support/Bitwarden CLI - Windows:
%APPDATA%\Bitwarden CLI - Other:
$XDG_CONFIG_HOME/Bitwarden CLI(falling back to$HOME/.config/Bitwarden CLI)
- macOS: