-
Notifications
You must be signed in to change notification settings - Fork 0
Init command
Muhammet Şafak edited this page May 27, 2026
·
1 revision
Scaffold the two review-rules files in the current repo.
commitbrief init [--force]
-
<repo-root>/COMMITBRIEF.md— the team-shared review rules, written from the embedded default atinternal/rules/default.md. Mode0644. Commit this to git. -
<repo-root>/.commitbrief/OUTPUT.md— the per-user output template, written from the embedded default atinternal/rules/output.md. Mode0644. Gitignored by default.
The parent .commitbrief/ directory is created with mode 0700.
Both files fall back to the embedded defaults at runtime, so running
init is only necessary when you want to customise the prompt or
the output format.
The two artefacts are independent. If only COMMITBRIEF.md exists
(e.g. a customised file from an older release that pre-dated
OUTPUT.md), init still writes the missing OUTPUT.md and leaves
COMMITBRIEF.md untouched. Each file is processed in isolation:
- File missing → write from embedded default; log
Wrote <path>. - File exists, overwrite OFF → log
Skipped <path> (already exists; pass --force to overwrite); do not touch. - File exists, overwrite ON → overwrite from embedded default; log
Wrote <path>.
init only returns an error on real I/O failures. "Already exists"
is not an error.
| Flag | Notes |
|---|---|
--force |
Overwrite existing files. Same semantic as --yes for this command. Long form only — -f is reserved for the global --file flag. |
The global --yes flag also triggers overwrite (back-compat with
pre-v1.0 scripts).
# First-time scaffolding.
commitbrief init
# After upgrading from a pre-OUTPUT.md release — writes the missing
# OUTPUT.md while leaving your customised COMMITBRIEF.md alone.
commitbrief init
# Restore both files to the embedded defaults (destroys customisations).
commitbrief init --force-
COMMITBRIEF.md— file format for review rules. -
OUTPUT.md— Gotext/templateformat and helpers. -
Compress command — shrink an existing
COMMITBRIEF.mdvia the LLM.