Skip to main content

Global flags and environment variables

These flags work on every command.

NameTypeDefaultEnvDescription
--configpathLinux: $XDG_CONFIG_HOME/onmsctl/config.yaml (typically ~/.config/onmsctl/config.yaml). macOS: ~/Library/Application Support/org.no42-org.onmsctl/config.yaml. Windows: %APPDATA%\no42-org\onmsctl\config\config.yaml.ONMSCTL_CONFIGConfig file path.
--contextnamethe config's current-contextONMSCTL_CONTEXTActive context.
--urlURLthe context's server.urlONMS_URLServer URL override.
--usernamethe context's usernameONMS_USERBasic-auth username override.
--read-onlyswitchoffONMSCTL_READ_ONLYRefuse write verbs locally. The flag and the variable only turn read-only on. The variable accepts 1, true, yes, on.
-o, --outputtable | yaml | jsontablenoneOutput format. See output formats.
--insecure-tlsswitchoffnoneSkip TLS certificate verification. Avoid in production. It cannot re-enable verification for a context that disables it. See TLS.
-v, --verboseswitchoffnoneFull error chains plus extra diagnostics.
-V, --versionswitchnonePrint the binary version and linked capabilities, then exit.
-h, --helpswitchnonePrint help.
secretONMS_PASSWORDPassword for a basic-auth context. Overrides the context's declared source.
secretONMS_TOKENToken for a bearer context. Overrides the context's declared source.

For --context, --url, --user and --read-only, a flag beats its environment variable, which beats the active context. -o, -v and --insecure-tls have no environment variable.

Apply flags​

FlagBehavior
-f, --filename <FILE|DIR|GLOB>Required. Input file, directory or quoted glob; directories and globs read .yaml/.yml files.
--dry-runPlan only; zero mutating HTTP. Classifies as a Read, so read-only contexts may run it. It still reads from the server.
--diffRender each kind-bucket's diff to stderr (stdout stays clean for -o json/yaml).
--continue-on-error (alias --keep-going)Keep applying after a failing document. Default is stop-on-error.
-R, --recursiveRecurse into subdirectories (off by default).
--forceRe-send a document that plans as unchanged. Only SnmpConfig honours it, to push a secret-only rotation.

Verb aliases​

CommandAlias
event-sourceevtsrc
eventevt
requisitionreq
maintenancemaint
datacollectiondc
business-servicebs
thresholdthr
configcfg

Both forms appear in --help.