max-sixty/worktrunk
Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
Rust★ 10,128+77 that day#6 on trending
D43.4/100
Duplication59
6.5% in rust, python, javascript, tsx, bash, typescript, nix, astro, powershell, batchDead 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.81%duplicated code · 3,051 of 168,153 lines
320clones in code
226code files of 587 scanned
10.99%duplicated over all files · 2,068 clones
Most complex files
- src/config/deprecation.rs486 cx
- tests/integration_tests/switch.rs468 cx
- src/shell_exec.rs445 cx
- tests/integration_tests/config_show.rs415 cx
- src/commands/config/state.rs399 cx
- tests/integration_tests/readme_sync.rs349 cx
- src/commands/config/show.rs338 cx
- tests/integration_tests/remove.rs337 cx
- src/git/error.rs326 cx
- tests/integration_tests/shell_wrapper.rs322 cx
Dead code 11.31% 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 4 placesrust103 tokenssrc/commands/picker/mod.rs:2867–2880src/commands/picker/mod.rs:3166–3178src/commands/picker/mod.rs:3946–3958src/commands/picker/mod.rs:4133–4145
2867fn test_do_removal_removes_worktree_and_branch() { 2868 let test = worktrunk::testing::TestRepo::with_initial_commit(); 2869 let repo = worktrunk::git::Repository::at(test.path()).unwrap(); 2870 let wt_dir = tempfile::tempdir().unwrap(); 2871 let wt_path = wt_dir.path().join("feature"); 2872 2873 repo.run_command(&[ 2874 "worktree", 2875 "add", 2876 "-b",3166fn test_do_removal_skips_unapproved_pre_remove_hook() { 3167 let test = worktrunk::testing::TestRepo::with_initial_commit(); 3168 let repo = worktrunk::git::Repository::at(test.path()).unwrap(); 3169 let wt_dir = tempfile::tempdir().unwrap(); 3170 let wt_path = wt_dir.path().join("feature"); 3171 repo.run_command(&[ 3172 "worktree", 3173 "add", 3174 "-b", 3175 "feature",First 10 of 14 lines, the second copy on the right.
- 13 lines in 2 placesrust266 tokens
2432- Match recent commit style (conventional commits if used) 2433- Describe the change, not the intent or benefit 2434</style> 2435{% if user_guidance %} 2436<user-guidance> 2437{{ user_guidance }} 2438</user-guidance> 2439{% endif %}{% if project_guidance %} 2440<project-guidance> 2441{{ 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
- 7 lines in 4 placesrust59 tokens
- 29 lines in 2 placesrust165 tokens
Largest clones over all files, tests and data included
- 1536 lines in 2 placesmarkdowndocs and examples7,402 tokensplugins/worktrunk/skills/worktrunk/reference/config.md:1–1536skills/worktrunk/reference/config.md:1–1536
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 1536 lines.
- 581 lines in 2 placesmarkdowndocs and examples6,152 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.
- 299 lines in 2 placesmarkdowndocs and examples4,236 tokens
- 365 lines in 2 placesmarkdowndocs and examples4,008 tokens
By format, code only
| Format | Files | Lines | Clones | Duplicated lines | Duplication |
|---|---|---|---|---|---|
| rust | 214 | 166,537 | 320 | 3,051 | 1.83% |
| tsx | 1 | 657 | 0 | 0 | 0% |
| typescript | 4 | 454 | 0 | 0 | 0% |
| bash | 5 | 355 | 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 | 282,248 | 1,796 | 18,980 | 6.72% |
| markdown | 75 | 27,520 | 136 | 12,081 | 43.9% |
| text | 43 | 3,316 | 42 | 2,319 | 69.93% |
| json | 27 | 6,558 | 37 | 2,072 | 31.59% |
| yaml | 30 | 3,509 | 17 | 240 | 6.84% |
| toml | 28 | 2,658 | 14 | 1,006 | 37.85% |
| bash | 30 | 949 | 13 | 240 | 25.29% |
| javascript | 15 | 3,477 | 6 | 56 | 1.61% |
| tsx | 2 | 1,010 | 4 | 32 | 3.17% |
| python | 7 | 3,501 | 1 | 7 | 0.2% |
Trending appearances
| Day | Rank | Stars | Files | Lines | Clones | All files | Code | Health | Commit |
|---|---|---|---|---|---|---|---|---|---|
| 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.