peakypanes 0.0.7 β†’ 0.0.8

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 +24 -307
  2. package/package.json +5 -5
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # 🎩 Peaky Panes
1
+ # Peaky Panes
2
2
 
3
3
  ```
4
4
  β–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–ˆ β–ˆ β–ˆ β–ˆ β–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–ˆ β–ˆ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆ
@@ -8,6 +8,12 @@
8
8
 
9
9
  **Multi-project orchestration in a single TUI for AI agents and dev environments.**
10
10
 
11
+ [![npm](https://img.shields.io/npm/v/peakypanes?logo=npm)](https://www.npmjs.com/package/peakypanes)
12
+ [![homebrew](https://img.shields.io/badge/homebrew-regenrek%2Ftap%2Fpeakypanes-2e933c?logo=homebrew)](https://github.com/regenrek/homebrew-tap)
13
+ [![DeepWiki](https://img.shields.io/badge/DeepWiki-regenrek%2Fpeakypanes-blue.svg?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAyCAYAAAAnWDnqAAAAAXNSR0IArs4c6QAAA05JREFUaEPtmUtyEzEQhtWTQyQLHNak2AB7ZnyXZMEjXMGeK/AIi+QuHrMnbChYY7MIh8g01fJoopFb0uhhEqqcbWTp06/uv1saEDv4O3n3dV60RfP947Mm9/SQc0ICFQgzfc4CYZoTPAswgSJCCUJUnAAoRHOAUOcATwbmVLWdGoH//PB8mnKqScAhsD0kYP3j/Yt5LPQe2KvcXmGvRHcDnpxfL2zOYJ1mFwrryWTz0advv1Ut4CJgf5uhDuDj5eUcAUoahrdY/56ebRWeraTjMt/00Sh3UDtjgHtQNHwcRGOC98BJEAEymycmYcWwOprTgcB6VZ5JK5TAJ+fXGLBm3FDAmn6oPPjR4rKCAoJCal2eAiQp2x0vxTPB3ALO2CRkwmDy5WohzBDwSEFKRwPbknEggCPB/imwrycgxX2NzoMCHhPkDwqYMr9tRcP5qNrMZHkVnOjRMWwLCcr8ohBVb1OMjxLwGCvjTikrsBOiA6fNyCrm8V1rP93iVPpwaE+gO0SsWmPiXB+jikdf6SizrT5qKasx5j8ABbHpFTx+vFXp9EnYQmLx02h1QTTrl6eDqxLnGjporxl3NL3agEvXdT0WmEost648sQOYAeJS9Q7bfUVoMGnjo4AZdUMQku50McDcMWcBPvr0SzbTAFDfvJqwLzgxwATnCgnp4wDl6Aa+Ax283gghmj+vj7feE2KBBRMW3FzOpLOADl0Isb5587h/U4gGvkt5v60Z1VLG8BhYjbzRwyQZemwAd6cCR5/XFWLYZRIMpX39AR0tjaGGiGzLVyhse5C9RKC6ai42ppWPKiBagOvaYk8lO7DajerabOZP46Lby5wKjw1HCRx7p9sVMOWGzb/vA1hwiWc6jm3MvQDTogQkiqIhJV0nBQBTU+3okKCFDy9WwferkHjtxib7t3xIUQtHxnIwtx4mpg26/HfwVNVDb4oI9RHmx5WGelRVlrtiw43zboCLaxv46AZeB3IlTkwouebTr1y2NjSpHz68WNFjHvupy3q8TFn3Hos2IAk4Ju5dCo8B3wP7VPr/FGaKiG+T+v+TQqIrOqMTL1VdWV1DdmcbO8KXBz6esmYWYKPwDL5b5FA1a0hwapHiom0r/cKaoqr+27/XcrS5UwSMbQAAAABJRU5ErkJggg==)](https://deepwiki.com/regenrek/peakypanes)
14
+ [![pkg.go.dev](https://pkg.go.dev/badge/github.com/regenrek/peakypanes/cmd/devwatch.svg)](https://pkg.go.dev/github.com/regenrek/peakypanes/cmd/devwatch)
15
+
16
+
11
17
  ![Peaky Panes Preview](assets/preview-peakypanes-v2.jpg)
12
18
 
13
19
 
@@ -59,12 +65,6 @@ Using Go
59
65
  go install github.com/regenrek/peakypanes/cmd/peakypanes@latest
60
66
  ```
