Skip to content

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

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

Nava2 wants to merge 1 commit into
rtk-ai:developfrom
Faire:feat/repo-config

Conversation

@Nava2

@Nava2 Nava2 commented Mar 18, 2026 •

Copy link
Copy Markdown

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

@CLAassistant

CLAassistant commented Mar 20, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@aeppling

Copy link
Copy Markdown
Contributor

Hey

We are cleaning up the codebase and improving the project structure for better onboarding. As part of this effort, PR #826 reorganizes src/ from a flat layout into subfolders.

No logic changes — only file moves and import path updates.

What you need to do

Rebase your branch on develop when receiving this comment:

git fetch origin && git rebase origin/develop

Git detects renames automatically. If you get import conflicts, update the paths:

use crate::git;        // now: use crate::cmds::git::git;
use crate::tracking;   // now: use crate::core::tracking;
use crate::config;     // now: use crate::core::config;
use crate::init;       // now: use crate::hooks::init;
use crate::gain;       // now: use crate::analytics::gain;

Need help rebasing? Tag @aeppling

@Nava2
Nava2 force-pushed the feat/repo-config branch from d2bfecc to 5fb64d0 Compare March 26, 2026 19:33
@Nava2

Nava2 commented Mar 26, 2026

Copy link
Copy Markdown
Author

@aeppling this was rebased :)

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) <[email protected]>
Signed-off-by: Kevin Brightwell <[email protected]>
@Nava2
Nava2 force-pushed the feat/repo-config branch from 5fb64d0 to d1acffb Compare March 26, 2026 19:51
@aeppling

aeppling commented Apr 3, 2026

Copy link
Copy Markdown
Contributor

Hello @Nava2 !

Thanks for keeping this up to date, we have a lot to do with our small maintainers team and were focusing on some priority to adresse for better use of rtk and contributions.

We will soon be able to get back to all new features implementation, including this.

Thanks for contributing

@aeppling aeppling self-assigned this Apr 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants