These flags are accepted by all Zonai commands.
Flags#
| Flag | Short | Description |
|---|---|---|
--help |
-h |
Print usage information for the current command |
--config <path> |
-c |
Path to zonai.yaml; auto-detected if omitted |
--flavor <name> |
— | Config flavor to load (affects serve, compile, build) |
--release |
— |
Production mode: disable asserts, disable file watchers in
serve
— see
Release mode
|
--quiet | -q | Suppress all non-error output |
--loud |
-L |
Maximum verbosity — print all internal debug logs |
--log <level> |
— |
Set log level:
verbose
,
trace
,
request
,
debug
,
info
,
warning
,
error
(or their first letter:
v t r d i w e
)
|
The level names are matched exactly. --log warn is not warning: an
unrecognized name is ignored and the level falls back to info.
Unrecognized Flags Are Ignored#
Zonai parses arguments generically — every --flag value pair is collected,
and commands read the keys they know. A flag no command reads is not an
error: it is dropped without a warning and the command succeeds.
zonai build --dart-define-from-file env.json # exits 0, injects nothing
Nothing reads --dart-define-from-file (it doesn't exist — see
Environment Variables),
so that build silently ships without those values. When a flag appears to have
had no effect, check its spelling against the command's --help first.
--config Auto-Detection#
If --config is not provided, Zonai searches the current directory and its parents for zonai.yaml
or zonai.yml. The first file found is used. This allows running commands from any subdirectory of the project.
--flavor and --release#
These flags are independent:
-
--flavorselects which config file and which.env.<flavor>file are compiled into workers — see Config Flavors -
--releasecontrols compilation flags (no asserts) andservebehavior (no watchers, no recompiling)
You can combine them freely:
zonai serve --flavor dev --release # release build of dev config
zonai build --flavor prod --release # production build