arashi 1.1.2 → 1.2.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/README.md +17 -65
- package/bin/arashi +22 -2
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -73,15 +73,20 @@ arashi status
|
|
|
73
73
|
|
|
74
74
|
# Remove worktree when done
|
|
75
75
|
arashi remove feature-new-api
|
|
76
|
+
|
|
77
|
+
# Remove a specific worktree path
|
|
78
|
+
arashi remove -f "$(arashi list | fzf)"
|
|
76
79
|
```
|
|
77
80
|
|
|
81
|
+
Note: `arashi remove` requires an interactive TTY. In non-interactive runs it exits with a clear error.
|
|
82
|
+
|
|
78
83
|
## Planned Commands
|
|
79
84
|
|
|
80
85
|
- `arashi init` - Initialize arashi in current repository
|
|
81
86
|
- `arashi add <git-url>` - Add a repository to the repos folder
|
|
82
87
|
- `arashi create <branch>` - Create coordinated worktrees
|
|
83
88
|
- `arashi list` - List all worktrees
|
|
84
|
-
- `arashi remove <branch>` - Remove worktrees and branches
|
|
89
|
+
- `arashi remove <branch|path>` - Remove worktrees and branches
|
|
85
90
|
- `arashi setup` - Run setup scripts
|
|
86
91
|
- `arashi status` - Show status of all repositories
|
|
87
92
|
|
|
@@ -96,6 +101,9 @@ Navigate to any worktree interactively:
|
|
|
96
101
|
```bash
|
|
97
102
|
# Interactive worktree selection
|
|
98
103
|
cd $(arashi list | fzf)
|
|
104
|
+
|
|
105
|
+
# Remove a selected worktree
|
|
106
|
+
arashi remove -f "$(arashi list | fzf)"
|
|
99
107
|
```
|
|
100
108
|
|
|
101
109
|
**Add as a shell keybinding** for instant access:
|
|
@@ -168,68 +176,25 @@ bindkey -s '^g' 'arashi-tmux\n' # Zsh
|
|
|
168
176
|
|
|
169
177
|
#### Setup
|
|
170
178
|
|
|
171
|
-
|
|
172
|
-
# Install sesh
|
|
173
|
-
brew install joshmedeski/sesh/sesh
|
|
174
|
-
|
|
175
|
-
# Add arashi as a sesh source
|
|
176
|
-
# ~/.config/sesh/sesh.toml
|
|
177
|
-
[sources]
|
|
178
|
-
arashi = "arashi list"
|
|
179
|
-
```
|
|
179
|
+
Follow sesh's [installation instructions](https://github.com/joshmedeski/sesh?tab=readme-ov-file#how-to-install)
|
|
180
180
|
|
|
181
181
|
#### Usage
|
|
182
182
|
|
|
183
183
|
```bash
|
|
184
|
-
# Select from
|
|
185
|
-
sesh connect $(
|
|
184
|
+
# Select from arashi worktrees
|
|
185
|
+
sesh connect $(arashi list | fzf)
|
|
186
186
|
|
|
187
|
-
# Or create a keybinding (Ctrl+
|
|
188
|
-
bind '"\C-
|
|
187
|
+
# Or create a keybinding (Ctrl+G)
|
|
188
|
+
bind '"\C-g":"sesh connect \$(arashi list | fzf)\n"'
|
|
189
|
+
# zsh:
|
|
190
|
+
bindkey -s '^g' 'sesh connect $(arashi list | fzf)\n'
|
|
189
191
|
```
|
|
190
192
|
|
|
191
193
|
**Benefits of sesh:**
|
|
192
|
-
- Unified list of existing tmux sessions + arashi worktrees
|
|
193
194
|
- Smart session naming and path handling
|
|
194
195
|
- Automatic tmux session creation
|
|
195
196
|
- Works seamlessly with zoxide and other tools
|
|
196
197
|
|
|
197
|
-
### Fish + tmux Integration
|
|
198
|
-
|
|
199
|
-
For Fish shell users, here's a complete solution:
|
|
200
|
-
|
|
201
|
-
```fish
|
|
202
|
-
# ~/.config/fish/functions/arashi_session.fish
|
|
203
|
-
function arashi_session
|
|
204
|
-
set -l worktree (arashi list | fzf \
|
|
205
|
-
--preview 'cd {} && git status' \
|
|
206
|
-
--preview-window=right:60% \
|
|
207
|
-
--height=80%)
|
|
208
|
-
|
|
209
|
-
if test -n "$worktree"
|
|
210
|
-
set -l session_name (basename $worktree)
|
|
211
|
-
|
|
212
|
-
if not tmux has-session -t $session_name 2>/dev/null
|
|
213
|
-
tmux new-session -d -s $session_name -c $worktree
|
|
214
|
-
end
|
|
215
|
-
|
|
216
|
-
if set -q TMUX
|
|
217
|
-
tmux switch-client -t $session_name
|
|
218
|
-
else
|
|
219
|
-
tmux attach-session -t $session_name
|
|
220
|
-
end
|
|
221
|
-
end
|
|
222
|
-
end
|
|
223
|
-
|
|
224
|
-
# Bind to Ctrl+G
|
|
225
|
-
bind \cg arashi_session
|
|
226
|
-
```
|
|
227
|
-
|
|
228
|
-
This includes:
|
|
229
|
-
- Live git status preview in fzf
|
|
230
|
-
- Automatic session creation with smart naming
|
|
231
|
-
- Works both inside and outside tmux
|
|
232
|
-
|
|
233
198
|
### Comparison Table
|
|
234
199
|
|
|
235
200
|
| Method | Setup Complexity | Features | Best For |
|
|
@@ -248,7 +213,7 @@ This includes:
|
|
|
248
213
|
### Example Workflow
|
|
249
214
|
|
|
250
215
|
```bash
|
|
251
|
-
|
|
216
|
+
1. Run `arashi create feature-new-api` to set up worktrees across repos
|
|
252
217
|
1. Press Ctrl+G
|
|
253
218
|
2. Type "feature" to filter worktrees
|
|
254
219
|
3. Select your feature branch worktree
|
|
@@ -282,9 +247,6 @@ bun install
|
|
|
282
247
|
# Run in development mode
|
|
283
248
|
bun run dev
|
|
284
249
|
|
|
285
|
-
# Build single-file executable
|
|
286
|
-
bun run build
|
|
287
|
-
|
|
288
250
|
# Build for all platforms
|
|
289
251
|
bun run build:all
|
|
290
252
|
|
|
@@ -328,16 +290,6 @@ Arashi is built with:
|
|
|
328
290
|
|
|
329
291
|
See the [Design Document](https://github.com/corwinm/arashi-arashi/tree/main/setup/.specify/memory/design.md) in the specs repository for the complete feature roadmap organized by implementation phases.
|
|
330
292
|
|
|
331
|
-
### Current Phase: Foundation (Phase 1)
|
|
332
|
-
- [x] Project setup and structure
|
|
333
|
-
- [x] Type definitions
|
|
334
|
-
- [ ] Utility libraries (git, config, filesystem, logger, prompts)
|
|
335
|
-
|
|
336
|
-
### Next Phase: Core Commands (Phase 2)
|
|
337
|
-
- [ ] `init` command
|
|
338
|
-
- [ ] `add` command
|
|
339
|
-
- [ ] `create` command
|
|
340
|
-
|
|
341
293
|
## Why "Arashi"?
|
|
342
294
|
|
|
343
295
|
嵐 (Arashi) means "storm" in Japanese. This tool aims to be the calm center - the eye of the storm - that brings order to the chaos of managing multiple repositories and worktrees.
|
package/bin/arashi
CHANGED
|
@@ -38,5 +38,25 @@ if [ ! -f "$BINARY" ]; then
|
|
|
38
38
|
exit 1
|
|
39
39
|
fi
|
|
40
40
|
|
|
41
|
-
#
|
|
42
|
-
|
|
41
|
+
# Close stdin only when piping list output (fzf compatibility)
|
|
42
|
+
command=""
|
|
43
|
+
force_remove="false"
|
|
44
|
+
for arg in "$@"; do
|
|
45
|
+
case "$arg" in
|
|
46
|
+
-*)
|
|
47
|
+
case "$arg" in
|
|
48
|
+
-f|--force) force_remove="true" ;;
|
|
49
|
+
esac
|
|
50
|
+
continue
|
|
51
|
+
;;
|
|
52
|
+
*) command="$arg"; break ;;
|
|
53
|
+
esac
|
|
54
|
+
done
|
|
55
|
+
|
|
56
|
+
if [ ! -t 1 ]; then
|
|
57
|
+
if [ "$command" = "list" ] || { [ "$command" = "remove" ] && [ "$force_remove" = "true" ]; }; then
|
|
58
|
+
exec "$BINARY" "$@" 0<&-
|
|
59
|
+
fi
|
|
60
|
+
fi
|
|
61
|
+
|
|
62
|
+
exec "$BINARY" "$@"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "arashi",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Git worktree manager for meta-repositories - The eye of the storm for your development workflow",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -61,6 +61,7 @@
|
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@inquirer/prompts": "^7.2.0",
|
|
63
63
|
"@semantic-release/changelog": "^6.0.3",
|
|
64
|
+
"@semantic-release/exec": "^7.1.0",
|
|
64
65
|
"@semantic-release/git": "^10.0.1",
|
|
65
66
|
"@types/bun": "latest",
|
|
66
67
|
"bun-types": "latest",
|