Repository navigation
Allow override from config rather than flags - #14
Merged
Merged
Conversation
Rather than requiring the user to supply flags for --overlay / --no-net / --git-rw / --branch / --dry-run etc, allow these to be set in the config file. Even though for couple like dry-run it probably never makes sense to set from config, it's better to have the vars initialized the same place.
The defaults are now assigned before the config layers are sourced, so a config file can set them. Nothing guarded that, and moving the block back restores the old behaviour silently. Assert that config can set GIT_RW and SHARE_NET, and that a command line flag still beats a config that disagrees.
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.
What & why
Coming from an earlier version of
ai-brwap, I mostly don't want to have to change my ide to invoke ai-bwrap differently depending on the project.Rather than requiring the user to supply flags for
--overlay/--no-net/--git-rw/--branch/--dry-runetc, let's allow these to be set in the config file.Even though for couple like dry-run it probably never makes sense to set from config, it's better to have the vars initialized the same place.
Checklist
shellcheck ai-bwrapis clean--helptext and README updated together (if the CLI surface changed)--dry-run(paste relevant output below if helpful)Notes
For context, my pattern is to use
miseto set a project specific config like:(
config_rootis basically the project path)And that config inherits my per-user defaults like:
My ide just starts
ai-bwrap opencode -- acpregardless of the project.