Skip to content

Commit 0a5d0fd

Browse files
committed
improve(install): hint ck update when user declines reinstall (0.12.9)
1 parent eeaebb6 commit 0a5d0fd

5 files changed

Lines changed: 25 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Changelog
22

3+
## [0.12.9] - 2026-03-03
4+
5+
### Changed
6+
- **`lib/commands/install.js`** — When a user declines reinstall, the CLI now shows a hint: run `ck update` to get the latest command and squad files without overwriting customized standards.
7+
8+
---
9+
310
## [0.12.7] - 2026-03-01
411

512
### Changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ ck vscode # alias for copilot
323323

324324
# Analysis & Updates
325325
ck analyze # customize standards to your project
326-
ck update # pull latest updates
326+
ck update # pull latest commands/hooks — preserves your analyzed standards
327327
ck status # check install & integrations
328328

329329
# Validation & Compliance

__tests__/commands/install.test.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ jest.mock('chalk', () => ({
99
yellow: (str) => str,
1010
blue: (str) => str,
1111
magenta: (str) => str,
12+
cyan: (str) => str,
1213
dim: (str) => str,
1314
bold: (str) => str
1415
}));
@@ -288,6 +289,20 @@ describe('InstallCommand', () => {
288289
expect(mockIntegration.install).toHaveBeenCalled();
289290
});
290291

292+
it('19. shows ck update hint when user declines reinstall', async () => {
293+
const install = getInstallModule();
294+
// First install
295+
await install({ nonInteractive: true, noHooks: true });
296+
297+
// Second install — user declines
298+
inquirer.prompt.mockResolvedValueOnce({ shouldContinue: false });
299+
await install({});
300+
301+
const output = console.log.mock.calls.flat().join(' ');
302+
expect(output).toContain('ck update');
303+
expect(output).toContain('Installation cancelled');
304+
});
305+
291306
it('18. nonInteractive full install skips platform prompt', async () => {
292307
const { getIntegration } = require('../../lib/integrations');
293308
getIntegration.mockReturnValue(null);

lib/commands/install.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ class InstallCommand {
8585
const { shouldContinue } = await this.promptReinstall();
8686
if (!shouldContinue) {
8787
console.log(chalk.yellow('⏭️ Installation cancelled'));
88+
console.log(chalk.dim('💡 To get the latest command and squad files, run: ') + chalk.cyan('ck update'));
8889
return;
8990
}
9091
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@nolrm/contextkit",
3-
"version": "0.12.8",
3+
"version": "0.12.9",
44
"description": "ContextKit - Context Engineering for AI Development. Provide rich context to AI through structured MD files with standards, code guides, and documentation. Works with Cursor, Claude, Aider, VS Code Copilot, and more.",
55
"main": "lib/index.js",
66
"bin": {

0 commit comments

Comments
 (0)