@inkobytes/nexus 1.0.6 → 1.0.7

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.0.7 - 2026-06-06
4
+
5
+ - Added `nexus install-skill` to install the bundled Nexus skill into `~/.agents/skills/nexus`.
6
+ - Added `--target` and `--force` options for custom or refreshed skill installs, with a guard against broad overwrite targets.
7
+ - Updated help, zsh completion, README docs, and regression coverage for the new skill installer command.
8
+
3
9
  ## 1.0.6 - 2026-06-03
4
10
 
5
11
  - Extended Nexus protocol drift checks so `nexus doctor` now covers the bundled `skills/nexus/SKILL.md`.
package/README.md CHANGED
@@ -71,6 +71,7 @@ Requires Node.js 18 or newer.
71
71
 
72
72
  - Colorized `nexus help` output for easier scanning in the terminal
73
73
  - Built-in `nexus completion zsh` support for shell completions
74
+ - Bundled `nexus install-skill` support for installing the Nexus agent skill into `~/.agents/skills`
74
75
 
75
76
  See [CHANGELOG.md](./CHANGELOG.md) for the release summary.
76
77
 
@@ -240,6 +241,18 @@ source <(nexus completion zsh)
240
241
 
241
242
  This gives `zsh` tab-completion for commands like `claim`, `release`, `doctor`, `drill`, and common agent handles such as `@codex` and `@claude`.
242
243
 
244
+ ### `nexus install-skill [--target <path>] [--force]`
245
+
246
+ Install the bundled Nexus agent skill into the shared agent skill directory.
247
+
248
+ ```bash
249
+ nexus install-skill
250
+ nexus install-skill --force
251
+ nexus install-skill --target ~/.agents/skills/nexus
252
+ ```
253
+
254
+ By default, Nexus copies `skills/nexus` from the published package into `~/.agents/skills/nexus`. Restart or refresh your agent session after installing so its skill registry can discover the new `nexus` skill.
255
+
243
256
  ### `nexus ledger [--json]`
244
257
 
245
258
  Show completed task entries from `_NEXUS_LEDGER.md`.
package/bin/nexus.js CHANGED
@@ -20,12 +20,13 @@ const COMMANDS = {
20
20
  ledger: () => import('../src/commands/ledger.js'),
21
21
  drill: () => import('../src/commands/drill.js'),
22
22
  soul: () => import('../src/commands/soul.js'),
23
+ 'install-skill': () => import('../src/commands/install-skill.js'),
23
24
  chmod: () => import('../src/commands/chmod.js'),
24
25
  db: () => import('../src/commands/db.js'),
25
26
  help: () => import('../src/commands/help.js'),
26
27
  };
27
28
 
28
- const VERSION = '1.0.1';
29
+ const VERSION = '1.0.7';
29
30
  const COLORS = createColors();
30
31
 
31
32
  const args = argv.slice(2);
@@ -76,6 +77,7 @@ function printHelp() {
76
77
  ['db <backup|list|restore|schedule>', 'Database backup and recovery'],
77
78
  ['drill <list|show|run|report>', 'Inspect or run protocol drills'],
78
79
  ['soul [--file <path>] [--status | --remove]', 'Manage local soul overlay in agent files'],
80
+ ['install-skill [--target <path>] [--force]', 'Install bundled Nexus skill into ~/.agents/skills'],
79
81
  ['help', 'Show this help'],
80
82
  ];
81
83
 
