@chatcut/cli 0.1.0 → 0.1.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/README.md +16 -2
- package/package.json +1 -1
- package/src/cli.mjs +14 -8
- package/src/desktop.mjs +1 -1
- package/src/doctor.mjs +1 -0
package/README.md
CHANGED
|
@@ -5,8 +5,8 @@ contains no video editor, second MCP server, downloaded skills catalog, or
|
|
|
5
5
|
third-party runtime dependencies. Desktop owns editing, agent connections and
|
|
6
6
|
the skills shipped with that app version.
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
The `connect` entry point requires `@chatcut/cli` 0.1.1 or later. Merging source
|
|
9
|
+
changes alone does not publish a new npm version.
|
|
10
10
|
|
|
11
11
|
```sh
|
|
12
12
|
npx --yes @chatcut/cli app
|
|
@@ -29,12 +29,26 @@ Windows uses the signed per-user NSIS installer. OS policy, missing privileges,
|
|
|
29
29
|
and signature assessment failures retain their original evidence.
|
|
30
30
|
|
|
31
31
|
```sh
|
|
32
|
+
chatcut connect --json
|
|
33
|
+
chatcut connect --client codex --json
|
|
34
|
+
chatcut connect --client claude-code --json
|
|
32
35
|
chatcut doctor --json
|
|
33
36
|
chatcut doctor --client codex --json
|
|
34
37
|
chatcut doctor --fix --json
|
|
35
38
|
chatcut update --json
|
|
36
39
|
```
|
|
37
40
|
|
|
41
|
+
`connect` is the agent setup entry point. It opens/installs Desktop, asks Desktop
|
|
42
|
+
to register or repair the supported agent integrations and sync its managed
|
|
43
|
+
skills, then verifies the local MCP connection with a real tool call. Tools are
|
|
44
|
+
provided over Desktop's MCP server. Use `--client` to select Codex or Claude Code;
|
|
45
|
+
without it, both supported integrations are considered. The command reuses
|
|
46
|
+
`doctor --fix`, including its standing opt-outs and preservation of custom skills.
|
|
47
|
+
Read the returned findings for skipped hosts or remaining actions; passing checks
|
|
48
|
+
does not mean an opted-out or unavailable host was connected. Start a new agent
|
|
49
|
+
conversation after connection or skill changes to load the current tools and skills.
|
|
50
|
+
JSON results identify this entry point with `command: "connect"`.
|
|
51
|
+
|
|
38
52
|
Doctor without `--fix` does not install or open Desktop or change agent settings.
|
|
39
53
|
It inspects a running Desktop through its authenticated user-scoped IPC, then
|
|
40
54
|
starts a fresh local MCP client, negotiates the protocol, lists tools and calls
|
package/package.json
CHANGED
package/src/cli.mjs
CHANGED
|
@@ -9,12 +9,13 @@ const HELP = `ChatCut — your desktop video editor
|
|
|
9
9
|
Usage:
|
|
10
10
|
chatcut Open Desktop; install it if needed
|
|
11
11
|
chatcut app Same as chatcut
|
|
12
|
+
chatcut connect [--json] Open Desktop, connect agents and sync skills
|
|
12
13
|
chatcut doctor [--json] Check Desktop, MCP and managed skills
|
|
13
14
|
chatcut doctor --fix [--json] Repair supported connection and skill issues
|
|
14
15
|
chatcut update [--json] Update Desktop after closing it
|
|
15
16
|
|
|
16
17
|
Options:
|
|
17
|
-
--client codex|claude-code Limit doctor to one
|
|
18
|
+
--client codex|claude-code Limit connect or doctor to one integration
|
|
18
19
|
--json Write one structured result to stdout
|
|
19
20
|
--help Show help without opening Desktop
|
|
20
21
|
--version Show CLI version
|
|
@@ -51,11 +52,13 @@ export async function runCli(args, dependencies = {}) {
|
|
|
51
52
|
const command = positionals[0] ?? "app";
|
|
52
53
|
if (
|
|
53
54
|
positionals.length > 1 ||
|
|
54
|
-
!["app", "doctor", "update"].includes(command)
|
|
55
|
+
!["app", "connect", "doctor", "update"].includes(command)
|
|
55
56
|
)
|
|
56
57
|
throw new Error("Unknown command. Run chatcut --help.");
|
|
57
|
-
if (
|
|
58
|
-
throw new Error("--fix
|
|
58
|
+
if (values.fix && command !== "doctor")
|
|
59
|
+
throw new Error("--fix applies only to chatcut doctor.");
|
|
60
|
+
if (values.client && !["connect", "doctor"].includes(command))
|
|
61
|
+
throw new Error("--client applies only to chatcut connect or doctor.");
|
|
59
62
|
if (values.client && !["claude-code", "codex"].includes(values.client))
|
|
60
63
|
throw new Error("--client must be codex or claude-code.");
|
|
61
64
|
const options = {
|
|
@@ -63,12 +66,13 @@ export async function runCli(args, dependencies = {}) {
|
|
|
63
66
|
stderr.write(`${typeof entry === "string" ? entry : entry.message}\n`),
|
|
64
67
|
};
|
|
65
68
|
let result;
|
|
66
|
-
if (command === "doctor") {
|
|
69
|
+
if (command === "doctor" || command === "connect") {
|
|
67
70
|
result = await (dependencies.doctor ?? runDoctor)({
|
|
68
71
|
...options,
|
|
69
72
|
client: values.client,
|
|
70
|
-
fix: !!values.fix,
|
|
73
|
+
fix: command === "connect" || !!values.fix,
|
|
71
74
|
});
|
|
75
|
+
result = { ...result, command };
|
|
72
76
|
} else {
|
|
73
77
|
const desktop = await (
|
|
74
78
|
command === "app"
|
|
@@ -78,9 +82,11 @@ export async function runCli(args, dependencies = {}) {
|
|
|
78
82
|
result = { command, desktop, ok: true, schemaVersion: 1 };
|
|
79
83
|
}
|
|
80
84
|
if (json) stdout.write(`${JSON.stringify(result)}\n`);
|
|
81
|
-
else if (command === "doctor") {
|
|
85
|
+
else if (command === "doctor" || command === "connect") {
|
|
82
86
|
stdout.write(
|
|
83
|
-
|
|
87
|
+
command === "connect"
|
|
88
|
+
? `ChatCut Connect: ${result.ok ? "checks passed" : "issues found"}\n`
|
|
89
|
+
: `ChatCut Doctor: ${result.ok ? "healthy" : "issues found"}\n`,
|
|
84
90
|
);
|
|
85
91
|
for (const check of result.checks)
|
|
86
92
|
stdout.write(
|
package/src/desktop.mjs
CHANGED
|
@@ -308,7 +308,7 @@ async function install(ctx, previous, updating) {
|
|
|
308
308
|
: "macos-x64"
|
|
309
309
|
: "windows";
|
|
310
310
|
try {
|
|
311
|
-
await ctx.download(`${DOWNLOAD_ROOT}${target}`, artifact);
|
|
311
|
+
await ctx.download(`${DOWNLOAD_ROOT}${target}?src=cli`, artifact);
|
|
312
312
|
} catch (cause) {
|
|
313
313
|
throw new DesktopError(
|
|
314
314
|
"download_failed",
|
package/src/doctor.mjs
CHANGED