ninekit-cli 1.1.0-dev.3 → 1.1.0-dev.5

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 CHANGED
@@ -9,6 +9,7 @@ Command-line tool and web dashboard for managing NineKit projects.
9
9
  NineKit Config UI (`nk`) provides both CLI and web dashboard for managing NineKit projects. It is built with Bun, TypeScript, and React for development, while the published CLI runs on plain Node.js so end users do not need Bun installed.
10
10
 
11
11
  **Key Features:**
12
+
12
13
  - **CLI Commands (16)**: new, init, config, projects, setup, skills, agents, commands, migrate, doctor, versions, update, uninstall, watch, content, easter-egg
13
14
  - **Web Dashboard**: Interactive React UI via `nk config ui` for configuration and project management
14
15
  - **Hook Diagnostics Dashboard**: Inspect recent Claude hook activity and failures from `nk config` across global and project scopes
@@ -36,11 +37,21 @@ Comprehensive documentation in `/docs`:
36
37
  - **[nk watch](./docs/nk-watch.md)** - GitHub issue monitoring daemon
37
38
  - **[nk content](./docs/nk-content.md)** - Automated content generation from git activity
38
39
 
40
+ ## Prerequisites
41
+
42
+ Before using NineKit CLI, you need to:
43
+
44
+ 1. **Purchase a NineKit Starter Kit** from [NineKit.cc](https://ninekit.cc)
45
+ 2. **Get Repository Access**: After purchase, you'll receive access to the private GitHub repository containing your kit
46
+ 3. **Create a GitHub Personal Access Token** (PAT) with `repo` scope to download releases
47
+
48
+ Without a purchased kit and repository access, the CLI will not be able to download any project templates.
49
+
39
50
  ## Installation
40
51
 
41
52
  The NineKit CLI is published on npm at [npmjs.com/package/ninekit-cli](https://www.npmjs.com/package/ninekit-cli).
42
53
 
43
- End-user runtime note: global installs from `npm`, `pnpm`, `yarn`, or `bun` all execute the packaged Node.js CLI. Bun is optional for users and only needed for local NineKit CLI development workflows.
54
+ End-user runtime note: global installs from `npm`, `pnpm`, `yarn`, or `bun` all execute the packaged Node.js CLI. Bun is optional for users and only needed for local NineKit CLI development workflows. Most commands do not require native build tools; `nk content` uses an optional SQLite driver and shows remediation steps if that driver is unavailable.
44
55
 
45
56
  ### Using npm (Recommended)
46
57
 
@@ -145,6 +156,7 @@ nk new --kit-path ~/downloads/ninekit-engineer-main/
145
156
  ```
146
157
 
147
158
  **Flags:**
159
+
148
160
  - `--install-skills`: Auto-install Python packages, system tools (FFmpeg, ImageMagick), Node.js packages
149
161
  - `--prefix`: Move commands to /nk: namespace (/plan → /nk:plan)
150
162
  - `--beta`: Show pre-release versions in selection
@@ -191,6 +203,7 @@ nk init --kit-path ~/downloads/ninekit-engineer-main/
191
203
  ```
192
204
 
193
205
  **Flags:**
206
+
194
207
  - `--yes/-y`: Non-interactive mode with sensible defaults (skip all prompts)
195
208
  - `--global/-g`: Use platform-specific config (macOS/Linux: ~/.claude, Windows: %USERPROFILE%\.claude)
196
209
  - `--fresh`: Clean reinstall, removes .claude directory (requires "yes" confirmation)
@@ -233,6 +246,7 @@ nk update --yes
233
246
  The CLI notifies you when updates are available via `nk --version`.
234
247
 
235
248
  **Skills Migration:**
249
+
236
250
  - Auto-detects structure changes (flat → categorized)
237
251
  - Preserves customizations (SHA-256 hashing)
238
252
  - Creates backup before migration
@@ -282,6 +296,7 @@ nk doctor --verbose --fix
282
296
  ```
283
297
 
284
298
  **Health Checks:**
299
+
285
300
  - **System**: Node.js, npm, Python, pip, Claude CLI, git, gh CLI
286
301
  - **NineKit**: Global/project installation, versions, skills, skill listing budget, duplicate skill inventory
287
302
  - **Auth**: GitHub CLI authentication, repository access
@@ -289,6 +304,7 @@ nk doctor --verbose --fix
289
304
  - **Modules**: Dynamic skill dependency resolution
290
305
 
291
306
  **Auto-Fix Capabilities:**
307
+
292
308
  | Issue | Fix Action |
293
309
  |-------|------------|
294
310
  | Missing dependencies | Install via package manager |
@@ -301,6 +317,7 @@ nk doctor --verbose --fix
301
317
  `nk doctor` never writes `skillOverrides`, hides skills, or deletes duplicate skills automatically. It reports existing `skillOverrides` and inventory issues so all active project/global skills can stay user-invocable while listing pressure is managed through 200k-context-floor project settings and bounded descriptions.
302
318
 
303
319
  **Exit Codes:**
320
+
304
321
  - `0`: All checks pass or issues fixed
305
322
  - `1`: Failures detected (only with `--check-only`)
306
323
 
@@ -321,6 +338,7 @@ nk uninstall --yes # Non-interactive - skip confirmation (for scripts)
321
338
  ```
322
339
 
323
340
  **Scope Selection:**
341
+
324
342
  - When both local and global installations exist, you'll be prompted to choose:
325
343
  - **Local only**: Remove from current project (`.claude/`)
326
344
  - **Global only**: Remove from user directory (`~/.claude/`)
@@ -332,6 +350,7 @@ nk uninstall --yes # Non-interactive - skip confirmation (for scripts)
332
350
  - Use `--kit engineer` or `--kit marketing` to skip the kit prompt
333
351
 
334
352
  **What it does:**
353
+
335
354
  - Detects local `.claude` directory in current project
336
355
  - Detects global `~/.claude` NineKit installation
337
356
  - Shows paths before deletion
@@ -397,6 +416,8 @@ nk content start --verbose
397
416
 
398
417
  **Features:** 11-phase pipeline (scan → filter → classify → context → create → validate → review → photo → publish → engage → analyze), noise filtering, context caching (24h TTL), content validation, photo generation, 3 review modes (auto/manual/hybrid), quiet hours scheduling, engagement tracking, SQLite database, platform-specific adapters.
399
418
 
419
+ **Runtime dependency:** `nk content` uses the optional native SQLite driver `better-sqlite3`. If the driver is unavailable, other CLI commands still work and `nk content` prints reinstall/build-tool guidance.
420
+
400
421
  **Config:** `.nk.json` under `content` key. See [docs/nk-content.md](./docs/nk-content.md) for full configuration reference.
401
422
 
402
423
  ### Other Commands
@@ -445,6 +466,7 @@ export NK_CACHE_TTL=1800 # 30 minutes
445
466
  The `nk --version` command checks for newer versions of your installed NineKit and displays a notification if an update is available. The check is cached for 7 days to minimize API calls.
446
467
 
447
468
  **Disable Update Notifications:**
469
+
448
470
  ```bash
449
471
  # Set environment variable to disable
450
472
  NO_UPDATE_NOTIFIER=1 nk --version
@@ -483,6 +505,7 @@ The CLI requires GitHub authentication to download releases from private reposit
483
505
  ### Quick Setup
484
506
 
485
507
  **Step 1: Install GitHub CLI**
508
+
486
509
  ```bash
487
510
  # Windows
488
511
  winget install GitHub.cli
@@ -495,11 +518,13 @@ sudo apt install gh
495
518
  ```
496
519
 
497
520
  **Step 2: Authenticate with GitHub CLI**
521
+
498
522
  ```bash
499
523
  gh auth login
500
524
  ```
501
525
 
502
526
  When prompted, follow these steps:
527
+
503
528
  1. Select **GitHub.com**
504
529
  2. Select **HTTPS** (or SSH if preferred)
505
530
  3. Authenticate Git? → **Yes**
@@ -530,6 +555,7 @@ nk init --verbose
530
555
  ```
531
556
 
532
557
  **Common Issues:**
558
+
533
559
  - **"Access denied"**: Run `nk doctor` to check auth, use `--fix` to auto-repair
534
560
  - **"Authentication failed"**: Run `nk doctor --fix` to re-authenticate, or manually run `gh auth login` (select 'Login with a web browser')
535
561
  - **"GitHub CLI not authenticated"**: Run `gh auth login` and select 'Login with a web browser' (NOT 'Paste token')
@@ -538,7 +564,7 @@ nk init --verbose
538
564
 
539
565
  ## Available Kits
540
566
 
541
- NineKit offers premium starter kits available for purchase at [NineKit.cc](https://ninekit.chiendt.io.vn):
567
+ NineKit offers premium starter kits available for purchase at [NineKit.cc](https://ninekit.cc):
542
568
 
543
569
  - **engineer**: NineKit Engineer - Engineering toolkit for building with Claude (v1.0.0+)
544
570
  - **marketing**: NineKit Marketing - Content automation toolkit (v1.0.0 available)
@@ -603,6 +629,7 @@ Automatic migration when structure changes (flat → categorized):
603
629
  - **Interactive**: Prompts for confirmation (can skip in CI/CD)
604
630
 
605
631
  **Example Migration:**
632
+
606
633
  ```
607
634
  Before (flat):
608
635
  .claude/skills/
@@ -625,18 +652,21 @@ Customizations in any skill are detected and preserved automatically.
625
652
  ## Development
626
653
 
627
654
  See [Development Guide](./docs/codebase-summary.md) for:
655
+
628
656
  - Project structure (modular domain-driven architecture)
629
657
  - Build & compilation (`bun run build`, `bun run compile`)
630
658
  - Testing & type checking
631
659
  - Code standards & linting
632
660
 
633
661
  **Architecture Highlights:**
662
+
634
663
  - **Modular design**: 122 focused modules (target: <100 lines each)
635
664
  - **Facade pattern**: Each domain exposes public API via facade
636
665
  - **Phase handlers**: Complex commands use orchestrator + phase handlers
637
666
  - **Self-documenting names**: kebab-case file names describe purpose
638
667
 
639
668
  **Quick Start:**
669
+
640
670
  ```bash
641
671
  bun install
642
672
  bun run dev new --kit engineer
@@ -59,7 +59,7 @@ function collectHookCommands(settings) {
59
59
  return commands;
60
60
  }
61
61
 
62
- function extractCkHookName(command) {
62
+ function extractNkHookName(command) {
63
63
  if (!String(command || "").trim().startsWith("node ")) return null;
64
64
  const normalized = String(command).replace(/\\/g, "/");
65
65
  const match = normalized.match(/\/hooks\/([^/"'\s]+)\.(?:cjs|mjs|js)(?:["'\s]|$)/);
@@ -81,7 +81,7 @@ function hasLegacySparseCkHooks(settings, config) {
81
81
 
82
82
  const hookNames = new Set();
83
83
  for (const command of collectHookCommands(settings)) {
84
- const hookName = extractCkHookName(command);
84
+ const hookName = extractNkHookName(command);
85
85
  if (hookName) hookNames.add(hookName);
86
86
  }
87
87
 
@@ -101,7 +101,7 @@ function hasLegacySparseCkHooks(settings, config) {
101
101
  );
102
102
  }
103
103
 
104
- function countMissingCkHookRegistrations(claudeDir) {
104
+ function countMissingNkHookRegistrations(claudeDir) {
105
105
  const settings = readJsonFile(path.join(claudeDir, "settings.json"));
106
106
  const config = readJsonFile(path.join(claudeDir, ".nk.json"));
107
107
  if (!settings || !config) return 0;
@@ -115,7 +115,7 @@ function countMissingCkHookRegistrations(claudeDir) {
115
115
 
116
116
  let missing = 0;
117
117
  for (const command of installedHookCommands(config)) {
118
- const hookName = extractCkHookName(command);
118
+ const hookName = extractNkHookName(command);
119
119
  if (hookName && disabledHooks.has(hookName)) continue;
120
120
  if (!existingCommands.has(normalizeCommand(command))) missing++;
121
121
  }
@@ -162,7 +162,7 @@ function restoreMissingHookRegistrations(settingsFiles) {
162
162
 
163
163
  let restored = 0;
164
164
  for (const claudeDir of collectCandidateClaudeDirs(settingsFiles)) {
165
- const missing = countMissingCkHookRegistrations(claudeDir);
165
+ const missing = countMissingNkHookRegistrations(claudeDir);
166
166
  if (missing <= 0) continue;
167
167
 
168
168
  const installedKit = getInstalledKit(claudeDir);
@@ -187,6 +187,6 @@ function restoreMissingHookRegistrations(settingsFiles) {
187
187
  }
188
188
 
189
189
  module.exports = {
190
- countMissingCkHookRegistrations,
190
+ countMissingNkHookRegistrations,
191
191
  restoreMissingHookRegistrations,
192
192
  };
@@ -5,7 +5,7 @@ const fs = require("node:fs");
5
5
  const os = require("node:os");
6
6
  const path = require("node:path");
7
7
  const {
8
- countMissingCkHookRegistrations,
8
+ countMissingNkHookRegistrations,
9
9
  restoreMissingHookRegistrations,
10
10
  } = require("./postinstall-hook-restore.cjs");
11
11
 
@@ -147,7 +147,7 @@ main();
147
147
 
148
148
  module.exports = {
149
149
  collectCandidateSettingsFiles,
150
- countMissingCkHookRegistrations,
150
+ countMissingNkHookRegistrations,
151
151
  isLegacyDescriptiveNamePrompt,
152
152
  pruneHooks,
153
153
  pruneSettingsFile,
package/cli-manifest.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
- "version": "1.1.0-dev.3",
3
- "generatedAt": "2026-06-16T04:34:28.297Z",
2
+ "version": "1.1.0-dev.5",
3
+ "generatedAt": "2026-06-19T08:38:55.367Z",
4
4
  "commands": {
5
5
  "agents": {
6
6
  "name": "agents",
@@ -1214,7 +1214,7 @@
1214
1214
  },
1215
1215
  "migrate": {
1216
1216
  "name": "migrate",
1217
- "description": "Migrate Claude Code agents, commands, skills, config, rules, and hooks to other providers",
1217
+ "description": "Migrate Claude Code agents, commands, skills, config, rules, and hooks to other providers (e.g. Codex). Set updatePipeline.autoMigrateAfterUpdate to keep targets in sync with Claude Code on each `nk update`.",
1218
1218
  "usage": "nk migrate [options]",
1219
1219
  "examples": [
1220
1220
  {
@@ -1342,7 +1342,7 @@
1342
1342
  "sections": [
1343
1343
  {
1344
1344
  "title": "Gotchas",
1345
- "content": " --install and --reconcile are mutually exclusive — pass only one\n --reinstall-empty-dirs and --respect-deletions are mutually exclusive — pass only one\n Default mode is smart-detected: no/stale registry → install, valid registry → reconcile\n --respect-deletions disables the auto-reinstall heuristic for empty directories\n --force overrides skip decisions per item; --reinstall-empty-dirs is a per-directory heuristic\n Codex commands migrate as skills: project scope writes .agents/skills, global scope writes ~/.agents/skills"
1345
+ "content": " --install and --reconcile are mutually exclusive — pass only one\n --reinstall-empty-dirs and --respect-deletions are mutually exclusive — pass only one\n Default mode is smart-detected: no/stale registry → install, valid registry → reconcile\n --respect-deletions disables the auto-reinstall heuristic for empty directories\n --force overrides skip decisions per item; --reinstall-empty-dirs is a per-directory heuristic\n Codex commands migrate as skills: project scope writes .agents/skills, global scope writes ~/.agents/skills\n Antigravity 2.0 agents migrate to .agents/agents.md; skills remain .agents/skills/<name>/SKILL.md\n Kiro agents migrate as custom subagents; rules/config migrate as steering files; skills copy to .kiro/skills; commands/hooks are skipped"
1346
1346
  }
1347
1347
  ]
1348
1348
  },
@@ -1867,7 +1867,7 @@
1867
1867
  },
1868
1868
  {
1869
1869
  "flags": "-a, --agent <agent>",
1870
- "description": "Target agent(s) - can be specified multiple times. Valid: claude-code, cursor, codex, opencode, goose, gemini-cli, antigravity, github-copilot, amp, kilo, roo, windsurf, cline, openhands"
1870
+ "description": "Target agent(s) - can be specified multiple times. Valid: claude-code, cursor, codex, opencode, goose, gemini-cli, antigravity, github-copilot, amp, kilo, kiro, roo, windsurf, cline, openhands"
1871
1871
  },
1872
1872
  {
1873
1873
  "flags": "-g, --global",
@@ -1925,7 +1925,7 @@
1925
1925
  "sections": [
1926
1926
  {
1927
1927
  "title": "Supported Agents",
1928
- "content": " claude-code Claude Code CLI\n cursor Cursor IDE\n codex Codex CLI\n opencode OpenCode\n goose Goose AI\n gemini-cli Gemini CLI\n antigravity Antigravity Agent\n github-copilot GitHub Copilot\n amp Amp\n kilo Kilo Code\n roo Roo Code\n windsurf Windsurf IDE\n cline Cline\n openhands OpenHands"
1928
+ "content": " claude-code Claude Code CLI\n cursor Cursor IDE\n codex Codex CLI\n opencode OpenCode\n goose Goose AI\n gemini-cli Gemini CLI\n antigravity Antigravity Agent\n github-copilot GitHub Copilot\n amp Amp\n kilo Kilo Code\n kiro Kiro\n roo Roo Code\n windsurf Windsurf IDE\n cline Cline\n openhands OpenHands"
1929
1929
  },
1930
1930
  {
1931
1931
  "title": "Notes",