@libtmux/workspace-cli 0.1.0-alpha.11 → 0.1.0-alpha.12
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,24 +1,58 @@
|
|
|
1
1
|
# Workspace CLI
|
|
2
2
|
|
|
3
3
|
Manage tmux workspaces from YAML and JSON with Node.js 22.12+ or Bun 1.3.14+.
|
|
4
|
-
|
|
4
|
+
`tmux-workspace` loads, captures, converts and imports tmuxp workspace files.
|
|
5
|
+
This implementation is in development.
|
|
5
6
|
|
|
6
|
-
##
|
|
7
|
+
## Install
|
|
7
8
|
|
|
8
|
-
Run
|
|
9
|
+
Run the command without installing it. With Node:
|
|
9
10
|
|
|
10
11
|
```console
|
|
11
|
-
$
|
|
12
|
+
$ npx -y @libtmux/workspace-cli@0.1.0-alpha.12 --help
|
|
12
13
|
```
|
|
13
14
|
|
|
15
|
+
With Bun. The command names `node` in its shebang, so `bunx` runs it on Node
|
|
16
|
+
when Node is installed; `--bun` runs it on Bun:
|
|
17
|
+
|
|
14
18
|
```console
|
|
15
|
-
$
|
|
19
|
+
$ bunx --bun @libtmux/workspace-cli@0.1.0-alpha.12 --help
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
With pnpm:
|
|
23
|
+
|
|
24
|
+
```console
|
|
25
|
+
$ pnpm dlx @libtmux/workspace-cli@0.1.0-alpha.12 --help
|
|
16
26
|
```
|
|
17
27
|
|
|
28
|
+
With Yarn. Yarn refuses a release younger than its `npmMinimalAgeGate`, one
|
|
29
|
+
day by default:
|
|
30
|
+
|
|
18
31
|
```console
|
|
19
|
-
$
|
|
32
|
+
$ yarn dlx @libtmux/workspace-cli@0.1.0-alpha.12 --help
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Or install it globally, which puts `tmux-workspace` on `PATH`. With npm:
|
|
36
|
+
|
|
37
|
+
```console
|
|
38
|
+
$ npm install --global @libtmux/workspace-cli@0.1.0-alpha.12
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
With pnpm:
|
|
42
|
+
|
|
43
|
+
```console
|
|
44
|
+
$ pnpm add --global @libtmux/workspace-cli@0.1.0-alpha.12
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
With Bun:
|
|
48
|
+
|
|
49
|
+
```console
|
|
50
|
+
$ bun add --global @libtmux/workspace-cli@0.1.0-alpha.12
|
|
20
51
|
```
|
|
21
52
|
|
|
53
|
+
The rest of this page runs the installed `tmux-workspace`. A runner passes
|
|
54
|
+
the same arguments to the command when they follow the package name.
|
|
55
|
+
|
|
22
56
|
## Load and capture
|
|
23
57
|
|
|
24
58
|
Save this document as `workspace.yaml`:
|
|
@@ -36,7 +70,7 @@ windows:
|
|
|
36
70
|
Load on a separate tmux socket:
|
|
37
71
|
|
|
38
72
|
```console
|
|
39
|
-
$
|
|
73
|
+
$ tmux-workspace load ./workspace.yaml \
|
|
40
74
|
-L workspace-cli-demo \
|
|
41
75
|
-d \
|
|
42
76
|
--json
|
|
@@ -45,7 +79,7 @@ $ node packages/workspace-cli/dist/main.js load ./workspace.yaml \
|
|
|
45
79
|
Capture its live topology:
|
|
46
80
|
|
|
47
81
|
```console
|
|
48
|
-
$
|
|
82
|
+
$ tmux-workspace freeze dev \
|
|
49
83
|
-L workspace-cli-demo \
|
|
50
84
|
--json
|
|
51
85
|
```
|
|
@@ -126,17 +160,22 @@ lists and blank builder names still use native validation.
|
|
|
126
160
|
## Inspect a workspace through MCP
|
|
127
161
|
|
|
128
162
|
The separate [MCP server](../mcp/README.md) inspects loaded workspaces on the
|
|
129
|
-
same tmux socket.
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
163
|
+
same tmux socket. After the detached load above, add it to your MCP client with
|
|
164
|
+
that socket and the `inspect` toolset:
|
|
165
|
+
|
|
166
|
+
```json
|
|
167
|
+
{
|
|
168
|
+
"mcpServers": {
|
|
169
|
+
"tmux": {
|
|
170
|
+
"command": "npx",
|
|
171
|
+
"args": ["-y", "@libtmux/mcp@0.1.0-alpha.12"],
|
|
172
|
+
"env": { "LIBTMUX_SOCKET": "workspace-cli-demo", "LIBTMUX_TOOLSETS": "inspect" }
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
133
176
|
```
|
|
134
177
|
|
|
135
|
-
|
|
136
|
-
the built `packages/mcp/dist/server.js` as its argument. Use an absolute program
|
|
137
|
-
path if the client starts outside this repository. Set `LIBTMUX_SOCKET` to
|
|
138
|
-
`workspace-cli-demo` and `LIBTMUX_TOOLSETS` to `inspect` in that subprocess's
|
|
139
|
-
environment. The socket is selected when the MCP server starts.
|
|
178
|
+
The socket is selected when the MCP server starts.
|
|
140
179
|
|
|
141
180
|
For a workspace loaded with `-S`, set `LIBTMUX_SOCKET_PATH` to the same absolute
|
|
142
181
|
socket path instead of `LIBTMUX_SOCKET`. If the CLI uses `TMUX_BIN`, select that
|
|
@@ -287,7 +326,7 @@ their completion scope.
|
|
|
287
326
|
Completion is tested on Linux with Bash 5.2, Zsh 5.9, and fish 4.8. Bash 3.2 is
|
|
288
327
|
a syntax target; older shells and filenames containing newlines remain unverified.
|
|
289
328
|
|
|
290
|
-
|
|
329
|
+
With `tmux-workspace` on `PATH`, load the script for your shell. Bash:
|
|
291
330
|
|
|
292
331
|
```console
|
|
293
332
|
$ source <(tmux-workspace completion bash)
|
|
@@ -307,6 +346,22 @@ $ tmux-workspace completion fish | source
|
|
|
307
346
|
|
|
308
347
|
For automation, `--json` and `--ndjson` wrap the script in a structured result.
|
|
309
348
|
|
|
349
|
+
## Build from source
|
|
350
|
+
|
|
351
|
+
Run from the repository root:
|
|
352
|
+
|
|
353
|
+
```console
|
|
354
|
+
$ bun run --cwd packages/libtmux build
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
```console
|
|
358
|
+
$ bun run --cwd packages/workspace-cli build
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
```console
|
|
362
|
+
$ node packages/workspace-cli/dist/main.js --help
|
|
363
|
+
```
|
|
364
|
+
|
|
310
365
|
## Development status
|
|
311
366
|
|
|
312
367
|
Native discovery, conversion, imports, common searches, detached load, append,
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
CommanderError,
|
|
27
27
|
createParser,
|
|
28
28
|
package_default
|
|
29
|
-
} from "./main-
|
|
29
|
+
} from "./main-kvjzz67q.js";
|
|
30
30
|
import {
|
|
31
31
|
__require
|
|
32
32
|
} from "./main-1de529jm.js";
|
|
@@ -605,7 +605,7 @@ async function run(argv, context) {
|
|
|
605
605
|
return await shell(request, context);
|
|
606
606
|
if (request.command === "completion") {
|
|
607
607
|
const [{ commandCatalog }, { completionScript }] = await Promise.all([
|
|
608
|
-
import("./reference-
|
|
608
|
+
import("./reference-n7rt65hv.js"),
|
|
609
609
|
import("./completions-2a9fqwq3.js")
|
|
610
610
|
]);
|
|
611
611
|
const shell2 = request.values.shell;
|
|
@@ -2044,7 +2044,7 @@ var program = new Command;
|
|
|
2044
2044
|
// package.json
|
|
2045
2045
|
var package_default = {
|
|
2046
2046
|
name: "@libtmux/workspace-cli",
|
|
2047
|
-
version: "0.1.0-alpha.
|
|
2047
|
+
version: "0.1.0-alpha.12",
|
|
2048
2048
|
description: "A tmuxp-compatible workspace manager for Node and Bun.",
|
|
2049
2049
|
license: "MIT",
|
|
2050
2050
|
repository: {
|
|
@@ -2075,17 +2075,16 @@ var package_default = {
|
|
|
2075
2075
|
"test:package": "bun run build && bun scripts/check-install.ts --package-only",
|
|
2076
2076
|
"test:install": "bun run build && bun scripts/check-install.ts"
|
|
2077
2077
|
},
|
|
2078
|
+
dependencies: {
|
|
2079
|
+
libtmux: "0.1.0-alpha.12"
|
|
2080
|
+
},
|
|
2078
2081
|
devDependencies: {
|
|
2079
2082
|
"cli-truncate": "6.1.1",
|
|
2080
2083
|
commander: "15.0.0",
|
|
2081
|
-
libtmux: "0.1.0-alpha.11",
|
|
2082
2084
|
oxfmt: "0.68.0",
|
|
2083
2085
|
"string-width": "8.2.2",
|
|
2084
2086
|
yaml: "2.9.0"
|
|
2085
2087
|
},
|
|
2086
|
-
peerDependencies: {
|
|
2087
|
-
libtmux: "0.1.0-alpha.11"
|
|
2088
|
-
},
|
|
2089
2088
|
engines: {
|
|
2090
2089
|
bun: ">=1.3.14",
|
|
2091
2090
|
node: ">=22.12.0"
|
package/dist/main.js
CHANGED
|
@@ -21,7 +21,7 @@ for (const stream of [process.stdout, process.stderr])
|
|
|
21
21
|
} else
|
|
22
22
|
throw error;
|
|
23
23
|
});
|
|
24
|
-
var { run } = await import("./app-
|
|
24
|
+
var { run } = await import("./app-p3e1j12e.js");
|
|
25
25
|
var exitCode = await run(process.argv.slice(2), {
|
|
26
26
|
cwd: process.cwd(),
|
|
27
27
|
env: process.env,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@libtmux/workspace-cli",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.12",
|
|
4
4
|
"description": "A tmuxp-compatible workspace manager for Node and Bun.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -31,17 +31,16 @@
|
|
|
31
31
|
"test:package": "bun run build && bun scripts/check-install.ts --package-only",
|
|
32
32
|
"test:install": "bun run build && bun scripts/check-install.ts"
|
|
33
33
|
},
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"libtmux": "0.1.0-alpha.12"
|
|
36
|
+
},
|
|
34
37
|
"devDependencies": {
|
|
35
38
|
"cli-truncate": "6.1.1",
|
|
36
39
|
"commander": "15.0.0",
|
|
37
|
-
"libtmux": "0.1.0-alpha.11",
|
|
38
40
|
"oxfmt": "0.68.0",
|
|
39
41
|
"string-width": "8.2.2",
|
|
40
42
|
"yaml": "2.9.0"
|
|
41
43
|
},
|
|
42
|
-
"peerDependencies": {
|
|
43
|
-
"libtmux": "0.1.0-alpha.11"
|
|
44
|
-
},
|
|
45
44
|
"engines": {
|
|
46
45
|
"bun": ">=1.3.14",
|
|
47
46
|
"node": ">=22.12.0"
|