@theholocron/cli 2.0.0-alpha.72 → 2.0.0-alpha.73
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/dist/cli.mjs +77 -11
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -1430,7 +1430,7 @@ async function runNpmPublishInitial(input = {}) {
|
|
|
1430
1430
|
const dryRun = input.dryRun ?? false;
|
|
1431
1431
|
const otp = input.otp;
|
|
1432
1432
|
const env = input.env ?? process.env;
|
|
1433
|
-
const exec = input.exec ?? defaultExec$
|
|
1433
|
+
const exec = input.exec ?? defaultExec$2;
|
|
1434
1434
|
const publishArgs = [
|
|
1435
1435
|
"-r",
|
|
1436
1436
|
"--filter=./packages/*",
|
|
@@ -1506,7 +1506,7 @@ function printNextSteps$1(print, env) {
|
|
|
1506
1506
|
print(" https://www.npmjs.com/settings/~/tokens");
|
|
1507
1507
|
}
|
|
1508
1508
|
}
|
|
1509
|
-
const defaultExec$
|
|
1509
|
+
const defaultExec$2 = async (cmd, args, opts) => {
|
|
1510
1510
|
const result = spawnSync(cmd, args, {
|
|
1511
1511
|
cwd: opts.cwd,
|
|
1512
1512
|
encoding: "utf8",
|
|
@@ -2485,7 +2485,7 @@ function runPluginCreate(input) {
|
|
|
2485
2485
|
filesWritten.push(resolvedPath);
|
|
2486
2486
|
}
|
|
2487
2487
|
if (!input.dryRun && !input.noVerify) {
|
|
2488
|
-
const execFn = input.exec ?? defaultExec;
|
|
2488
|
+
const execFn = input.exec ?? defaultExec$1;
|
|
2489
2489
|
const pkg = `@theholocron/holocron-plugin-${inputs.slug}`;
|
|
2490
2490
|
print("");
|
|
2491
2491
|
print(" Verifying scaffold…");
|
|
@@ -2572,7 +2572,7 @@ function defaultWrite(filepath, content) {
|
|
|
2572
2572
|
mkdirSync(path.dirname(filepath), { recursive: true });
|
|
2573
2573
|
writeFileSync(filepath, content, "utf8");
|
|
2574
2574
|
}
|
|
2575
|
-
function defaultExec(cmd, args, opts) {
|
|
2575
|
+
function defaultExec$1(cmd, args, opts) {
|
|
2576
2576
|
execFileSync(cmd, args, {
|
|
2577
2577
|
cwd: opts.cwd,
|
|
2578
2578
|
stdio: opts.stdio
|
|
@@ -3608,6 +3608,23 @@ function formatStep(step) {
|
|
|
3608
3608
|
}
|
|
3609
3609
|
//#endregion
|
|
3610
3610
|
//#region src/commands/skills.ts
|
|
3611
|
+
/**
|
|
3612
|
+
* `holocron skills` — install, remove, and update agent skills from @theholocron/skills.
|
|
3613
|
+
*
|
|
3614
|
+
* Unlike `holocron setup`, this command is purely local (no GitHub token
|
|
3615
|
+
* required). It reads `agent` and `skills` from the config and installs
|
|
3616
|
+
* the listed skills into `.agents/skills/<name>/` with a symlink at the
|
|
3617
|
+
* agent-specific path (e.g. `.claude/skills/<name>` for Claude Code).
|
|
3618
|
+
*
|
|
3619
|
+
* `holocron skills remove [name]` and `holocron skills update [name]` delegate
|
|
3620
|
+
* to the corresponding `npx skills` subcommands from the upstream skills CLI.
|
|
3621
|
+
*/
|
|
3622
|
+
const defaultExec = (cmd, args, opts) => {
|
|
3623
|
+
return { exitCode: spawnSync(cmd, args, {
|
|
3624
|
+
cwd: opts.cwd,
|
|
3625
|
+
stdio: "inherit"
|
|
3626
|
+
}).status ?? -1 };
|
|
3627
|
+
};
|
|
3611
3628
|
async function runSkillsInstall(input) {
|
|
3612
3629
|
const print = input.print ?? ((line) => console.log(line));
|
|
3613
3630
|
const config = input.loaded.resolved;
|
|
@@ -3631,6 +3648,36 @@ async function runSkillsInstall(input) {
|
|
|
3631
3648
|
print(` ✗ ${err instanceof Error ? err.message : String(err)}`);
|
|
3632
3649
|
}
|
|
3633
3650
|
}
|
|
3651
|
+
function runSkillsRemove(input) {
|
|
3652
|
+
const { dryRun, repoRoot } = input.context;
|
|
3653
|
+
const exec = input.exec ?? defaultExec;
|
|
3654
|
+
const args = [
|
|
3655
|
+
"skills",
|
|
3656
|
+
"remove",
|
|
3657
|
+
...input.names ?? []
|
|
3658
|
+
];
|
|
3659
|
+
if (dryRun) {
|
|
3660
|
+
console.log(`Would run: npx ${args.join(" ")}`);
|
|
3661
|
+
return { status: "dry-run" };
|
|
3662
|
+
}
|
|
3663
|
+
const { exitCode } = exec("npx", args, { cwd: repoRoot });
|
|
3664
|
+
return { status: exitCode === 0 ? "ok" : "fail" };
|
|
3665
|
+
}
|
|
3666
|
+
function runSkillsUpdate(input) {
|
|
3667
|
+
const { dryRun, repoRoot } = input.context;
|
|
3668
|
+
const exec = input.exec ?? defaultExec;
|
|
3669
|
+
const args = [
|
|
3670
|
+
"skills",
|
|
3671
|
+
"update",
|
|
3672
|
+
...input.name ? [input.name] : []
|
|
3673
|
+
];
|
|
3674
|
+
if (dryRun) {
|
|
3675
|
+
console.log(`Would run: npx ${args.join(" ")}`);
|
|
3676
|
+
return { status: "dry-run" };
|
|
3677
|
+
}
|
|
3678
|
+
const { exitCode } = exec("npx", args, { cwd: repoRoot });
|
|
3679
|
+
return { status: exitCode === 0 ? "ok" : "fail" };
|
|
3680
|
+
}
|
|
3634
3681
|
//#endregion
|
|
3635
3682
|
//#region src/commands/sync.ts
|
|
3636
3683
|
const SYNC_STEPS = [
|
|
@@ -4066,19 +4113,38 @@ await yargs(hideBin(process.argv)).scriptName("holocron").usage("$0 <command> [o
|
|
|
4066
4113
|
...argv.token ? { cliToken: argv.token } : {}
|
|
4067
4114
|
}
|
|
4068
4115
|
})).summary.fail > 0) process.exitCode = 1;
|
|
4069
|
-
}).command("skills
|
|
4070
|
-
|
|
4071
|
-
choices: ["install"],
|
|
4072
|
-
describe: "install — copy skills from @theholocron/skills into .agents/ with agent symlinks"
|
|
4073
|
-
}), async (argv) => {
|
|
4074
|
-
if (argv.action === "install") await runSkillsInstall({
|
|
4116
|
+
}).command("skills", "Manage agent skills from the @theholocron/skills registry", (y) => y.command("install", "Copy skills from @theholocron/skills into .agents/ with agent symlinks", () => {}, async (argv) => {
|
|
4117
|
+
await runSkillsInstall({
|
|
4075
4118
|
loaded: await loadConfig(argv.cwd),
|
|
4076
4119
|
context: {
|
|
4077
4120
|
repoRoot: argv.cwd,
|
|
4078
4121
|
dryRun: argv.dryRun
|
|
4079
4122
|
}
|
|
4080
4123
|
});
|
|
4081
|
-
}).command("
|
|
4124
|
+
}).command("remove [names..]", "Remove installed skills via npx skills remove", (yy) => yy.positional("names", {
|
|
4125
|
+
type: "string",
|
|
4126
|
+
array: true,
|
|
4127
|
+
describe: "Skill name(s) to remove (omit to remove all installed skills)"
|
|
4128
|
+
}), (argv) => {
|
|
4129
|
+
if (runSkillsRemove({
|
|
4130
|
+
context: {
|
|
4131
|
+
repoRoot: argv.cwd,
|
|
4132
|
+
dryRun: argv.dryRun
|
|
4133
|
+
},
|
|
4134
|
+
...argv.names?.length ? { names: argv.names } : {}
|
|
4135
|
+
}).status === "fail") process.exitCode = 1;
|
|
4136
|
+
}).command("update [name]", "Update installed skills to their latest upstream versions via npx skills update", (yy) => yy.positional("name", {
|
|
4137
|
+
type: "string",
|
|
4138
|
+
describe: "Skill name to update (omit to update all installed skills)"
|
|
4139
|
+
}), (argv) => {
|
|
4140
|
+
if (runSkillsUpdate({
|
|
4141
|
+
context: {
|
|
4142
|
+
repoRoot: argv.cwd,
|
|
4143
|
+
dryRun: argv.dryRun
|
|
4144
|
+
},
|
|
4145
|
+
...argv.name ? { name: argv.name } : {}
|
|
4146
|
+
}).status === "fail") process.exitCode = 1;
|
|
4147
|
+
}).demandCommand(1, "Run `holocron skills --help` to see available skills subcommands."), () => {}).command("secret set <name> [value]", "Set a single secret via the configured `secrets` capability", (y) => y.positional("name", {
|
|
4082
4148
|
type: "string",
|
|
4083
4149
|
demandOption: true,
|
|
4084
4150
|
describe: "Secret name (e.g., NPM_TOKEN)"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theholocron/cli",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.73",
|
|
4
4
|
"description": "The Holocron CLI — a pluggable, capability-based orchestrator for spinning up and operating software projects.",
|
|
5
5
|
"homepage": "https://github.com/theholocron/holocron/tree/main/packages/cli#readme",
|
|
6
6
|
"bugs": "https://github.com/theholocron/holocron/issues",
|