Zerops CLI Configuration
For a comprehensive reference of all available commands, see the Commands Reference page.
Configuration Overview​
You can configure default values for zCLI commands using the following methods (in order of increasing precedence):
This precedence order means that command-line flags will override environment variables, which will override settings in configuration files.
Configuration Files​
zCLI supports configuration via YAML files in the following locations:
- Global config (user home):
~/.config/zerops/zcli.yaml
or~/zerops/zcli.yaml
- Project-specific config:
./.zcli.yaml
in the root of your application repository
The system first loads the global config file, then merges in the project-specific config if it exists:
- Settings unique to the global config are preserved
- Settings in the project-specific config will override any duplicate keys from the global config
Configuration File Examples​
Global config file:
Project-specific file:
Environment Variables​
Standard Environment Variables​
Any flag can be set via environment variables by:
- Using the
ZEROPS_
prefix - Converting the flag name to uppercase
- Using the full flag name (not shorthand)
Example:
Special Environment Variables​
zCLI also recognizes special environment variables that control its behavior:
Terminal Mode Configuration​
The ZEROPS_CLI_TERMINAL_MODE
environment variable controls the interactive mode of zCLI:
Available modes:
auto
(default): Automatically detects if interactive mode can be used and enables it when possibleenabled
: Forces interactive mode to be enableddisabled
: Forces interactive mode to be disabled
This setting affects interactive prompts, progress indicators, and other terminal-based user interface elements.
Logging Configuration​
zCLI maintains a debug log file for the service push
and service deploy
commands. This logging feature is designed specifically for debugging purposes. The log file can be found in one of these locations:
1. Default locations (checked in this order):
/var/log/zcli.log
(if zCLI has write permissions)~/.config/zerops/zerops.log
(as fallback)
2. Custom location (if specified):
- Set with
ZEROPS_CLI_LOG_FILE_PATH
environment variable
zCLI must have write permissions for the specified log file locations.
To enable verbose logging with additional debug information, use the --verbose
flag (or its shorthand -v
):
To troubleshoot deployment issues, you can check these log files using commands like cat
or tail
: