Add configuration file support with --init flag - #84
Merged
Conversation
Boomatang
force-pushed
the
16-configuration-file
branch
from
July 19, 2026 20:04
91ebd7f to
cd1add0
Compare
--init flag
Configuration File is now created. Currently is still not being used. Signed-off-by: Jim Fitzpatrick <jimfity@gmail.com>
Boomatang
force-pushed
the
16-configuration-file
branch
from
August 1, 2026 14:26
a08c3d6 to
00d1cbf
Compare
Did some clean up in the code base. Switched branch.autoSetupMerge to true. Signed-off-by: Jim Fitzpatrick <jimfity@gmail.com>
Boomatang
force-pushed
the
16-configuration-file
branch
from
August 1, 2026 14:32
00d1cbf to
ccd7878
Compare
Signed-off-by: Jim Fitzpatrick <jimfity@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #16
Summary
Adds support for a ZON-based configuration file so users can set default behavior (clone path, clone mode, shallow clones, log level) without repeating CLI flags or relying on environment variables.
A new
--initflag generates a default configuration file at the XDG-compliant location. On startup, the configuration file is loaded and its values are applied, with CLI flags and environment variables taking precedence.Precedence
Settings are resolved in the following order (most specific wins):
CLI flags > Environment variables (
GRAB_PATH) > Config file > Built-in defaultsAcceptance Criteria
std.zon.parse-- no external dependencies needed.$XDG_CONFIG_HOME/grab/config.zonfirst, falls back to$HOME/.config/grab/config.zon.path,action,shallow, andlog_level, with the specified types and defaults.pathis commented out so it defaults to null.grab --initgenerates a config file with defaults. If the file already exists, it warns and exits without overwriting.