lacy 1.4.0 → 1.6.3

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.
Files changed (2) hide show
  1. package/index.mjs +39 -2
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -151,7 +151,7 @@ async function install() {
151
151
  prerequisites.stop('Prerequisites OK');
152
152
 
153
153
  // Detect installed tools
154
- const detected = [];
154
+ let detected = [];
155
155
  for (const tool of ['lash', 'claude', 'opencode', 'gemini', 'codex']) {
156
156
  if (commandExists(tool)) {
157
157
  detected.push(tool);
@@ -162,6 +162,40 @@ async function install() {
162
162
  p.log.info(`Detected: ${detected.map(t => pc.green(t)).join(', ')}`);
163
163
  } else {
164
164
  p.log.warn('No AI CLI tools detected');
165
+ p.log.info('Lacy Shell requires an AI CLI tool to work.');
166
+
167
+ const installLashNow = await p.confirm({
168
+ message: `Would you like to install ${pc.green('lash')} (recommended)?`,
169
+ initialValue: true,
170
+ });
171
+
172
+ if (p.isCancel(installLashNow)) {
173
+ p.cancel('Installation cancelled');
174
+ process.exit(0);
175
+ }
176
+
177
+ if (installLashNow) {
178
+ const lashSpinner = p.spinner();
179
+ lashSpinner.start('Installing lash');
180
+
181
+ try {
182
+ if (commandExists('npm')) {
183
+ execSync('npm install -g lash-cli', { stdio: 'pipe' });
184
+ lashSpinner.stop('lash installed');
185
+ detected.push('lash');
186
+ } else if (commandExists('brew')) {
187
+ execSync('brew tap lacymorrow/tap && brew install lash', { stdio: 'pipe' });
188
+ lashSpinner.stop('lash installed');
189
+ detected.push('lash');
190
+ } else {
191
+ lashSpinner.stop('Could not install lash');
192
+ p.log.warn('Please install npm or homebrew, then run: npm install -g lash-cli');
193
+ }
194
+ } catch (e) {
195
+ lashSpinner.stop('lash installation failed');
196
+ p.log.warn('You can install it manually later: npm install -g lash-cli');
197
+ }
198
+ }
165
199
  }
166
200
 
167
201
  // Tool selection
@@ -449,8 +483,11 @@ ${pc.dim('https://github.com/lacymorrow/lacy')}
449
483
  const updateSpinner = p.spinner();
450
484
  updateSpinner.start('Updating Lacy');
451
485
 
486
+ // Determine which directory actually exists
487
+ const updateDir = existsSync(INSTALL_DIR) ? INSTALL_DIR : INSTALL_DIR_OLD;
488
+
452
489
  try {
453
- execSync('git pull origin main', { cwd: INSTALL_DIR, stdio: 'pipe' });
490
+ execSync('git pull origin main', { cwd: updateDir, stdio: 'pipe' });
454
491
  updateSpinner.stop('Lacy updated');
455
492
  p.log.success('Update complete!');
456
493
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lacy",
3
- "version": "1.4.0",
3
+ "version": "1.6.3",
4
4
  "description": "Install lacy — talk to your terminal",
5
5
  "type": "module",
6
6
  "bin": {