5 views
max-sixty/worktrunk
Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
Rust★ 11,601+546 that day#5 on trending
D43.3/100
Duplication58
6.6% in rust, python, javascript, tsx, typescript, bash, nix, astro, batch, powershellDead coden/a
the languages dead code reads are under 5% of the codeComplexity32
82.4% The score is jscpd's own --health model: markup, data and text left out, tests kept. The numbers below are the trending scan's.
1.92%duplicated code · 3,241 of 168,792 lines
334clones in code
227code files of 591 scanned
11.06%duplicated over all files · 2,097 clones
Most complex files
- src/config/deprecation.rs486 cx
- tests/integration_tests/switch.rs482 cx
- src/shell_exec.rs445 cx
- tests/integration_tests/config_show.rs420 cx
- src/commands/config/state.rs399 cx
- tests/integration_tests/readme_sync.rs362 cx
- src/commands/config/show.rs338 cx
- tests/integration_tests/remove.rs338 cx
- src/git/error.rs326 cx
- tests/integration_tests/shell_wrapper.rs322 cx
Dead code 12.24% unused · 4 findings
- plugins/worktrunk/hooks/register.tsxunused-file
- dev/opencode-plugin.tsunused-file
- dev/pi-extension.tsunused-file
- dev/omp-hook.tsunused-file
The code number leaves out tests, fixtures, docs, examples, data files, styles, translations and vendored code, and 1 generated file: src/docs.rs.
Largest clones in the code
- 7 lines in 8 placesrust94 tokenssrc/git/repository/sha_cache.rs:401–407src/git/repository/sha_cache.rs:441–447src/git/repository/sha_cache.rs:556–562src/git/repository/sha_cache.rs:666–672src/git/repository/sha_cache.rs:701–707and 3 more
401let dir = cache::cache_dir(&repo, KIND_MERGE_TREE_CONFLICTS); 402let entries: Vec<_> = fs::read_dir(&dir) 403 .unwrap() 404 .filter_map(|e| e.ok()) 405 .filter(|e| e.file_name().to_str().is_some_and(|s| s.ends_with(".json"))) 406 .collect(); 407assert_eq!(entries.len(), 1, "exactly one cache entry expected"); - 14 lines in 5 placesrust106 tokenssrc/commands/picker/mod.rs:2896–2909src/commands/picker/mod.rs:3195–3207src/commands/picker/mod.rs:3975–3987src/commands/picker/mod.rs:4170–4182src/commands/picker/mod.rs:4265–4277
2896fn test_do_removal_removes_worktree_and_branch() { 2897 let test = worktrunk::testing::TestRepo::with_initial_commit(); 2898 let repo = worktrunk::git::Repository::at(test.path()).unwrap(); 2899 let wt_dir = worktrunk::testing::tempdir().unwrap(); 2900 let wt_path = wt_dir.path().join("feature"); 2901 2902 repo.run_command(&[ 2903 "worktree", 2904 "add", 2905 "-b",3195fn test_do_removal_skips_unapproved_pre_remove_hook() { 3196 let test = worktrunk::testing::TestRepo::with_initial_commit(); 3197 let repo = worktrunk::git::Repository::at(test.path()).unwrap(); 3198 let wt_dir = worktrunk::testing::tempdir().unwrap(); 3199 let wt_path = wt_dir.path().join("feature"); 3200 repo.run_command(&[ 3201 "worktree", 3202 "add", 3203 "-b", 3204 "feature",First 10 of 14 lines, the second copy on the right.
- 13 lines in 2 placesrust266 tokens
2436- Match recent commit style (conventional commits if used) 2437- Describe the change, not the intent or benefit 2438</style> 2439{% if user_guidance %} 2440<user-guidance> 2441{{ user_guidance }} 2442</user-guidance> 2443{% endif %}{% if project_guidance %} 2444<project-guidance> 2445{{ project_guidance }}First 10 of 13 lines.
7 more
- 11 lines in 2 placesrust263 tokens
- 8 lines in 4 placesrust82 tokens
- 10 lines in 3 placesrust115 tokens
- 6 lines in 2 placesrust205 tokens
- 30 lines in 2 placesrust198 tokens
- 11 lines in 3 placesrust95 tokens
- 45 lines in 2 placesbash182 tokens
Largest clones over all files, tests and data included
- 1538 lines in 2 placesmarkdowndocs and examples7,427 tokensplugins/worktrunk/skills/worktrunk/reference/config.md:1–1538skills/worktrunk/reference/config.md:1–1538
1# wt config 2 3Manage user & project configs. Includes shell integration, hooks, and saved state. 4 5## Examples 6 7Install shell integration (required for directory switching): 8 9```console 10$ wt config shell installFirst 10 of 1538 lines.
- 581 lines in 2 placesmarkdowndocs and examples6,154 tokens
1# wt list 2 3List worktrees and their status. 4 5Shows uncommitted changes, divergence from the default branch and remote, and optional CI status and LLM summaries. 6 7The table renders progressively: branch names, paths, and commit hashes appear immediately, then status, divergence, and other columns fill in as background gi… 8 9## Full mode 10First 10 of 581 lines.
- 1027 lines in 3 placestextdocs and examples2,289 tokensdocs/src/content/docs/step.md:16–1042plugins/worktrunk/skills/worktrunk/reference/step.md:10–1030skills/worktrunk/reference/step.md:10–1030
16$ wt step commit 17◎ Generating commit message and committing changes... (2 files, +26) 18 feat(validation): add input validation utilities 19✓ Committed changes @ a1b2c3d 20``` 21 22Manual merge workflow with review between steps: 23 24```console 25$ wt step commitFirst 10 of 1027 lines.
- 381 lines in 2 placesmarkdowndocs and examples4,518 tokens
- 301 lines in 2 placesmarkdowndocs and examples4,326 tokens
By format, code only
| Format | Files | Lines | Clones | Duplicated lines | Duplication |
|---|---|---|---|---|---|
| rust | 214 | 167,029 | 330 | 3,130 | 1.87% |
| typescript | 4 | 553 | 3 | 66 | 11.93% |
| bash | 6 | 400 | 1 | 45 | 11.25% |
| tsx | 1 | 660 | 0 | 0 | 0% |
| powershell | 1 | 103 | 0 | 0 | 0% |
| python | 1 | 47 | 0 | 0 | 0% |
By format, all files
| Format | Files | Lines | Clones | Duplicated lines | Duplication |
|---|---|---|---|---|---|
| rust | 297 | 283,273 | 1,815 | 19,143 | 6.76% |
| markdown | 75 | 27,694 | 140 | 12,156 | 43.89% |
| text | 43 | 3,316 | 42 | 2,319 | 69.93% |
| json | 29 | 6,611 | 37 | 2,072 | 31.34% |
| yaml | 30 | 3,505 | 17 | 240 | 6.85% |
| toml | 28 | 2,662 | 14 | 1,006 | 37.79% |
| bash | 31 | 997 | 14 | 287 | 28.79% |
| javascript | 15 | 3,477 | 6 | 56 | 1.61% |
| tsx | 2 | 1,079 | 5 | 39 | 3.61% |
| typescript | 8 | 663 | 3 | 66 | 9.95% |
Trending appearances
| Day | Rank | Stars | Files | Lines | Clones | All files | Code | Health | Commit |
|---|---|---|---|---|---|---|---|---|---|
| Nov 6, 2026 | #5 | 11,601 (+546) | 591 | 338,837 | 2,097 | 11.06% | 1.92% | D 43.3 | 181f17a |
| Nov 5, 2026 | #2 | 11,155 (+531) | 587 | 337,799 | 2,086 | 11.03% | 1.9% | D 43.3 | 4f810fc |
| Nov 4, 2026 | #2 | 10,613 (+438) | 587 | 337,538 | 2,077 | 11% | 1.85% | D 43.4 | ea28955 |
| Nov 3, 2026 | #6 | 10,128 (+77) | 587 | 337,311 | 2,068 | 10.99% | 1.81% | D 43.4 | 0162047 |
Want this for your own project? Install jscpd and run jscpd ., or measure it the way the baselines were measured.