zui-agent-manager 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.
Files changed (4) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +130 -0
  3. package/dist/index.js +1228 -0
  4. package/package.json +50 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Thornhill
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,130 @@
1
+ # ZUI — The Agent Manager CLI
2
+
3
+ A terminal UI for managing [Claude Code](https://docs.anthropic.com/en/docs/claude-code) agents running in tmux sessions.
4
+
5
+ ```
6
+ ┌─────────────────────── zui - Agent Manager ───────────────────────┐
7
+ │ │
8
+ │ Session Status Running Preview │
9
+ │ ────────────────────────────────────────────────────────────── │
10
+ │> myapp-feat-auth [WORK] 12m 34s Implementing login... │
11
+ │ myapp-fix-api [WAIT] 3m 12s Allow tool use? (y/n) │
12
+ │ myapp-main [IDLE] 1h 5m > │
13
+ │ │
14
+ │ Ent:View g:Git Tab:Pane n:New y:YOLO w:Tree s:Set h:Help k:Kill │
15
+ └────────────────────────────────────────────────────────────────────┘
16
+ ```
17
+
18
+
19
+ ## Features
20
+
21
+ - **Split-pane TUI** — session list on the left, live session on the right
22
+ - **Zero config** — auto-discovers git repos in your home directory
23
+ - **Worktree management** — create git worktrees and launch agents in them
24
+ - **Session status** — detects working, waiting-for-input, error, and idle states
25
+ - **YOLO mode** — launch Claude with `--dangerously-skip-permissions`
26
+ - **Lazygit integration** — toggle a lazygit pane for the selected session
27
+ - **Responsive layout** — columns adapt to terminal width, handles resize
28
+
29
+ ## Prerequisites
30
+
31
+ | Dependency | Install |
32
+ |---|---|
33
+ | **Node.js 20+** | [nodejs.org](https://nodejs.org/) or your package manager |
34
+ | **tmux** | `sudo apt install tmux` (Debian/Ubuntu) · `brew install tmux` (macOS) · [tmux wiki](https://github.com/tmux/tmux/wiki/Installing) |
35
+ | **git** | `sudo apt install git` (Debian/Ubuntu) · `brew install git` (macOS) · [git-scm.com](https://git-scm.com/downloads) |
36
+ | **Claude Code** | `npm install -g @anthropic-ai/claude-code` · [docs](https://docs.anthropic.com/en/docs/claude-code) |
37
+
38
+ ## Installation
39
+
40
+ ```bash
41
+ # Clone, build, and link globally
42
+ git clone https://github.com/thornhill6305/zui.git
43
+ cd zui
44
+ npm install
45
+ npm run build
46
+ npm link
47
+ ```
48
+
49
+ ## Usage
50
+
51
+ ```bash
52
+ # Launch ZUI (auto-wraps in tmux if needed)
53
+ zui
54
+ ```
55
+
56
+ ### Keybindings
57
+
58
+ | Key | Action |
59
+ |---------|-------------------------------------------|
60
+ | `n` | New Claude session (pick a project) |
61
+ | `y` | New YOLO session (skip permissions) |
62
+ | `w` | Create a new git worktree |
63
+ | `Enter` | View selected session in right pane |
64
+ | `Tab` | Switch focus to session pane |
65
+ | `g` | Toggle lazygit pane |
66
+ | `k` | Kill selected session |
67
+ | `x` | Clean up a worktree |
68
+ | `s` | Settings |
69
+ | `h` | Help |
70
+ | `r` | Force refresh session list |
71
+ | `q` | Quit |
72
+
73
+ ### How It Works
74
+
75
+ 1. ZUI launches inside a tmux session (`zui-manager`)
76
+ 2. It discovers git repos in your cwd and home directory
77
+ 3. Claude sessions run on the default tmux server
78
+ 4. When you press Enter on a session, it splits the pane to show the live session
79
+ 5. Tab switches focus between ZUI and the session pane
80
+
81
+ ## Configuration (Optional)
82
+
83
+ ZUI works with zero config. For explicit control, create `~/.config/zui/config.toml`:
84
+
85
+ ```toml
86
+ # Custom tmux socket path (empty = default tmux server)
87
+ socket = ""
88
+
89
+ # Explicit project roots
90
+ [[projects]]
91
+ path = "~/myproject"
92
+
93
+ [[projects]]
94
+ path = "~/other-repo"
95
+
96
+ # Claude CLI arguments
97
+ [claude]
98
+ default_args = []
99
+ yolo_args = ["--dangerously-skip-permissions"]
100
+
101
+ # Post-create hooks (run after worktree creation)
102
+ [hooks]
103
+ post_worktree_create = "npm install"
104
+ ```
105
+
106
+ See [examples/config.toml](examples/config.toml) for a full example.
107
+
108
+ ## Architecture
109
+
110
+ ```
111
+ src/
112
+ ├── index.tsx # Entry point, tmux auto-wrapping
113
+ ├── app.tsx # Main App component, keybindings
114
+ ├── config.ts # Config loading (TOML)
115
+ ├── discovery.ts # Git repo/worktree scanning
116
+ ├── sessions.ts # Tmux session management
117
+ ├── worktrees.ts # Git worktree operations
118
+ ├── shell.ts # Shell command wrapper
119
+ ├── types.ts # Shared types
120
+ └── ui/
121
+ ├── Header.tsx # Title bar
122
+ ├── Footer.tsx # Keybinding hints
123
+ ├── SessionList.tsx # Responsive session table
124
+ ├── layout.ts # Split-pane management
125
+ └── theme.ts # Status colors
126
+ ```
127
+
128
+ ## License
129
+
130
+ MIT