Global Options#
These flags are available on every APX command.
Flags#
Flag |
Shorthand |
Type |
Default |
Description |
|---|---|---|---|---|
|
|
bool |
|
Suppress non-essential output |
|
bool |
|
Enable verbose output with additional detail |
|
|
bool |
|
Format output as JSON (supported by most commands) |
|
|
bool |
|
Disable colored terminal output |
|
|
string |
|
Path to the APX configuration file |
--quiet#
Suppresses informational messages, leaving only errors and the primary output. Useful in CI pipelines where you only want actionable output.
apx lint --quiet
apx release prepare proto/payments/ledger/v1 --version v1.0.0 -q
--verbose#
Enables additional diagnostic output, including resolved tool paths, config values, and intermediate steps.
apx lint --verbose
apx gen go --verbose
--quiet and --verbose are mutually exclusive. If both are set, --quiet wins.
--json#
Formats output as JSON for machine consumption. Supported by commands that produce structured data:
apx --json show proto/payments/ledger/v1
apx --json search payments
apx --json config validate
apx --json release inspect
apx --json release history proto/payments/ledger/v1
apx --json semver suggest --against HEAD^
apx --json inspect identity proto/payments/ledger/v1
apx --json explain go-path proto/payments/ledger/v1
Note
--json is a persistent flag on the root command. It can be placed before or after the subcommand: apx --json show ... or apx show --json ... both work.
--no-color#
Disables ANSI color codes in terminal output. Automatically enabled when stdout is not a TTY (e.g. piped output or CI environments).
apx lint --no-color
apx release prepare --no-color proto/payments/ledger/v1 --version v1.0.0
--config#
Specifies a custom path to the APX configuration file. Defaults to apx.yaml in the current directory.
apx lint --config /path/to/custom/apx.yaml
apx config validate --config staging-apx.yaml
This is useful when:
Running APX from a directory other than the repo root
Managing multiple configurations (e.g. staging vs production)
Testing config changes without modifying the default file
Exit Codes#
Code |
Meaning |
|---|---|
|
Success |
|
General error |
|
Configuration validation error |
The exit code 6 is returned specifically by apx config validate when the configuration is invalid, allowing CI scripts to distinguish config errors from other failures.
Environment Variables#
Variable |
Equivalent flag |
Description |
|---|---|---|
|
|
Path to configuration file |
|
|
Enable verbose output |
|
|
Suppress non-essential output |
|
|
Format output as JSON |
|
— |
Proxy settings for network operations |
|
|
Disable color output (standard convention) |