cronix init
init writes a heavily-commented operator config to the chosen path so you have a working starting point for the operator-side configuration that global-status and other multi-backend tooling reads. Defaults to ~/.cronix/cronix.yaml, with the same path resolution as the rest of the CLI: $CRONIX_CONFIG, then ~/.cronix/cronix.yaml, then /etc/cronix/cronix.yaml.
It refuses to overwrite an existing file unless --force is passed — running init twice on the same host is a safe no-op until you opt in. With --app / --manifest-url / --secret-ref you can pre-fill the first manifest_sources entry at scaffold time, skipping the manual edit.
Synopsis
cronix init [flags]Flags
| Flag | Default | Purpose |
|---|---|---|
--config | $CRONIX_CONFIG → ~/.cronix/cronix.yaml | Destination path |
--app | (none) | Pre-fill the first manifest_sources entry’s app field |
--manifest-url | (none) | Pre-fill the first manifest_sources entry’s url field |
--secret-ref (repeatable) | (none) | Pre-fill secret_refs for the first entry |
--force | false | Overwrite an existing file |
Examples
Empty scaffold at the default path:
cronix init# wrote /Users/me/.cronix/cronix.yaml# next: edit manifest_sources[].url and secret_refs, then run `cronix apply --config /Users/me/.cronix/cronix.yaml`.Pre-fill an app entry at scaffold time:
cronix init \ --app billing \ --manifest-url https://billing.example.com/.well-known/cron-manifest \ --secret-ref env:CRON_SECRETOverwrite an existing config to a tmp path for testing:
cronix init --config /tmp/cronix.yaml --force# wrote /tmp/cronix.yamlNotes
- Refuses to overwrite by default. If the destination exists,
initerrors out with apass --force to overwritemessage and exits non-zero. This protects production config from accidental scaffolding. - File mode is
0600. The scaffold may contain secret references; cronix writes it with owner-only read/write permissions. Parent directories are created with0755. - Path resolution mirrors the rest of the CLI. The same
--configflag,$CRONIX_CONFIGenv, and~/.cronix/cronix.yaml//etc/cronix/cronix.yamlprecedence apply to every multi-backend command — set them once andinitmatches. - The scaffold is a starting point, not a complete config. It includes
manifest_sources,locks,defaultsblocks and inline comments. Edit it before runningapplyagainst real hosts.