61
67
 
62
- **Hot reload (from repo)**
63
-
64
- ```bash
65
- scripts/dev-watch -- --layout dev-3
66
- ```
67
-
68
68
  ### Usage
69
69
 
70
70
  **Start a session (auto-detect layout):**
@@ -72,12 +72,6 @@ scripts/dev-watch -- --layout dev-3
72
72
  peakypanes start
73
73
  ```
74
74
 
75
- **Use a specific layout:**
76
- ```bash
77
- peakypanes start --layout dev-3
78
- peakypanes start --layout fullstack
79
- ```
80
-
81
75
  **Create project-local config (recommended for teams):**
82
76
  ```bash
83
77
  cd your-project
@@ -86,322 +80,45 @@ peakypanes init --local
86
80
  git add .peakypanes.yml # Share with team
87
81
  ```
88
82
 
89
- **Run the daemon in the foreground (optional):**
90
- ```bash
91
- peakypanes daemon
92
- ```
93
-
94
- ## Configuration
83
+ ## Documentation
95
84
 
96
- > πŸ“– **[Layout Builder Guide](docs/layout-builder.md)** - Detailed documentation on creating custom layouts, pane arrangements, and configuration.
85
+ - [Configuration & layouts](docs/configuration.md)
86
+ - [Layout builder guide](docs/layout-builder.md)
87
+ - [Dashboard & keybindings](docs/dashboard.md)
88
+ - [CLI reference](docs/cli.md)
89
+ - [Testing](docs/testing.md)
90
+ - [Daemon & troubleshooting](docs/troubleshooting.md)
91
+ - [Release process](RELEASE-DOCS.md)
97
92
 
98
- ### Project-Local (`.peakypanes.yml`)
93
+ ## Configuration (quick look)
99
94
 
100
- Create in your project root for team-shared layouts:
95
+ Project-local config lives in `.peakypanes.yml`, and global config lives in `~/.config/peakypanes/config.yml`.
96
+ See the full schema, built-in layouts, and variable expansion in [docs/configuration.md](docs/configuration.md).
101
97
 
102
98
  ```yaml
103
- # .peakypanes.yml
104
99
  session: my-project
105
100
 
106
101
  layout:
107
102
  panes:
108
103
  - title: editor
109
104
  cmd: "${EDITOR:-}"
110
- size: "60%"
111
105
  - title: server
112
106
  cmd: "npm run dev"
113
107
  split: horizontal
