feat(tui): add repository picker
- add the tui command using Bubble Tea and Lip Gloss - preselect eligible repositories and disable selection for blocked repositories - add keyboard controls for navigation, selection, refresh, sync, and cancellation - require confirmation before sync and show the branch-deletion warning - show dirty paths, block reasons, and hub output for the focused repository - add TUI model tests and set the embedded version to 0.2.0
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