feat(cli): add .hancerc.json config file for persistent defaults#36
Open
RichardBray wants to merge 2 commits into
Open
feat(cli): add .hancerc.json config file for persistent defaults#36RichardBray wants to merge 2 commits into
RichardBray wants to merge 2 commits into
Conversation
Loads project-local .hancerc.json (walks up from cwd) or global ~/.config/hance/config.json so users don't have to repeat CLI flags. Config values are overridden by explicit CLI flags. --no-config skips config loading entirely. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Replace require() with Bun.file().json() for config loading - Add --no-config to KNOWN_FLAGS/BOOLEAN_FLAGS for robustness - Add loadConfig/findLocalConfig tests (directory walk, invalid JSON) - Make parseArgs async to support async config loading Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.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.
Summary
.hancerc.jsonconfig file support so users can set default CLI flags per-project instead of repeating them every run~/.config/hance/config.jsonfor global defaults--no-configskips config loading entirelyTest plan
.hancerc.jsonwith flags like{"codec": "prores", "grain-amount": 0.5}and verify they apply--no-configignores the config file~/.config/hance/config.jsonworks as fallback🤖 Generated with Claude Code