114
- - title: shell
115
- cmd: ""
116
- split: vertical
117
- - title: docker
118
- cmd: "docker compose logs -f"
119
-
120
- # Or use exact grids
121
- # layout:
122
- # grid: 2x3
123
- # commands:
124
- # - "${SHELL:-bash}"
125
- # - "codex"
126
- # - "codex"
127
- # - "codex"
128
- # - "codex"
129
- # - "codex"
130
- # titles:
131
- # - shell
132
- # - codex-1
133
- # - codex-2
134
- # - codex-3
135
- # - codex-4
136
- # - codex-5
137
-
138
- # Optional per-project dashboard overrides
139
- # dashboard:
140
- # sidebar:
141
- # hidden: true
142
- ```
143
-
144
- ### Global Config (`~/.config/peakypanes/config.yml`)
145
-
146
- For personal layouts and multi-project management:
147
-
148
- ```yaml
149
- # Dashboard UI settings (optional)
150
- # dashboard:
151
- # project_roots:
152
- # - ~/projects
153
- # - ~/code
154
-
155
- # Custom layouts
156
- layouts:
157
- my-custom:
158
- panes:
159
- - title: code
160
- cmd: nvim
161
- - title: term
162
- cmd: ""
163
-
164
- # Projects for quick switching
165
- projects:
166
- - name: webapp
167
- session: webapp
168
- path: ~/projects/webapp
169
- layout: fullstack
170
- ```
171
-
172
- ## Variable Expansion
173
-
174
- Use variables in your layouts:
175
-
176
- | Variable | Description |
177
- |----------|-------------|
178
- | `${PROJECT_PATH}` | Absolute path to project |
179
- | `${PROJECT_NAME}` | Directory name |
180
- | `${EDITOR}` | Your $EDITOR |
181
- | `${VAR:-default}` | Env var with default |
182
-
183
- ```yaml
184
- layout:
185
- vars:
186
- log_file: "${HOME}/logs/${PROJECT_NAME}.log"
187
- panes:
188
- - cmd: "tail -f ${log_file}"
189
- ```
190
-
191
- ## Commands
192
-
193
- ```bash
194
- peakypanes # Open dashboard (direct)
195
- peakypanes dashboard # Open dashboard (direct)
196
- peakypanes open # Start session and open dashboard
197
- peakypanes start # Same as open
198
- peakypanes start --layout X # Use specific layout
199
- peakypanes init # Create global config
200
- peakypanes init --local # Create .peakypanes.yml
201
- peakypanes layouts # List available layouts
202
- peakypanes layouts export X # Export layout YAML
203
- peakypanes clone user/repo # Clone from GitHub and start session
204
- peakypanes version # Show version
205
- ```
206
-
207
- ## Troubleshooting: daemon stuck / restart
208
-
209
- The daemon owns sessions and PTYs. If it becomes unresponsive, the only recovery
210
- today is a manual restart, which **will terminate all running sessions**.
211
-
212
- **Manual restart (macOS default path):**
213
- ```bash
214
- kill "$(cat "$HOME/Library/Application Support/peakypanes/daemon.pid")"
215
- ```
216
-
217
- **Manual restart (Linux default path):**
218
- ```bash
219
- kill "$(cat "$HOME/.config/peakypanes/daemon.pid")"
220
- ```
221
-
222
- You can also set `PEAKYPANES_DAEMON_PID` to control the pid file location.
223
-
224
- ### Proposed UX (future)
225
- If the app detects a hung daemon, it should show a dialog like:
226
- **β€œRestart daemon? This will stop all running sessions and close their PTYs.”**
227
- This makes the data-loss tradeoff explicit before taking action.
228
-
229
- ## Built-in Layouts
230
-
231
- Core (general) layouts:
232
- - `auto` (default): no layout flag; auto-detects `.peakypanes.yml` or falls back to `dev-3`
233
- - `simple`: single pane
234
- - `split-v`: two vertical panes (left/right)
235
- - `split-h`: two horizontal panes (top/bottom)
236
- - `2x2`: 4‑pane grid
237
- - `3x4`: 12‑pane grid
238
- - `codex-dev`: 2x3 grid (shell + 5 codex)
239
-
240
- Additional built-ins (specialized):
241
- - `dev-2`: editor + shell
242
- - `dev-3`: editor + server + shell (default fallback)
243
- - `fullstack`: editor + server + shell + logs
244
- - `go-dev`: code/run/test + git
245
- - `codex-grid`: 2x4 grid running codex in every pane
246
-
247
- ```bash
248
- # List all layouts
249
- peakypanes layouts
250
-
251
- # Export a layout to customize
252
- peakypanes layouts export codex-dev > .peakypanes.yml
253
- ```
254
-
255
- ## Dashboard UI
256
-
257
- Running `peakypanes` with no subcommand opens the dashboard UI in the current terminal.
258
-
259
- The dashboard shows:
260
- - Projects on top (tabs)
261
- - Sessions on the left (with pane counts and expandable panes)
262
- - Live pane preview on the right (native panes are fully interactive)
263
- - Input bar (always visible) and target pane highlight for follow-ups
264
-
265
- Navigation (always visible):
266
- - `ctrl+q/ctrl+e` project, `ctrl+w/ctrl+s` session/panes, `alt+w/alt+s` session only, `ctrl+a/ctrl+d` pane, `ctrl+g` help
267
-
268
- Key bindings (also shown in the help view):
269
- Keymap overrides are available in the global config (`~/.config/peakypanes/config.yml`).
270
-
271
- Project
272
- - `ctrl+o` open project picker (creates session detached; stay in dashboard)
273
- - `ctrl+b` toggle sidebar (show/hide sessions list)
274
- - `alt+c` close project (hides from tabs; sessions keep running; press k in the dialog to kill)
275
-
276
- Session
277
- - `enter` attach/start session (when reply is empty)
278
- - `ctrl+n` new session (pick layout)
279
- - `ctrl+x` kill session
280
- - rename session via command palette (`ctrl+p`)
281
-
282
- Window
283
- Pane list
284
- - `ctrl+u` toggle pane list
285
-
286
- Pane
287
- - rename pane via command palette (`ctrl+p`)
288
- - `ctrl+y` peek selected pane in new terminal
289
- - `ctrl+\` toggle terminal focus (native only; configurable via `dashboard.keymap.terminal_focus`)
290
- - mouse: single-click selects a pane; double-click toggles terminal focus (native only); `esc` exits focus
291
- - `f7` scrollback mode (native only; configurable via `dashboard.keymap.scrollback`)
292
- - `f8` copy mode (native only; configurable via `dashboard.keymap.copy_mode`)
293
-
294
- Other
295
- - `ctrl+p` command palette
296
- - `ctrl+r` refresh, `ctrl+,` edit config, `ctrl+f` filter, `ctrl+c` quit
297
-
298
- Input details: the input is always activeβ€”type and press `enter` to send to the highlighted pane. Use `esc` to clear. Type `/` to see slash commands and press `tab` to autocomplete. Toggle terminal focus to send raw keystrokes into the pane. Use scrollback (`f7`) to navigate output and copy mode (`f8`) to select/yank (`v` select, `y` yank, `esc/q` exit).
299
-
300
- ### Dashboard Config (optional)
301
-
302
- ```yaml
303
- dashboard:
304
- refresh_ms: 2000
305
- preview_lines: 12
306
- preview_compact: true
307
- idle_seconds: 20
308
- preview_mode: grid # grid | layout
309
- sidebar:
310
- hidden: false
311
- attach_behavior: current # current | detached
312
- pane_navigation_mode: spatial # spatial | memory
313
- quit_behavior: prompt # prompt | keep | stop
314
- keymap:
315
- project_left: ["ctrl+q"]
316
- project_right: ["ctrl+e"]
317
- session_up: ["ctrl+w"]
318
- session_down: ["ctrl+s"]
319
- session_only_up: ["alt+w"]
320
- session_only_down: ["alt+s"]
321
- pane_next: ["ctrl+d"]
322
- pane_prev: ["ctrl+a"]
323
- terminal_focus: ["ctrl+\\"]
324
- scrollback: ["f7"]
325
- copy_mode: ["f8"]
326
- toggle_panes: ["ctrl+u"]
327
- toggle_sidebar: ["ctrl+b"]
328
- close_project: ["alt+c"]
329
- command_palette: ["ctrl+p"]
330
- edit_config: ["ctrl+,"]
331
- help: ["ctrl+g"]
332
- quit: ["ctrl+c"]
333
- status_regex:
334
- success: "(?i)done|finished|success|completed|βœ…"
335
- error: "(?i)error|failed|panic|❌"
336
- running: "(?i)running|in progress|building|installing|β–Ά"
337
- agent_detection:
338
- codex: true
339
- claude: true
340
108
  ```
341
109
 
342
- `attach_behavior` controls what the β€œattach/start” action does (default `current`): `current` focuses the selected session in the dashboard, and `detached` creates the session without switching focus.
343
- `pane_navigation_mode` controls left/right navigation across projects and dashboard columns: `spatial` keeps the same row when moving between projects, and `memory` restores the last selection per project.
344
- `quit_behavior` controls what happens on quit when panes are still running: `prompt` (default) shows a quit dialog, `keep` exits immediately and leaves sessions running, and `stop` stops the daemon (killing all panes).
345
-
346
- ### Agent Status Detection (Codex & Claude Code)
347
-
348
- PeakyPanes can read per-pane JSON state files to show accurate running/idle/done status for Codex CLI and Claude Code TUI sessions. This is **on by default** and falls back to regex/idle detection if no state file is present. You can disable it via `dashboard.agent_detection`.
110
+ ## Dashboard
349
111
 
350
- State files are written under `${XDG_RUNTIME_DIR:-/tmp}/peakypanes/agent-state` and keyed by `PEAKYPANES_PANE_ID` (override with `PEAKYPANES_AGENT_STATE_DIR`).
112
+ The dashboard shows projects, sessions, live previews, and a quick-reply bar for slash commands and broadcasts.
113
+ See [docs/dashboard.md](docs/dashboard.md) for keybindings, slash command behavior, and dashboard configuration.
351
114
 
352
- **Codex CLI (TUI)**
115
+ ## CLI
353
116
 
354
- Add a `notify` command in your Codex config to call the PeakyPanes hook script (Codex passes one JSON arg):
355
-
356
- ```toml
357
- # ~/.codex/config.toml
358
- notify = ["python3", "/absolute/path/to/peakypanes/scripts/agent-state/codex-notify.py"]
359
- ```
360
-
361
- Tip: with `npm i -g peakypanes`, the scripts live under `$(npm root -g)/peakypanes/scripts/agent-state/`.
362
- Note: Codex `notify` only fires on turn completion, so running state still relies on regex/idle detection between turns.
363
-
364
- **Claude Code (TUI)**
365
-
366
- Configure hooks to run the PeakyPanes hook script (Claude passes JSON on stdin). Recommended events:
367
- `SessionStart`, `UserPromptSubmit`, `PreToolUse`, `PermissionRequest`, `Stop`, `SessionEnd`.
368
-
369
- Example hook command (wire it to each event above in Claude Code):
370
-
371
- ```bash
372
- python3 /absolute/path/to/peakypanes/scripts/agent-state/claude-hook.py
373
- ```
374
-
375
- ## How Layout Detection Works
376
-
377
- 1. `--layout` flag (highest priority)
378
- 2. `.peakypanes.yml` in current directory
379
- 3. Project entry in `~/.config/peakypanes/config.yml`
380
- 4. Built-in `dev-3` layout (fallback)
117
+ See [docs/cli.md](docs/cli.md) for the full command list and examples.
381
118
 
382
119
  ## Testing
383
120
 
384
- Run the unit tests with coverage:
385
-
386
- ```bash
387
- go test ./... -coverprofile /tmp/peakypanes.cover
388
- go tool cover -func /tmp/peakypanes.cover | tail -n 1
389
- ```
390
-
391
- Race tests:
392
-
393
- ```bash
394
- go test ./... -race
395
- ```
396
-
397
- Manual npm smoke run (fresh HOME/XDG config):
398
-
399
- ```bash
400
- scripts/fresh-run
401
- scripts/fresh-run 0.0.6 --with-project
402
- ```
403
-
404
- GitHub Actions runs gofmt checks, go vet, go test with coverage, and race on Linux.
121
+ See [docs/testing.md](docs/testing.md) for the full test matrix and CI notes.
405
122
 
406
123
  ## Release
407
124
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "peakypanes",
3
- "version": "0.0.7",
3
+ "version": "0.0.8",
4
4
  "description": "Tmux layout manager with YAML based configuration.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/regenrek/peakypanes",
@@ -12,10 +12,10 @@
12
12
  "peakypanes": "bin/peakypanes.js"
13
13
  },
14
14
  "optionalDependencies": {
15
- "peakypanes-darwin-x64": "0.0.7",
16
- "peakypanes-darwin-arm64": "0.0.7",
17
- "peakypanes-linux-x64": "0.0.7",
18
- "peakypanes-linux-arm64": "0.0.7"
15
+ "peakypanes-darwin-x64": "0.0.8",
16
+ "peakypanes-darwin-arm64": "0.0.8",
17
+ "peakypanes-linux-x64": "0.0.8",
18
+ "peakypanes-linux-arm64": "0.0.8"
19
19
  },
20
20
  "engines": {
21
21
  "node": ">=18"