feat(tui): add interactive repository selection
Introduce a Bubble Tea control deck with eligible repositories preselected, keyboard navigation, responsive paging, and detailed explanations for blocked worktrees. Require confirmation before synchronization, allow refreshing the workspace, and retain each repository's latest hub output without changing the existing CLI and JSON workflows.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
`stack-sync` safely runs [`hub sync`](https://hub.github.com/hub-sync.1.html) across every Git repository in a workspace. It is designed for directory trees such as JezzWTF where the root may not be a repository and a parent repository may contain deliberately untracked, nested repositories.
|
||||
|
||||
The interface is deliberately a CLI rather than a full-screen TUI: every run produces a reviewable plan, it works over SSH and in automation, and its JSON output can drive a future TUI or GUI without putting safety logic in the presentation layer.
|
||||
It provides both a full-screen [Bubble Tea](https://github.com/charmbracelet/bubbletea) control deck for interactive work and a conventional CLI/JSON interface for SSH sessions and automation. Both interfaces use the same discovery and safety engine.
|
||||
|
||||
## Safety model
|
||||
|
||||
@@ -32,6 +32,18 @@ install -Dm755 stack-sync ~/.local/bin/stack-sync
|
||||
|
||||
## Usage
|
||||
|
||||
### Interactive TUI
|
||||
|
||||
Launch the control deck for the workspace:
|
||||
|
||||
```bash
|
||||
stack-sync tui --root ~/Coding/jwtf
|
||||
```
|
||||
|
||||
Every eligible repository starts selected. Move with the arrow keys or `j`/`k`, toggle the focused repository with Space, select all with `a`, clear the selection with `n`, and refresh with `r`. Press `s` or Enter to review the destructive-branch warning, then `y` to begin. Blocked repositories cannot be selected and show their first dirty paths in the detail panel. After a run, focusing a repository shows its latest `hub` output.
|
||||
|
||||
### CLI and automation
|
||||
|
||||
Scan the current workspace. This is read-only and is the default command:
|
||||
|
||||
```bash
|
||||
|
||||
Reference in New Issue
Block a user