oh-my-worktree 0.10.2 → 0.10.3

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.
Files changed (2) hide show
  1. package/README.md +133 -51
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -1,100 +1,182 @@
1
1
  # owt (oh-my-worktree)
2
2
 
3
- A TUI tool for managing Git worktrees from either regular repositories or bare `.bare` layouts.
3
+ [한국어](./README.ko.md) | [English](./README.md)
4
4
 
5
- Run it from a `.bare` worktree layout or from a regular non-bare Git repository. For regular repositories, new worktrees are created under `~/.owt/worktree/<repo-name>/` by default.
5
+ A fast terminal UI for developers who use Git branches as working contexts, not bookmarks.
6
6
 
7
- ## Installation
7
+ <img width="786" height="580" alt="Image" src="./owt.png" />
8
+
9
+ ## Why owt exists
10
+
11
+ Modern development rarely happens on one branch at a time. You might be reviewing a PR, testing a hotfix, keeping a long-running feature open, and checking main before a release. Plain `git switch` makes that workflow expensive because every context switch drags along uncommitted files, dependencies, editor state, and mental state.
12
+
13
+ Git worktrees solve the underlying problem. `owt` makes them easy enough to use every day.
14
+
15
+ Open `owt`, pick a worktree, create another one, delete the stale ones, fetch, pull, push, or merge without remembering the exact Git incantation. It works from a normal repository and from the `.bare` layout if you prefer keeping all worktrees side by side.
16
+
17
+ ## What you get
18
+
19
+ - A keyboard-first TUI for browsing and managing worktrees
20
+ - First-class support for existing regular repositories
21
+ - Optional `.bare` project layout for teams that like sibling worktrees
22
+ - Fast worktree creation from local or remote branches
23
+ - Dirty-state, ahead/behind, last-commit, and GitHub PR status visibility
24
+ - Built-in fetch, pull, push, upstream merge, branch merge, editor open, terminal open, and path copy
25
+ - Shell integration so `Enter` can move your shell into the selected worktree
26
+
27
+ ## Install
8
28
 
9
29
  ```bash
10
30
  npm install -g oh-my-worktree
11
31
  ```
12
32
 
13
- Or use with npx:
33
+ Or run it without installing:
14
34
 
15
35
  ```bash
16
36
  npx oh-my-worktree
17
37
  ```
18
38
 
19
- ## Quick Start
39
+ From source:
20
40
 
21
41
  ```bash
22
- # Run directly inside an existing regular Git repository
23
- cd /path/to/regular-git-repo
42
+ git clone https://github.com/dding-g/oh-my-worktree.git
43
+ cd oh-my-worktree
44
+ cargo build --release
45
+ ```
46
+
47
+ ## Start from the repo you already have
48
+
49
+ You do not need to convert your repository.
50
+
51
+ ```bash
52
+ cd ~/src/my-app
24
53
  owt
54
+ ```
55
+
56
+ In a regular repository, new worktrees are created under:
57
+
58
+ ```text
59
+ ~/.owt/worktree/<repo-name>/
60
+ ```
25
61
 
26
- # Or clone into the .bare sibling layout
62
+ Set `worktree_root` if you want them somewhere else.
63
+
64
+ ## Or start with a `.bare` workspace
65
+
66
+ If you like all worktrees living inside one project folder, use `owt clone`.
67
+
68
+ ```bash
27
69
  owt clone https://github.com/user/repo.git
28
70
  cd repo/main
71
+ owt
72
+ ```
73
+
74
+ That creates a layout like this:
75
+
76
+ ```text
77
+ repo/
78
+ ├── .bare/
79
+ ├── main/
80
+ ├── feature-login/
81
+ └── hotfix-api/
82
+ ```
83
+
84
+ `owt init` prints a conversion guide if you want to move an existing repository into this layout manually.
29
85
 
30
- # Run TUI
86
+ ## Daily workflow
87
+
88
+ ```bash
31
89
  owt
32
90
  ```
33
91
 
34
- ## Key Bindings
92
+ Then use the TUI:
35
93
 
36
- ### Navigation
37
- | Key | Action |
38
- |-----|--------|
39
- | `j` / `↓` | Move down |
40
- | `k` / `↑` | Move up |
41
- | `g` | Jump to current worktree |
42
- | `gg` | Jump to top |
43
- | `G` | Jump to bottom |
44
- | `/` | Search/filter |
45
-
46
- ### Worktree Actions
47
94
  | Key | Action |
48
- |-----|--------|
49
- | `Enter` | Enter selected worktree |
50
- | `a` | Add new worktree |
51
- | `d` | Delete worktree |
52
- | `o` | Open in editor |
53
- | `t` | Open in terminal |
54
- | `y` | Copy path to clipboard |
55
-
56
- ### Other
57
- | Key | Action |
58
- |-----|--------|
95
+ | --- | --- |
96
+ | `j` / `k` | Move selection |
97
+ | `Enter` | Enter the selected worktree |
98
+ | `a` | Add a worktree |
99
+ | `d` | Delete a worktree |
59
100
  | `f` | Fetch remotes |
