@termwire/cli 0.2.0 → 0.2.1
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/CHANGELOG.md +9 -0
- package/README.md +162 -2
- package/dist/up.js +1 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @termwire/cli
|
|
2
2
|
|
|
3
|
+
## 0.2.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- eec1451: Termwire new sessions now set the outer terminal title from the tmux session name, and the tmux adapter exposes built-in layout selection.
|
|
8
|
+
- Updated dependencies [eec1451]
|
|
9
|
+
- @termwire/tmux@0.2.1
|
|
10
|
+
- @termwire/nvim@0.2.1
|
|
11
|
+
|
|
3
12
|
## 0.2.0
|
|
4
13
|
|
|
5
14
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -131,6 +131,165 @@ custom pane cwd, custom pane environment, shell-string command syntax, or
|
|
|
131
131
|
configuration/state persistence beyond reading these optional files for a new
|
|
132
132
|
session.
|
|
133
133
|
|
|
134
|
+
### Layout cookbook
|
|
135
|
+
|
|
136
|
+
#### Default: editor and shell
|
|
137
|
+
|
|
138
|
+
Use two simple windows when you want the editor and an ordinary shell kept separate.
|
|
139
|
+
|
|
140
|
+
```text
|
|
141
|
+
[editor] [shell]
|
|
142
|
+
┌──────────────────┐ ┌──────────────────┐
|
|
143
|
+
│ editor │ │ shell │
|
|
144
|
+
└──────────────────┘ └──────────────────┘
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
```jsonc
|
|
148
|
+
{
|
|
149
|
+
"version": 1,
|
|
150
|
+
"windows": [
|
|
151
|
+
{
|
|
152
|
+
"name": "editor",
|
|
153
|
+
"panes": [{ "id": "editor", "role": "editor" }],
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"name": "shell",
|
|
157
|
+
"panes": [{ "id": "shell" }],
|
|
158
|
+
},
|
|
159
|
+
],
|
|
160
|
+
}
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
#### Three-window workflow
|
|
164
|
+
|
|
165
|
+
Use independent windows when you want to move between editing, AI work, and a shell.
|
|
166
|
+
The `ai` window is an ordinary shell and does not start a command automatically.
|
|
167
|
+
|
|
168
|
+
```text
|
|
169
|
+
[editor] [ai] [shell]
|
|
170
|
+
┌──────────────────┐ ┌──────────────────┐ ┌──────────────────┐
|
|
171
|
+
│ editor │ │ ai (shell) │ │ shell │
|
|
172
|
+
└──────────────────┘ └──────────────────┘ └──────────────────┘
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
```jsonc
|
|
176
|
+
{
|
|
177
|
+
"version": 1,
|
|
178
|
+
"windows": [
|
|
179
|
+
{
|
|
180
|
+
"name": "editor",
|
|
181
|
+
"panes": [{ "id": "editor", "role": "editor" }],
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"name": "ai",
|
|
185
|
+
"panes": [{ "id": "ai" }],
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
"name": "shell",
|
|
189
|
+
"panes": [{ "id": "shell" }],
|
|
190
|
+
},
|
|
191
|
+
],
|
|
192
|
+
}
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
#### Focused coding
|
|
196
|
+
|
|
197
|
+
Keep editing, OpenCode, and watched tests visible together in one `work` window.
|
|
198
|
+
|
|
199
|
+
```text
|
|
200
|
+
[work]
|
|
201
|
+
┌───────────────────────────┬──────────────────┐
|
|
202
|
+
│ editor │ ai │
|
|
203
|
+
│ │ opencode │
|
|
204
|
+
│ │ │
|
|
205
|
+
│ ├──────────────────┤
|
|
206
|
+
│ │ tests (new: 40%) │
|
|
207
|
+
│ │ bun test --watch │
|
|
208
|
+
└───────────────────────────┴──────────────────┘
|
|
209
|
+
right side: 40%
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
```jsonc
|
|
213
|
+
{
|
|
214
|
+
"version": 1,
|
|
215
|
+
"windows": [
|
|
216
|
+
{
|
|
217
|
+
"name": "work",
|
|
218
|
+
"panes": [
|
|
219
|
+
{ "id": "editor", "role": "editor" },
|
|
220
|
+
{
|
|
221
|
+
"id": "ai",
|
|
222
|
+
"splitFrom": "editor",
|
|
223
|
+
"direction": "horizontal",
|
|
224
|
+
"sizePercent": 40,
|
|
225
|
+
"command": ["opencode"],
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
"id": "tests",
|
|
229
|
+
"splitFrom": "ai",
|
|
230
|
+
"direction": "vertical",
|
|
231
|
+
"sizePercent": 40,
|
|
232
|
+
"command": ["bun", "test", "--watch"],
|
|
233
|
+
},
|
|
234
|
+
],
|
|
235
|
+
},
|
|
236
|
+
],
|
|
237
|
+
}
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
#### Full-stack
|
|
241
|
+
|
|
242
|
+
Separate code, the development server, and a spare shell while keeping watched tests under the
|
|
243
|
+
editor.
|
|
244
|
+
|
|
245
|
+
```text
|
|
246
|
+
[code] [server] [shell]
|
|
247
|
+
┌──────────────────┐ ┌────────────────────┐ ┌──────────────────┐
|
|
248
|
+
│ editor │ │ server │ │ shell │
|
|
249
|
+
│ │ │ bun run dev │ │ │
|
|
250
|
+
│ │ │ │ │ │
|
|
251
|
+
│ │ │ │ │ │
|
|
252
|
+
│ │ │ │ │ │
|
|
253
|
+
├──────────────────┤ │ │ │ │
|
|
254
|
+
│ tests (new: 35%) │ │ │ │ │
|
|
255
|
+
│ bun test --watch │ │ │ │ │
|
|
256
|
+
│ │ │ │ │ │
|
|
257
|
+
└──────────────────┘ └────────────────────┘ └──────────────────┘
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
```jsonc
|
|
261
|
+
{
|
|
262
|
+
"version": 1,
|
|
263
|
+
"windows": [
|
|
264
|
+
{
|
|
265
|
+
"name": "code",
|
|
266
|
+
"panes": [
|
|
267
|
+
{ "id": "editor", "role": "editor" },
|
|
268
|
+
{
|
|
269
|
+
"id": "tests",
|
|
270
|
+
"splitFrom": "editor",
|
|
271
|
+
"direction": "vertical",
|
|
272
|
+
"sizePercent": 35,
|
|
273
|
+
"command": ["bun", "test", "--watch"],
|
|
274
|
+
},
|
|
275
|
+
],
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
"name": "server",
|
|
279
|
+
"panes": [{ "id": "server", "command": ["bun", "run", "dev"] }],
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
"name": "shell",
|
|
283
|
+
"panes": [{ "id": "shell" }],
|
|
284
|
+
},
|
|
285
|
+
],
|
|
286
|
+
}
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
`horizontal` means left/right, `vertical` means top/bottom, and `sizePercent` applies to the new
|
|
290
|
+
pane. Layouts affect only newly created sessions; attaches are unchanged. The OpenCode and Bun
|
|
291
|
+
commands are replaceable examples.
|
|
292
|
+
|
|
134
293
|
### Errors and session behavior
|
|
135
294
|
|
|
136
295
|
JSONC parse errors identify the source and one-based line and column. Schema
|
|
@@ -146,8 +305,9 @@ while preserving the original failure.
|
|
|
146
305
|
argv command, or tmux's default shell when an ordinary pane has no command.
|
|
147
306
|
Final processes receive `TERMWIRE_SESSION`, `TERMWIRE_SOCKET`, and
|
|
148
307
|
`TERMWIRE_EDITOR_PANE`.
|
|
149
|
-
-
|
|
150
|
-
|
|
308
|
+
- The default layout does not start OpenCode automatically. Users may start it manually in an
|
|
309
|
+
ordinary shell pane, or configure `["opencode"]` as a pane command. They may also reshape the
|
|
310
|
+
workspace with tmux after creation.
|
|
151
311
|
- The CLI has no shell-facing `open` command and does not need to be in `PATH`
|
|
152
312
|
for the plugin: the plugin composes the nvim and tmux adapters directly.
|
|
153
313
|
|
package/dist/up.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@termwire/cli",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
"url": "https://github.com/max-konin/termwire/issues"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@termwire/nvim": "^0.2.
|
|
41
|
-
"@termwire/tmux": "^0.2.
|
|
40
|
+
"@termwire/nvim": "^0.2.1",
|
|
41
|
+
"@termwire/tmux": "^0.2.1",
|
|
42
42
|
"commander": "^15.0.0",
|
|
43
43
|
"jsonc-parser": "^3.3.1",
|
|
44
44
|
"zod": "^4.0.0"
|