Skip to content

feat(config): repo-level .rtk.toml override support#707

Open
Nava2 wants to merge 1 commit intortk-ai:developfrom
Faire:feat/repo-config
Open

feat(config): repo-level .rtk.toml override support#707
Nava2 wants to merge 1 commit intortk-ai:developfrom
Faire:feat/repo-config

Conversation

@Nava2
Copy link

@Nava2 Nava2 commented Mar 18, 2026

Summary

Adds repo-level config via .rtk.toml files, enabling per-repo overrides without modifying user config. This is useful for teams that want shared rtk settings (e.g. hook exclusions, filter directories) checked into their repo.

  • RepoConfig struct with allowlisted sections: [hooks], [filters]
  • find_repo_config_from() walks up directories, stopping at .git boundary
  • Config::load_from_dir() loads user config then merges repo-level overrides
  • show_config() now displays user path, repo path, and effective merged config
  • Only repo-scoped sections are merged; user-only sections (tracking, display, telemetry, limits) are ignored in .rtk.toml

Example .rtk.toml

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

[filters]
ignore_dirs = [".git", "node_modules", "dist"]
ignore_files = ["*.lock"]

Testing

We've been using this internally for ~1 week across multiple repositories to success. It's been quite convenient.

Naming

Names were not chosen specially, open to other opinions 😄

🤖 Generated with Claude Code

Add repo-level config via `.rtk.toml` files, allowing per-repo
overrides of hooks and filters without modifying user config.

- RepoConfig struct with allowlisted sections (hooks, filters)
- find_repo_config_from() walks up to .git boundary
- Config::load_from_dir() merges user + repo config
- show_config() displays user, repo, and effective merged config

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Kevin Brightwell <kevin.brightwell@faire.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant