@firedmosquito831/my-claude-code 7.0.0 → 7.2.0
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/bin/runtime-install.js +65 -5
- package/package.json +1 -1
package/bin/runtime-install.js
CHANGED
|
@@ -49,7 +49,39 @@ const DESKTOP_ASSETS = {
|
|
|
49
49
|
linux: { x64: { deb: "MyClaudeCode-linux-x86_64.deb", tarball: "MyClaudeCode-linux-x86_64.tar.gz" } },
|
|
50
50
|
};
|
|
51
51
|
|
|
52
|
-
const OVERRIDE_FLAGS = [
|
|
52
|
+
const OVERRIDE_FLAGS = [
|
|
53
|
+
"--server-only",
|
|
54
|
+
"--desktop-only",
|
|
55
|
+
"--no-desktop",
|
|
56
|
+
"--yes-sudo",
|
|
57
|
+
// Passed straight through to the official installer. Since 7.1.0 that
|
|
58
|
+
// installer restarts the server by default and opens the desktop app, so a
|
|
59
|
+
// provisioning script that must not touch a running server needs a way to
|
|
60
|
+
// say so through this wrapper too. `MCC_INSTALL_NO_START=1` is the
|
|
61
|
+
// environment form and reaches the installer through the inherited
|
|
62
|
+
// environment without any help from here.
|
|
63
|
+
"--no-restart",
|
|
64
|
+
"--no-start",
|
|
65
|
+
];
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* The install.ps1 switch each installer flag becomes on Windows.
|
|
69
|
+
*
|
|
70
|
+
* The keys are the POSIX spellings install.sh accepts, because that is what
|
|
71
|
+
* the caller writes and what the POSIX branch passes through untouched.
|
|
72
|
+
*
|
|
73
|
+
* `--no-desktop` means two different things on the two sides of this file and
|
|
74
|
+
* the difference is deliberate: to THIS package it means "do not install the
|
|
75
|
+
* desktop application"; to the official installer it means "do not START the
|
|
76
|
+
* desktop app once the server is up". They meet in `decide()` below, where a
|
|
77
|
+
* run that is not installing a desktop app also tells the installer not to
|
|
78
|
+
* open one.
|
|
79
|
+
*/
|
|
80
|
+
const WINDOWS_SERVER_FLAGS = {
|
|
81
|
+
"--no-restart": "-NoRestart",
|
|
82
|
+
"--no-start": "-NoStart",
|
|
83
|
+
"--no-desktop": "-NoDesktop",
|
|
84
|
+
};
|
|
53
85
|
|
|
54
86
|
const HELP = `my-claude-code install -- install the latest MCC for this machine
|
|
55
87
|
|
|
@@ -63,8 +95,16 @@ without a display it installs the server only and says so.
|
|
|
63
95
|
--desktop-only install the desktop app, leave the server alone
|
|
64
96
|
--no-desktop alias for --server-only
|
|
65
97
|
--yes-sudo on Linux, run \`sudo dpkg -i\` instead of printing it
|
|
98
|
+
--no-restart do not stop a My Claude Code server that is already
|
|
99
|
+
running. One is still started if nothing answers.
|
|
100
|
+
--no-start do not stop and do not start any server
|
|
66
101
|
--help this text
|
|
67
102
|
|
|
103
|
+
The official installer restarts the server on the configured port by default
|
|
104
|
+
since 7.1.0, and opens the desktop app when one is installed here and is not
|
|
105
|
+
already running. \`--no-restart\`, \`--no-start\` and \`MCC_INSTALL_NO_START=1\`
|
|
106
|
+
are the ways out; a run that is not installing a desktop app never opens one.
|
|
107
|
+
|
|
68
108
|
MCC_NPM_INSTALL=server|desktop|both|none the same choice as an environment
|
|
69
109
|
variable, for images and provisioning scripts
|
|
70
110
|
|
|
@@ -181,9 +221,19 @@ function decide(options) {
|
|
|
181
221
|
: desktop
|
|
182
222
|
? "desktop app only"
|
|
183
223
|
: "server only";
|
|
224
|
+
// What this run tells the official installer about the server and the app.
|
|
225
|
+
// Since 7.1.0 the installer restarts the server and opens the desktop app by
|
|
226
|
+
// default; a run that is not installing a desktop app has no business
|
|
227
|
+
// opening one, and a caller that said --no-restart/--no-start meant it.
|
|
228
|
+
const serverFlags = [];
|
|
229
|
+
if (flags.has("--no-start")) serverFlags.push("--no-start");
|
|
230
|
+
else if (flags.has("--no-restart")) serverFlags.push("--no-restart");
|
|
231
|
+
if (!desktop && !flags.has("--no-start")) serverFlags.push("--no-desktop");
|
|
232
|
+
|
|
184
233
|
return {
|
|
185
234
|
server,
|
|
186
235
|
desktop,
|
|
236
|
+
serverFlags,
|
|
187
237
|
// The server installer's `-Desktop`/`--desktop` flag adds the `mcc-desktop`
|
|
188
238
|
// launcher and its shortcuts. A headless box has nowhere to put them.
|
|
189
239
|
desktopFlag: desktop,
|
|
@@ -533,12 +583,16 @@ const REPO_RAW = "https://raw.githubusercontent.com/FiredMosquito831/my-claude-c
|
|
|
533
583
|
* start: the script it fetches is the one that verifies the release wheel's
|
|
534
584
|
* digest, installs `uv` and provisions Python.
|
|
535
585
|
*/
|
|
536
|
-
function serverInstallerCommand(platform, withDesktop, script) {
|
|
586
|
+
function serverInstallerCommand(platform, withDesktop, script, serverFlags) {
|
|
537
587
|
const name = script ?? "install";
|
|
588
|
+
const extras = serverFlags ?? [];
|
|
538
589
|
if (platform === "win32") {
|
|
539
590
|
// The scriptblock form, not `irm … | iex`: only a scriptblock can bind
|
|
540
591
|
// `-Desktop` to the script's own param() block.
|
|
541
|
-
const
|
|
592
|
+
const windows = (withDesktop ? ["-Desktop"] : []).concat(
|
|
593
|
+
extras.map((flag) => WINDOWS_SERVER_FLAGS[flag] ?? flag)
|
|
594
|
+
);
|
|
595
|
+
const flag = windows.length ? ` ${windows.join(" ")}` : "";
|
|
542
596
|
return {
|
|
543
597
|
command: "powershell",
|
|
544
598
|
args: [
|
|
@@ -550,7 +604,8 @@ function serverInstallerCommand(platform, withDesktop, script) {
|
|
|
550
604
|
],
|
|
551
605
|
};
|
|
552
606
|
}
|
|
553
|
-
const
|
|
607
|
+
const posix = (withDesktop ? ["--desktop"] : []).concat(extras);
|
|
608
|
+
const flag = posix.length ? ` -s -- ${posix.join(" ")}` : "";
|
|
554
609
|
return { command: "sh", args: ["-c", `curl -fsSL "${REPO_RAW}/${name}.sh" | sh${flag}`] };
|
|
555
610
|
}
|
|
556
611
|
|
|
@@ -591,7 +646,12 @@ async function performInstall(options) {
|
|
|
591
646
|
}
|
|
592
647
|
|
|
593
648
|
if (decision.server) {
|
|
594
|
-
const { command, args } = serverInstallerCommand(
|
|
649
|
+
const { command, args } = serverInstallerCommand(
|
|
650
|
+
platform,
|
|
651
|
+
decision.desktopFlag,
|
|
652
|
+
undefined,
|
|
653
|
+
decision.serverFlags
|
|
654
|
+
);
|
|
595
655
|
const logPath = options.logPath ?? installerLogPath();
|
|
596
656
|
log(
|
|
597
657
|
logPath
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@firedmosquito831/my-claude-code",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.2.0",
|
|
4
4
|
"description": "My Claude Code (MCC): route Claude Code and other coding agents to any model provider through one local proxy with a dashboard. This npm package installs and launches the Python server.",
|
|
5
5
|
"license": "AGPL-3.0-or-later",
|
|
6
6
|
"author": "FiredMosquito831",
|