srekit config¶
Manage the srekit config file — the optional user configuration that holds author identity and an optional default templates directory.
The file lives at $XDG_CONFIG_HOME/srekit/config.yaml (~/.config/srekit/config.yaml when the variable is unset). A pre-XDG ~/.srekit.yaml still works and takes precedence if it already exists, so an existing install is never left with a config nobody reads. srekit doctor names the one actually in effect, and warns when both are present.
config init¶
Walk the user through filling in the config file interactively (TTY) or non-interactively (--yes, piped stdin).
srekit config init # interactive
srekit config init --yes # non-interactive, defaults from git config
srekit config init --force # overwrite existing file
srekit --config ./my.yaml config init # custom path (honors root --config)
Flags¶
| Flag | Description |
|---|---|
--author NAME |
Override resolved author |
--email EMAIL |
Override resolved email |
--templates-dir PATH |
Default templates directory to bake into config |
--force |
Overwrite existing config |
--yes / -y |
Non-interactive; accept defaults |
Defaults¶
If you omit a flag, srekit fills the default from git config user.name / git config user.email. If neither flag nor git config is set and the command is non-interactive, it errors out instead of writing an invalid file.
Output¶
The generated file looks like:
# srekit user config — generated by `srekit config init` (safe to edit by hand)
author: Mikhail Savin
email: jtprogru@gmail.com
# templates_dir: ~/.config/srekit/templates # optional; uncomment to override embedded templates
File mode is 0o600 (user-only). templates_dir: is emitted as a commented-out hint when unset — uncomment to enable, or pass --templates-dir PATH at init time to bake in a real value.
Target path¶
init writes wherever the config would be read from: ~/.srekit.yaml if that legacy file already exists, otherwise $XDG_CONFIG_HOME/srekit/config.yaml — the parent directory is created if needed. If you pass --config FILE on the root command (srekit --config FILE config init), the file is written there instead — useful for multi-tenant setups or CI scratch.
See also¶
- Configuration & precedence — how the config file participates in the broader resolution chain.
srekit templates init— companion for scaffolding the actual templates directory.