Skip to content

Support exclude_commands config for auto-rewrite hook #243

@nwparker

Description

@nwparker

Problem

The auto-rewrite hook (rtk-rewrite.sh) rewrites all supported commands unconditionally. There's no way to exclude specific commands from being rewritten without manually editing the hook script — which gets overwritten on the next rtk init -g.

Proposal

Add an exclude_commands option to config.toml that the hook script reads at runtime:

[hooks]
exclude_commands = ["playwright", "curl"]

The hook script would check this list before rewriting and skip excluded commands.

Alternative approaches

  • Environment variable: RTK_EXCLUDE="playwright,curl" — simpler but less discoverable
  • Per-command disable in config: [commands.playwright] enabled = false
  • Hook flag: rtk init -g --exclude playwright that generates the hook without those patterns

Any of these would work. The key requirement is that the exclusion survives rtk init -g re-runs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions