init — Generate Configuration
Interactive Mode
Running sniffercommit init with no flags launches an interactive wizard:
$ cd /path/to/project $ sniffercommit init
Press enter to accept the default value shown in [bracket value info]. Type a value to override. Invalid input is rejected with a warning and the prompt repeats.
$ sniffercommit init --interactive
Passing any flag (e.g. --style google) after init disables the interactive wizard and uses CLI-only mode.
With clang-tidy
# standard preset $ sniffercommit init --enable-clang-tidy # strict preset $ sniffercommit init --enable-clang-tidy --tidy-preset strict # compiler warnings only $ sniffercommit init --enable-clang-tidy --tidy-severity warning
With --enable-clang-tidy, three files are created:
.sniffercommit.toml— includesclang-tidycheck.clang-format— formatter config.clang-tidy— static analysis config with curated check preset
Formatter & Analyzer Options
# available styles: google, llvm, chromium, mozilla, webkit, microsoft, gnu $ sniffercommit init --style llvm # clang-tidy preset: minimal, standard (default), strict, custom $ sniffercommit init --enable-clang-tidy --tidy-preset standard # tidy severity: note (off), warning (compiler only), error (all) $ sniffercommit init --enable-clang-tidy --tidy-severity warning # header filter: 0=none, 1=project, 2=all $ sniffercommit init --enable-clang-tidy --tidy-header-filter 1
Full Customization
$ sniffercommit init \ --style google \ --name my-project \ --indent-width 4 \ --column-limit 120 \ --pointer-alignment Left \ --brace-style Attach \ --enable-clang-tidy \ --tidy-preset strict \ --tidy-severity error
Custom Config Path
$ sniffercommit --config /path/to/.sniffercommit.toml init