feat(config): configurable auto_approve and claude dir#494
Open
krober wants to merge 1 commit intortk-ai:developfrom
Open
feat(config): configurable auto_approve and claude dir#494krober wants to merge 1 commit intortk-ai:developfrom
krober wants to merge 1 commit intortk-ai:developfrom
Conversation
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.
adds two new config options to ~/.config/rtk/config.toml under [hooks]:
auto_approve(bool, defaulttrue) — controls whether the hook bypasses Claude Code's permission promptfalse= commands still get rewritten tortk <cmd>but user is prompted beforeexecution
RTK_HOOK_AUTO_APPROVE=0claude_dir(path, optional) — custom Claude Code data directory for hook installationCLAUDE_CONFIG_DIRrtk init -g --claude-dir /pathsupporting changes:
rtk rewrite --hook-json— moves JSON construction from the shell hook into Rust, sopermission decisions are config-driven
parse_bool_env()— accepts 1/true/yes, everythingelse is falsy
resolve_telemetry_enabled()now uses the same cascading pattern (env var → config →default)