odoo-work-cli config¶
NAME¶
odoo-work-cli-config - Show discovered config files and merged configuration
SYNOPSIS¶
DESCRIPTION¶
Without flags, list the config files that were found, in merge order (later files override earlier ones): the global file, then every .odoo-work-cli.toml from the filesystem root down to the current directory. With --config FILE only FILE is listed. Nothing connects to Odoo.
With --merged, print the merged configuration as TOML instead: the files, then [op_secrets] resolved through 1Password, then the environment variables. The API key, the login password and the TOTP secret are left out, so the output is a valid config file.
Subcommands:
odoo-work-cli config install- Create a default config file in the platform config directory.
OPTIONS¶
--merged-
Print the merged configuration as TOML, without secrets.
flag; optional
GLOBAL OPTIONS¶
--backendBACKEND-
BACKEND: odoo or fake (offline, made-up data; env ODOO_WORK_CLI_BACKEND).
string; optional; default: odoo; env: ODOO_WORK_CLI_BACKEND
--configFILE-
Read only the config FILE (skip discovery).
string; optional
-h,--help- Print the help of the command and exit.
OUTPUT¶
"Discovered config files (merge order):" and one path per line, or "No config files discovered."; with --merged a TOML document. There is no JSON output.
ENVIRONMENT¶
XDG_CONFIG_HOME- Base directory of the global config file; default ~/.config.
ODOO_URL- Odoo server URL; overrides url from the config files.
ODOO_DATABASE- Odoo database name; overrides database.
ODOO_USERNAME- Odoo login, usually an e-mail address; overrides username.
ODOO_PASSWORD- Odoo API key, used for XML-RPC. Despite the name, not the login password.
ODOO_WEB_PASSWORD- Odoo login password, used for the web session of clock in and clock out.
ODOO_TOTP_SECRET- TOTP secret (base32 or otpauth:// URL) for accounts with two-factor authentication.
ODOO_OP_TIMEOUT- Timeout of the 1Password call that resolves [op_secrets], a Go duration; default 5s.
ODOO_WORK_CLI_NO_OP- If 1, true, yes or on, [op_secrets] is ignored and the 1Password CLI is never called.
FILES¶
~/.config/odoo-work-cli/config.toml- Global configuration ($XDG_CONFIG_HOME/odoo-work-cli/config.toml if XDG_CONFIG_HOME is set). Created by odoo-work-cli config install.
.odoo-work-cli.toml- Configuration of a directory tree. Every such file from the filesystem root down to the current directory is merged over the global file, the deepest last. --config FILE loads only FILE instead.
EXIT STATUS¶
0 on success, 1 on any error, including usage errors. The error is printed as "Error: TEXT" on standard error.
Error kinds this command can fail with:
validation- Invalid input: unknown flag, bad argument, malformed date, time or hours, a time in the future, an unknown project.
config- The local configuration is missing or invalid.
secrets_locked- 1Password is locked or unreachable, so op:// references could not be resolved.
internal- Anything else: an unexpected Odoo response or a bug.
EXAMPLES¶
Which files are read, from here:
The configuration as the other commands see it: