lacy 1.8.26 → 1.8.28
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 +1 -1
- package/index.mjs +17 -16
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@ npx lacy
|
|
|
11
11
|
- Installs the latest Lacy Shell release into `~/.lacy` and adds it to your zsh, Bash or fish config
|
|
12
12
|
- Uses your AI CLI tool without asking when exactly one is installed
|
|
13
13
|
- Asks which one to use when several are installed
|
|
14
|
-
- Offers to install
|
|
14
|
+
- Offers to install Claude Code when none is found
|
|
15
15
|
- Asks nothing when there is no terminal (CI, Docker)
|
|
16
16
|
|
|
17
17
|
Run `npx lacy` again after installing to change the tool or mode, edit the config, update, reinstall, or uninstall. Without a terminal it updates to the latest release instead.
|
package/index.mjs
CHANGED
|
@@ -39,11 +39,11 @@ const GIT_ENV = { ...process.env, GIT_TERMINAL_PROMPT: "0" };
|
|
|
39
39
|
const STATE_FILES = ["config.yaml", "current_mode", "logs", ".last_session", ".server.pid"];
|
|
40
40
|
|
|
41
41
|
// Keep in sync with LACY_TOOL_LIST in lib/core/constants.sh (tests check).
|
|
42
|
-
const TOOL_LIST = ["
|
|
42
|
+
const TOOL_LIST = ["claude", "lash", "opencode", "gemini", "codex", "hermes", "copilot", "goose", "aider"];
|
|
43
43
|
|
|
44
44
|
const TOOL_HINTS = {
|
|
45
|
-
lash: "AI coding agent, lash.lacy.sh
|
|
46
|
-
claude: "Claude Code CLI",
|
|
45
|
+
lash: "AI coding agent, lash.lacy.sh",
|
|
46
|
+
claude: "Claude Code CLI (recommended)",
|
|
47
47
|
opencode: "OpenCode CLI",
|
|
48
48
|
gemini: "Google Gemini CLI",
|
|
49
49
|
codex: "OpenAI Codex CLI",
|
|
@@ -305,6 +305,7 @@ modes:
|
|
|
305
305
|
# preheat:
|
|
306
306
|
# eager: false
|
|
307
307
|
# server_port: 4096
|
|
308
|
+
# claude_idle_minutes: 15 # keep claude running between questions; 0 turns it off
|
|
308
309
|
|
|
309
310
|
# logging:
|
|
310
311
|
# queries: false # true writes ~/.lacy/logs/queries.log (owner-only)
|
|
@@ -527,27 +528,27 @@ function checkPrerequisites(shell) {
|
|
|
527
528
|
return missing;
|
|
528
529
|
}
|
|
529
530
|
|
|
530
|
-
function
|
|
531
|
+
function installClaude() {
|
|
531
532
|
const s = spinner();
|
|
532
|
-
s.start("Installing
|
|
533
|
+
s.start("Installing Claude Code");
|
|
533
534
|
try {
|
|
534
535
|
if (commandExists("npm")) {
|
|
535
|
-
execSync(
|
|
536
|
+
execSync(INSTALL_CMDS.claude, { stdio: "pipe" });
|
|
536
537
|
} else if (commandExists("brew")) {
|
|
537
|
-
execSync("brew
|
|
538
|
+
execSync("brew install --cask claude-code", { stdio: "pipe" });
|
|
538
539
|
} else {
|
|
539
|
-
s.stop("Could not install
|
|
540
|
+
s.stop("Could not install Claude Code: npm or Homebrew is needed");
|
|
540
541
|
return false;
|
|
541
542
|
}
|
|
542
543
|
} catch {
|
|
543
|
-
s.stop("
|
|
544
|
+
s.stop("Claude Code did not install");
|
|
544
545
|
return false;
|
|
545
546
|
}
|
|
546
|
-
s.stop("
|
|
547
|
-
return commandExists("
|
|
547
|
+
s.stop("Claude Code installed. Sign in once by running: claude");
|
|
548
|
+
return commandExists("claude");
|
|
548
549
|
}
|
|
549
550
|
|
|
550
|
-
// One tool installed: use it. None: offer
|
|
551
|
+
// One tool installed: use it. None: offer Claude Code. Several: ask which.
|
|
551
552
|
// Without a terminal nothing is asked and the default is used.
|
|
552
553
|
async function chooseTool() {
|
|
553
554
|
const detected = detectTools();
|
|
@@ -568,18 +569,18 @@ async function chooseTool() {
|
|
|
568
569
|
}
|
|
569
570
|
|
|
570
571
|
if (!isInteractive()) {
|
|
571
|
-
p.log.warn(
|
|
572
|
+
p.log.warn(`No AI CLI tool found. Install one later, for example: ${INSTALL_CMDS.claude}`);
|
|
572
573
|
return "";
|
|
573
574
|
}
|
|
574
575
|
|
|
575
576
|
p.log.warn("No AI CLI tool found. Lacy needs one to answer questions.");
|
|
576
577
|
const yes = await p.confirm({
|
|
577
|
-
message: `Install ${pc.green("
|
|
578
|
+
message: `Install ${pc.green("Claude Code")} (claude)?`,
|
|
578
579
|
initialValue: true,
|
|
579
580
|
});
|
|
580
581
|
if (p.isCancel(yes)) cancelled("Installation cancelled");
|
|
581
|
-
if (yes &&
|
|
582
|
-
p.log.info(
|
|
582
|
+
if (yes && installClaude()) return "claude";
|
|
583
|
+
p.log.info(`Install one later, for example: ${INSTALL_CMDS.claude}`);
|
|
583
584
|
return "";
|
|
584
585
|
}
|
|
585
586
|
|