retrofit init
Initialize the current project by writing retrofit.toml at
the repo root and ensuring `.gitattributes` carries the
*.oplog merge=union line and the *.data.sql text eol=lf line
(the latter keeps a checkout rewrite from disturbing data
file line endings). Does not create an oplog (use
`retrofit schema create`).
Usage:
retrofit init [flags]
Flags:
--add-search-path append [search_path] section with default schemas = ["public"] when missing (upgrade path for configs written before search_path; idempotent)
--config string destination retrofit.toml path; a relative path anchors to the current directory, not to --dir (default: <repo-root>/retrofit.toml)
--dir string working directory for .git discovery only; does not anchor a relative --config
--engine postgres engine identifier (only postgres accepted) (default "postgres")
--engine-version <15|16|17|18> supported major <15|16|17|18> (overrides build-time default) (default "17")
--force overwrite an existing retrofit.toml (init is otherwise idempotent: a second run leaves retrofit.toml alone but still finishes the .gitattributes step)
-h, --help help for init
--help-all show extended help (vocabulary, semantics, caveats)
--no-gitattributes skip .gitattributes mutation entirely
Global Flags:
--as string output mode: text | json (default "text")
-C, --chdir string treat <dir> as the working directory for the entire run
-f, --file string oplog file path; selects a registered [[schema]] path (overrides discovery)
--no-consolidate render every advisory occurrence instead of collapsing repeats
-q, --quiet count suppress the advisory tier on stderr; stack (-qq) to drop it whole (errors and results still print)
-v, --verbose reveal info-tier advisories on stderr
Docs: https://docs.retrofit.sh/current/commands/retrofit-init/