How 1Password CLI detects configuration directories
1Password CLI configuration directories default to:
${XDG_CONFIG_HOME}/op
when${XDG_CONFIG_HOME}
is set~/.config/op
when${XDG_CONFIG_HOME}
is not set
1Password CLI detects the configuration directory to read or write to in this order of precedence:
- A directory specified with
--config
- A directory set with the
OP_CONFIG_DIR
environment variable. ~/.op
(following go-homedir to determine the home directory)${XDG_CONFIG_HOME}/.op
~/.config/op
(following go-homedir to determine the home directory)${XDG_CONFIG_HOME}/op