Skip to content

feat(chezmoi): add chezmoi dotfile manager support (80-90% token savings)#436

Open
jsoyer wants to merge 8 commits intortk-ai:developfrom
jsoyer:feat/chezmoi/add-dotfile-manager-support
Open

feat(chezmoi): add chezmoi dotfile manager support (80-90% token savings)#436
jsoyer wants to merge 8 commits intortk-ai:developfrom
jsoyer:feat/chezmoi/add-dotfile-manager-support

Conversation

@jsoyer
Copy link

@jsoyer jsoyer commented Mar 9, 2026

Summary

Adds rtk chezmoi with 9 filtered subcommands for chezmoi dotfile manager operations:

  • diff: file-level summary instead of full git diff (85% savings)
  • apply: ok ✓ N files applied summary (90% savings)
  • status: grouped counts with file list (75% savings)
  • managed: file count grouped by directory (70% savings)
  • add: ok ✓ N files added (85% savings)
  • re-add: ok ✓ N files re-added (85% savings)
  • update: ok ✓ updated (N source files changed, M dotfiles applied) (90% savings)
  • unmanaged: file count grouped by directory (70% savings)
  • doctor: header summary + only warnings/errors (80% savings)

Unknown subcommands passthrough transparently.

Changes

  • src/chezmoi_cmd.rs: new module with filter implementation
  • src/main.rs: route chezmoi subcommand
  • Hook rewrite rules updated for all 9 subcommands
  • Registry patterns added for discover and rewrite integration
  • 31 unit tests, all passing

Test plan

  • cargo fmt --all --check && cargo clippy --all-targets && cargo test passes
  • 31 unit tests in chezmoi_cmd.rs
  • Token savings ≥70% verified per subcommand
  • Snapshot tests for all subcommands
  • Unknown subcommand passthrough verified

🤖 Generated with Claude Code

aeppling and others added 7 commits March 7, 2026 11:23
add security check cicd on dev branch PR

Signed-off-by: aesoft <43991222+aeppling@users.noreply.github.com>
fix(cicd): Add security check on dev branch PR
- Add install_method detection (homebrew/cargo/script/nix/other)
- Add tokens_saved_24h and tokens_saved_total to payload
- Add Tracker::total_tokens_saved() and Tracker::tokens_saved_24h() methods
- Point telemetry to new dedicated rtk-telemetry service

Signed-off-by: Patrick szymkowiak <patrick.szymkowiak@innovtech.eu>
Adds rtk chezmoi with 4 filtered subcommands:
- diff: file-level summary instead of full git diff (85% savings)
- apply: "ok ✓ N files applied" summary (90% savings)
- status: grouped counts with file list (75% savings)
- managed: file count grouped by directory (70% savings)

Unknown subcommands passthrough transparently.

Auto-rewrite hook updated to intercept chezmoi diff/apply/status/managed.
Registry rules added for discover and rtk rewrite integration.
14 unit tests, all passing.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- rtk chezmoi add <files>: "ok ✓ N files added" (85% savings)
- rtk chezmoi re-add <files>: "ok ✓ N files re-added" (85% savings)
- Hook rewrite updated for chezmoi add/re-add
- Registry pattern extended to include add and re-add
- 5 new unit tests (19 total)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- update: "ok ✓ updated (N source files changed, M dotfiles applied)" or
  "ok ✓ already up to date" (90% savings vs raw git+apply output)
- unmanaged: file count grouped by directory, same pattern as managed (70%)
- doctor: header summary + only warnings/errors, suppresses ok lines (80%)

Hook rewrite and registry extended to cover all 3 new subcommands.
12 new unit tests (31 chezmoi total, 740 overall).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- README.md, CLAUDE.md, ARCHITECTURE.md: 0.27.1 → 0.27.2
- ARCHITECTURE.md: module total 57 → 59 (39 cmd + 20 infra)
  reflects chezmoi_cmd addition and current main.rs state

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@pszymkowiak pszymkowiak force-pushed the develop branch 2 times, most recently from face559 to 013cc6a Compare March 10, 2026 16:36
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.

3 participants