vde-layout 0.0.5 → 0.0.6

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 CHANGED
@@ -1,12 +1,13 @@
1
1
  # vde-layout
2
2
 
3
- vde-layout is a CLI that reproduces tmux pane layouts from YAML presets. Define the panes you need once, then bring them back with a single command.
3
+ vde-layout is a CLI that reproduces terminal layouts (tmux or WezTerm) from YAML presets. Define the panes you need once, then bring them back with a single command.
4
4
 
5
5
  ## Key Capabilities
6
6
  - Keep reusable presets for development, monitoring, reviews, and more.
7
7
  - Build nested horizontal/vertical splits with ratio-based sizing.
8
8
  - Launch commands in each pane with custom working directories, environment variables, delays, and titles.
9
9
  - Preview every tmux step in dry-run mode before you apply a preset.
10
+ - Target tmux or WezTerm backends with the same preset definitions.
10
11
  - Switch between configuration files by flag or environment variables.
11
12
 
12
13
  ## Installation
@@ -59,13 +60,22 @@ bun add -g vde-layout
59
60
  - `vde-layout list` – Show available presets with descriptions.
60
61
  - `vde-layout dev --dry-run` – Display the tmux steps without executing them.
61
62
  - `vde-layout dev --verbose` – Print informational logs, including resolved presets and plan details.
62
- - `vde-layout dev --current-window` – Reuse the current tmux window after confirming that other panes can be closed.
63
- - `vde-layout dev --new-window` – Force creation of a new tmux window even when presets or defaults request reuse.
63
+ - `vde-layout dev --backend wezterm` – Use the WezTerm backend (defaults to `tmux` when omitted).
64
+ - `vde-layout dev --current-window` – Reuse the current tmux window (or active WezTerm tab) after confirming that other panes can be closed.
65
+ - `vde-layout dev --new-window` – Force creation of a new tmux window or WezTerm tab even when presets or defaults request reuse.
64
66
  - `vde-layout --config /path/to/layout.yml` – Load presets from a specific file.
65
67
  - `vde-layout --help` – Show usage.
66
68
  - `vde-layout --version` / `vde-layout -v` – Print package version (`-V` is kept for compatibility).
67
69
 
68
- > **Note:** Applying a preset (without `--dry-run`) must be done inside an active tmux session.
70
+ > **Note:** Applying a preset (without `--dry-run`) must be done inside an active tmux session when using the tmux backend. For the WezTerm backend, ensure a WezTerm window is running and focused so the CLI can discover it.
71
+
72
+ ## Terminal Backends
73
+ vde-layout resolves backends in the following order: CLI flag (`--backend`), preset configuration, then defaults to `tmux`.
74
+
75
+ - **tmux (default)** – Requires an active tmux session for non-dry runs. `--current-window` closes other panes in the selected window after confirmation; `--new-window` always creates a new tmux window.
76
+ - **WezTerm** – Requires the `wezterm` CLI to be available (nightly channel recommended). Start WezTerm beforehand so at least one window exists.
77
+ - `--current-window` targets the active tab and confirms before closing other panes.
78
+ - `--new-window` spawns a new tab in the active window when one is available, otherwise creates a fresh window.
69
79
 
70
80
  ## Configuration Search Order
71
81
  When no `--config` flag is provided, vde-layout searches for configuration files in the following order:
@@ -92,7 +102,7 @@ presets:
92
102
  ```yaml
93
103
  layout:
94
104
  type: horizontal | vertical # required
95
- ratio: [3, 2, ...] # required; positive numbers, auto-normalized
105
+ ratio: [3, 2] # required; positive numbers, auto-normalized
96
106
  panes: # required
97
107
  - name: "left" # required for terminal panes
98
108
  command: "npm run start" # optional
@@ -147,7 +157,8 @@ presets:
147
157
 
148
158
  ## Requirements
149
159
  - Node.js 22 or higher
150
- - tmux 2.0 or higher
160
+ - tmux 2.0 or higher (required for the tmux backend)
161
+ - WezTerm nightly build with `wezterm` on `$PATH` (required for the WezTerm backend)
151
162
 
152
163
  ## Contributing
153
164
  Please submit bug reports and feature requests through [GitHub Issues](https://github.com/yuki-yano/vde-layout/issues).