Skip to content

relgap config init ​

Writes a config file that lists every key commented out at its default, so the file changes nothing until you uncomment a key. It goes to .relgap.yaml in the working directory, to path, or with --user to the user file. The directory is created when it's missing.

An existing file is kept, with exit code 2, unless you pass --force. The written path goes to stderr.

Usage ​

sh
relgap config init [path] [flags]

Arguments ​

ArgumentRequiredRepeatable
pathnono

Flags ​

FlagDescriptionTypeDefaultValuesConfig keyNotes
--forcereplace an existing filebool
--userwrite the user file instead of .relgap.yamlbool

The global flags work with every command.

Output formats ​

This command ignores --format.

Exit codes ​

CodeMeaning
0The command finished. With --fail-on, nothing matched.
1The command failed: a read, a write, a child process or a check failed.
2Wrong usage: an unknown command or flag, a bad value or argument, an invalid config file, or a prompt with no terminal.
130Interrupted by Ctrl-C (SIGINT) or a cancelled context.

All codes are listed on the exit codes page.

Examples ​

sh
relgap config init
relgap config init --user
relgap config init ci/relgap.yaml --force