@doccy/fell 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +71 -0
- package/cli.ts +1160 -0
- package/lib/git.ts +372 -0
- package/lib/tui.ts +286 -0
- package/package.json +34 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Medlo
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
```
|
|
2
|
+
▄▀▀ ▀▀█ ▀▀█
|
|
3
|
+
▄▄█▄▄ ▄▄▄ █ █
|
|
4
|
+
█ █▀ █ █ █
|
|
5
|
+
█ █▀▀▀▀ █ █
|
|
6
|
+
█ ▀█▄▄▀ ▀▄▄ ▀▄▄
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
*"To fell a tree."*
|
|
10
|
+
|
|
11
|
+
`fell` is a CLI tool that help's you actively manage, prune and delete worktrees.
|
|
12
|
+
|
|
13
|
+
## Why?
|
|
14
|
+
|
|
15
|
+
Git worktrees accumulate. Agent tools (Cursor, Claude Code) create them freely. After a few weeks you have a dozen stale worktrees, some with merged PRs, some with unpushed changes, and `git worktree list` gives you a wall of paths with no context.
|
|
16
|
+
|
|
17
|
+
`fell` shows you what each worktree actually is -- its PR status, whether it has uncommitted work, and how far behind it is -- so you can clean up confidently.
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
## Install
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
bun add -g @doccy/fell
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Requires [Bun](https://bun.sh) and git. [GitHub CLI](https://cli.github.com) (`gh`) is optional -- enables PR status display.
|
|
27
|
+
|
|
28
|
+
## Usage
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
fell # interactive TUI
|
|
32
|
+
fell --list # print worktrees + PR statuses and exit
|
|
33
|
+
fell --help # show help
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Interactive commands
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
up/down or k/j Navigate worktree list
|
|
40
|
+
space Toggle selection
|
|
41
|
+
a Select / deselect all
|
|
42
|
+
e Expand / collapse file list
|
|
43
|
+
o Open worktree in file manager
|
|
44
|
+
d Delete worktree(s) + optionally branches
|
|
45
|
+
p Prune stale references
|
|
46
|
+
r Refresh list + PR statuses
|
|
47
|
+
? Help (prune vs delete explained)
|
|
48
|
+
q / ctrl+c Quit
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### What you see
|
|
52
|
+
|
|
53
|
+
- Branch name, short SHA, and PR status for each worktree
|
|
54
|
+
- File status sub-lines (staged, modified, untracked, unpushed, behind) with warning indicators
|
|
55
|
+
- Focused item shows full path and PR title
|
|
56
|
+
- PR numbers are clickable links in supported terminals (iTerm2, Kitty, WezTerm)
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
### Prune vs delete
|
|
60
|
+
|
|
61
|
+
**prune** cleans up stale administrative references -- when a worktree directory has been manually deleted (`rm -rf`) but git still tracks it. Equivalent to `git worktree prune`. Safe: only affects already-missing worktrees.
|
|
62
|
+
|
|
63
|
+
**delete** properly removes a worktree from disk and cleans up git tracking. Optionally also deletes the branch. Equivalent to `git worktree remove`. Destructive.
|
|
64
|
+
|
|
65
|
+
### Preview
|
|
66
|
+
|
|
67
|
+
<img src="./docs/header-img.png" height="300px">
|
|
68
|
+
|
|
69
|
+
## License
|
|
70
|
+
|
|
71
|
+
MIT
|