60
- | `r` | Refresh list |
101
+ | `p` / `P` | Pull / push |
102
+ | `m` / `M` | Merge upstream / merge selected branch |
103
+ | `o` / `t` | Open in editor / terminal |
104
+ | `y` | Copy path |
105
+ | `/` | Filter |
61
106
  | `s` | Cycle sort mode |
62
- | `c` | Open config |
63
- | `?` | Show help |
107
+ | `c` | View config |
108
+ | `?` | Help |
64
109
  | `q` | Quit |
65
110
 
66
- ## Adding Worktrees
111
+ ## What the list tells you
112
+
113
+ | Signal | Meaning |
114
+ | --- | --- |
115
+ | `✓ clean` | No local changes |
116
+ | `+ staged` | Staged changes |
117
+ | `~ unstaged` | Unstaged changes |
118
+ | `! conflict` | Merge conflict |
119
+ | `* mixed` | Staged and unstaged changes |
120
+ | `↑N` / `↓N` | Ahead / behind upstream |
121
+ | `PR` | GitHub PR state: `open`, `closed`, `merged`, `draft`, or `-` |
67
122
 
68
- Press `a`, type the new branch name, and press `Enter`. Use `Tab` in the add dialog to cycle the base branch for the new worktree.
123
+ The `PR` column is GitHub-only and best-effort. No PR, non-GitHub remotes, missing auth, network failures, and unknown states all show `-` so the worktree list stays fast and reliable.
69
124
 
70
- ## Status Icons
125
+ ## Shell integration
71
126
 
72
- | Icon | Meaning |
73
- |------|---------|
74
- | `✓` | Clean |
75
- | `+` | Staged changes |
76
- | `~` | Unstaged changes |
77
- | `!` | Conflicts |
78
- | `*` | Staged + Unstaged |
127
+ Install the shell helper:
79
128
 
80
- The worktree list also includes a `PR` column for GitHub pull request state. It shows only `open`, `closed`, `merged`, or `draft`; branches without a GitHub PR, non-GitHub remotes, lookup failures, and unknown states show `-`.
129
+ ```bash
130
+ owt setup
131
+ ```
132
+
133
+ Reload your shell. After that, pressing `Enter` in the TUI exits `owt` and moves the current shell into the selected worktree. Without shell integration, `owt` still prints the selected path for wrapper scripts and manual use.
81
134
 
82
135
  ## Configuration
83
136
 
84
- Config file: `~/.config/owt/config.toml`
137
+ Config file:
138
+
139
+ ```text
140
+ ~/.config/owt/config.toml
141
+ ```
142
+
143
+ Example:
85
144
 
86
145
  ```toml
87
146
  editor = "code"
88
147
  terminal = "Ghostty"
89
148
  worktree_root = "~/.owt/worktree"
90
149
  copy_files = [".env", ".envrc"]
150
+ run_post_add_script_in_tmux = false
91
151
  ```
92
152
 
153
+ Useful options:
154
+
155
+ | Option | Purpose |
156
+ | --- | --- |
157
+ | `editor` | Command used by `o` |
158
+ | `terminal` | Terminal app used by `t` |
159
+ | `worktree_root` | Root for new worktrees in regular repositories |
160
+ | `copy_files` | Files copied into new worktrees |
161
+ | `run_post_add_script_in_tmux` | Run `.owt/post-add.sh` in detached tmux after creating a worktree |
162
+
163
+ ## Commands
164
+
165
+ | Command | Purpose |
166
+ | --- | --- |
167
+ | `owt [PATH]` | Open the TUI for a repository or worktree |
168
+ | `owt clone <URL> [PATH]` | Clone into the `.bare` layout and create the first worktree |
169
+ | `owt init` | Print a manual conversion guide for `.bare` layout |
170
+ | `owt setup` | Install shell integration |
171
+ | `owt --version` | Print version |
172
+
93
173
  ## Requirements
94
174
 
95
- - Git 2.5+ (for worktree support)
96
- - A Git repository
175
+ - Git 2.5+
176
+ - A regular Git repository or a `.bare` worktree layout
177
+ - Optional: GitHub CLI `gh` for PR status
178
+ - Optional: tmux for post-add setup scripts
97
179
 
98
- ## More Information
180
+ ## License
99
181
 
100
- For more details, visit the [GitHub repository](https://github.com/dding-g/oh-my-worktree).
182
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oh-my-worktree",
3
- "version": "0.10.2",
3
+ "version": "0.10.3",
4
4
  "description": "A TUI tool for managing Git worktrees in bare and regular repositories",
5
5
  "keywords": [
6
6
  "git",
@@ -20,7 +20,7 @@
20
20
  "type": "git",
21
21
  "url": "https://github.com/dding-g/oh-my-worktree"
22
22
  },
23
- "homepage": "https://github.com/dding-g/oh-my-worktree#readme",
23
+ "homepage": "https://dding-g.github.io/oh-my-worktree/",
24
24
  "bugs": {
25
25
  "url": "https://github.com/dding-g/oh-my-worktree/issues"
26
26
  },