@@ -89,6 +91,7 @@ function printHelp() {
89
91
  'nexus metrics --json',
90
92
  'nexus ledger backfill',
91
93
  'nexus drill show wrong-repo-push',
94
+ 'nexus install-skill',
92
95
  'nexus claim src/lib/components/login/ @claude "Building login UI"',
93
96
  'nexus release src/lib/components/login/ "feat: login form component"',
94
97
  'nexus standup "2026-06-01 08:38 AM @codex [DONE]: Updated tests"',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inkobytes/nexus",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "description": "Multi-agent coordination CLI for coding agents sharing a local repository",
5
5
  "type": "module",
6
6
  "bin": {
@@ -54,6 +54,7 @@ commands=(
54
54
  'db:Database backup and recovery'
55
55
  'drill:Inspect or run protocol drills'
56
56
  'soul:Manage local soul overlay in agent files'
57
+ 'install-skill:Install bundled Nexus skill into ~/.agents/skills'
57
58
  'help:Show command help'
58
59
  )
59
60
 
@@ -116,6 +117,9 @@ case $words[2] in
116
117
  soul)
117
118
  _arguments '--file[Overlay file path]:path:_files' '--status[Show status]' '--remove[Remove overlay]'
118
119
  ;;
120
+ install-skill)
121
+ _arguments '--target[Install target]:path:_files' '--force[Refresh existing installation]'
122
+ ;;
119
123
  start)
120
124
  _arguments '--agent[Agent handle]:agent:(@agy @claude @codex @gemini)'
121
125
  ;;
@@ -0,0 +1,83 @@
1
+ /**
2
+ * nexus install-skill - install the bundled Nexus agent skill
3
+ */
4
+
5
+ import { cpSync, existsSync, mkdirSync, rmSync } from 'fs';
6
+ import { basename, dirname, parse, resolve } from 'path';
7
+ import { fileURLToPath } from 'url';
8
+ import { homedir } from 'os';
9
+
10
+ const COMMAND_USAGE = 'Usage: nexus install-skill [--target <path>] [--force]';
11
+ const DEFAULT_TARGET = '~/.agents/skills/nexus';
12
+
13
+ function parseArgs(args) {
14
+ let target = DEFAULT_TARGET;
15
+ let force = false;
16
+
17
+ for (let index = 0; index < args.length; index += 1) {
18
+ const arg = args[index];
19
+ if (arg === '--force') {
20
+ force = true;
21
+ continue;
22
+ }
23
+
24
+ if (arg === '--target') {
25
+ const value = args[index + 1];
26
+ if (!value || value.startsWith('--')) throw new Error(COMMAND_USAGE);
27
+ target = value;
28
+ index += 1;
29
+ continue;
30
+ }
31
+
32
+ throw new Error(COMMAND_USAGE);
33
+ }
34
+
35
+ return { target, force };
36
+ }
37
+
38
+ function expandHome(path) {
39
+ if (path === '~') return homedir();
40
+ if (path.startsWith('~/')) return resolve(homedir(), path.slice(2));
41
+ return resolve(path);
42
+ }
43
+
44
+ function packageRoot() {
45
+ return resolve(dirname(fileURLToPath(import.meta.url)), '..', '..');
46
+ }
47
+
48
+ function assertSafeSkillTarget(destination) {
49
+ if (basename(destination) !== 'nexus') {
50
+ throw new Error('Install target must be the Nexus skill directory, for example ~/.agents/skills/nexus.');
51
+ }
52
+
53
+ if (destination === parse(destination).root || destination === homedir()) {
54
+ throw new Error('Install target is too broad.');
55
+ }
56
+ }
57
+
58
+ export default function installSkill(args) {
59
+ const { target, force } = parseArgs(args);
60
+ const source = resolve(packageRoot(), 'skills', 'nexus');
61
+ const destination = expandHome(target);
62
+
63
+ if (!existsSync(source)) {
64
+ throw new Error(`Bundled Nexus skill not found: ${source}`);
65
+ }
66
+
67
+ assertSafeSkillTarget(destination);
68
+
69
+ if (existsSync(destination)) {
70
+ if (!force) {
71
+ console.log(`Nexus skill already installed at ${destination}`);
72
+ console.log('Run `nexus install-skill --force` to refresh it.');
73
+ return;
74
+ }
75
+ rmSync(destination, { recursive: true, force: true });
76
+ }
77
+
78
+ mkdirSync(dirname(destination), { recursive: true });
79
+ cpSync(source, destination, { recursive: true });
80
+
81
+ console.log(`Installed Nexus skill to ${destination}`);
82
+ console.log('Restart or refresh your agent session so the skill registry can pick it up.');
83
+ }