@darkrymit/crunes-cli 0.11.3 → 0.12.0
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 +3 -2
- package/dist/chunks/{add-J3E6GLVR.js → add-GDF3XEGN.js} +2 -2
- package/dist/chunks/{apply-OZTKRCFK.js → apply-GDTGTBPD.js} +76 -37
- package/dist/chunks/{benchmark-R4CZKOQY.js → benchmark-2TVN6HDF.js} +6 -6
- package/dist/chunks/{chunk-CST3HAZF.js → chunk-3VFNNPQI.js} +4 -4
- package/dist/chunks/{chunk-P5WTJJSV.js → chunk-4SZGKHSW.js} +1 -7
- package/dist/chunks/{chunk-X5SKOAGS.js → chunk-ATI5HNNC.js} +2 -2
- package/dist/chunks/{chunk-NXNUMGXV.js → chunk-GABVYS5O.js} +3 -3
- package/dist/chunks/{chunk-YYOMTVCG.js → chunk-HQUMVDQE.js} +11 -3
- package/dist/chunks/{chunk-64INAIPB.js → chunk-J33GQMPV.js} +1 -1
- package/dist/chunks/{chunk-JQHD5C7T.js → chunk-KP4EW2DS.js} +1 -1
- package/dist/chunks/{create-EG6XUWZU.js → chunk-PBQDFAR4.js} +13 -14
- package/dist/chunks/{chunk-KJDS6KLG.js → chunk-QAP63JIK.js} +8 -8
- package/dist/chunks/{chunk-JCZPJPKB.js → chunk-THGPCLJD.js} +4 -4
- package/dist/chunks/{chunk-OSHSGWZN.js → chunk-YUI5RTLD.js} +1 -1
- package/dist/chunks/{trust-QJWRA2UU.js → chunk-ZLIG4RAI.js} +22 -22
- package/dist/chunks/{create-LZPZZIVO.js → create-4DEH53O6.js} +29 -12
- package/dist/chunks/{create-ZXC6IVTR.js → create-YLXRZQXI.js} +18 -7
- package/dist/chunks/create-ZWBV7PPT.js +24 -0
- package/dist/chunks/{disable-D64RMPMM.js → disable-QLB4FZOF.js} +2 -2
- package/dist/chunks/{doctor-RPMWVIU2.js → doctor-SXKAEYUF.js} +5 -5
- package/dist/chunks/{enable-WQ67RBZM.js → enable-D5BM5VZ7.js} +2 -2
- package/dist/chunks/{init-WXAPVBVC.js → init-EY5R26HE.js} +4 -3
- package/dist/chunks/{install-RIB6WJAJ.js → install-FSJAC3CL.js} +5 -5
- package/dist/chunks/{intro-WRYGSVZA.js → intro-PN7LT6ZG.js} +10 -10
- package/dist/chunks/{list-2L47SUMZ.js → list-THRLETUN.js} +4 -4
- package/dist/chunks/{list-YPY6WXXM.js → list-U44ZZ3NZ.js} +2 -4
- package/dist/chunks/{list-4HIUYIH6.js → list-WFMSED5O.js} +3 -3
- package/dist/chunks/{repl-D74NDSU3.js → repl-PSADU3MJ.js} +7 -7
- package/dist/chunks/{resolver-7OOQKADV.js → resolver-YEUZSOS4.js} +5 -5
- package/dist/chunks/{run-NWDA34W2.js → run-CYGL3HTA.js} +6 -6
- package/dist/chunks/{rune-M6CDT6KM.js → rune-OQX5EYSQ.js} +32 -19
- package/dist/chunks/{runner-J2ILUQH5.js → runner-VUSHR2OR.js} +2 -2
- package/dist/chunks/trust-7GU7ODWL.js +20 -0
- package/dist/chunks/{uninstall-NCBA2KNM.js → uninstall-MSCIWDWV.js} +5 -5
- package/dist/chunks/{update-PMK4FT7F.js → update-IHCYA3JW.js} +5 -5
- package/dist/chunks/{version-BHXXTACZ.js → version-QBWEJ45I.js} +1 -1
- package/dist/cli.js +27 -27
- package/package.json +1 -1
|
@@ -4,20 +4,20 @@ import {
|
|
|
4
4
|
parseBracketKey,
|
|
5
5
|
parseRunArgs,
|
|
6
6
|
parseSegment
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-3VFNNPQI.js";
|
|
8
8
|
import "./chunk-RQ6KHY6W.js";
|
|
9
9
|
import "./chunk-PRCVJ727.js";
|
|
10
10
|
import "./chunk-AFAVAB5Q.js";
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-QAP63JIK.js";
|
|
12
|
+
import "./chunk-ATI5HNNC.js";
|
|
13
13
|
import "./chunk-UKAIACRQ.js";
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-HQUMVDQE.js";
|
|
15
|
+
import "./chunk-YUI5RTLD.js";
|
|
16
16
|
import "./chunk-BK4WG54O.js";
|
|
17
17
|
import "./chunk-V2VVG44B.js";
|
|
18
18
|
import "./chunk-CEQBF5LN.js";
|
|
19
19
|
import "./chunk-ESXRY4PQ.js";
|
|
20
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-4SZGKHSW.js";
|
|
21
21
|
import "./chunk-C2JSNCGY.js";
|
|
22
22
|
import "./chunk-Q6K5MEDF.js";
|
|
23
23
|
import "./chunk-ZT4QFTQM.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
enumerateRunes
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-GABVYS5O.js";
|
|
4
4
|
import {
|
|
5
5
|
getArgsSchema,
|
|
6
6
|
getPluginRunePath,
|
|
7
7
|
getReplSchema
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-KP4EW2DS.js";
|
|
9
9
|
import "./chunk-HYPUZ5DT.js";
|
|
10
10
|
import "./chunk-CBWT3DFR.js";
|
|
11
11
|
import "./chunk-BAIIJ4OC.js";
|
|
@@ -18,7 +18,7 @@ import "./chunk-AFAVAB5Q.js";
|
|
|
18
18
|
import {
|
|
19
19
|
resolvePluginRune,
|
|
20
20
|
resolveRuneFromPlugins
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-QAP63JIK.js";
|
|
22
22
|
import {
|
|
23
23
|
describeRunBlock,
|
|
24
24
|
flattenCommands,
|
|
@@ -27,17 +27,17 @@ import {
|
|
|
27
27
|
formatRuneIndex,
|
|
28
28
|
getRunBlockSchema,
|
|
29
29
|
selectNode
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-ATI5HNNC.js";
|
|
31
31
|
import {
|
|
32
32
|
resolveInterpreter
|
|
33
33
|
} from "./chunk-UKAIACRQ.js";
|
|
34
34
|
import {
|
|
35
35
|
isNativeRune
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-HQUMVDQE.js";
|
|
37
37
|
import {
|
|
38
38
|
getRune,
|
|
39
39
|
loadConfig
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-YUI5RTLD.js";
|
|
41
41
|
import {
|
|
42
42
|
isPathCommand
|
|
43
43
|
} from "./chunk-BK4WG54O.js";
|
|
@@ -49,7 +49,7 @@ import "./chunk-ESXRY4PQ.js";
|
|
|
49
49
|
import {
|
|
50
50
|
blockModule,
|
|
51
51
|
scopedPermissions
|
|
52
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-4SZGKHSW.js";
|
|
53
53
|
import {
|
|
54
54
|
computeEffectivePermissions
|
|
55
55
|
} from "./chunk-C2JSNCGY.js";
|
|
@@ -65,7 +65,7 @@ import {
|
|
|
65
65
|
|
|
66
66
|
// src/docs/commands/rune.js
|
|
67
67
|
init_require_shim();
|
|
68
|
-
import { relative } from "node:path";
|
|
68
|
+
import { join, relative } from "node:path";
|
|
69
69
|
var SUGGESTIONS = {
|
|
70
70
|
run: "crunes docs run",
|
|
71
71
|
args: "crunes docs args",
|
|
@@ -80,14 +80,20 @@ async function resolveRuneDocs(config, key, projectRoot, configRoot) {
|
|
|
80
80
|
if (!pluginMatch && !localEntry) {
|
|
81
81
|
autoMatch = await resolveRuneFromPlugins(config, key);
|
|
82
82
|
}
|
|
83
|
-
|
|
83
|
+
let aliasMatch = null;
|
|
84
|
+
if (localEntry?.plugin) {
|
|
85
|
+
aliasMatch = await resolvePluginRune(config, localEntry.plugin);
|
|
86
|
+
if (!aliasMatch) throw new Error(`Plugin alias "${key}" \u2192 "${localEntry.plugin}" is not enabled or installed.`);
|
|
87
|
+
}
|
|
88
|
+
const resolved = pluginMatch ?? autoMatch ?? aliasMatch;
|
|
84
89
|
if (!localEntry && !resolved) return null;
|
|
85
|
-
let runeFile, replFile = null, relativePath, basePerms, vars, displayName, displayDescription, batch;
|
|
90
|
+
let runeFile, replFile = null, relativePath, basePerms, projectPerms, vars, pluginOpts = {}, displayName, displayDescription, batch;
|
|
86
91
|
let native = null, runs = null;
|
|
87
92
|
if (resolved) {
|
|
88
|
-
const { runeKey, pluginDir } = resolved;
|
|
93
|
+
const { pluginKey, runeKey, pluginDir, pluginCacheDir } = resolved;
|
|
89
94
|
const pluginJson = await loadPluginJson(pluginDir);
|
|
90
95
|
const runeDef = pluginJson.runes[runeKey] ?? {};
|
|
96
|
+
const override = config.runes?.[`${pluginKey}:${runeKey}`];
|
|
91
97
|
if (isNativeRune(runeDef)) {
|
|
92
98
|
native = describeRunBlock({ run: runeDef.run, args: runeDef.args }, pluginDir);
|
|
93
99
|
runs = `${[runeDef.run.command ?? runeDef.run, ...native.argv].join(" ")} \xB7 ${native.runtime} \xB7 plugin script, native, full access \u2014 runs only once trusted (crunes plugin trust)`;
|
|
@@ -97,10 +103,17 @@ async function resolveRuneDocs(config, key, projectRoot, configRoot) {
|
|
|
97
103
|
if (runeDef.repl != null) replFile = getPluginRunePath(pluginDir, runeKey, pluginJson, "repl");
|
|
98
104
|
relativePath = void 0;
|
|
99
105
|
basePerms = scopedPermissions(runeDef) ?? {};
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
106
|
+
projectPerms = scopedPermissions(localEntry) ?? scopedPermissions(override);
|
|
107
|
+
vars = { ...runeDef.vars ?? {}, ...localEntry?.vars ?? override?.vars ?? {} };
|
|
108
|
+
pluginOpts = {
|
|
109
|
+
pluginDir,
|
|
110
|
+
nodeModulesDir: join(pluginCacheDir, "node_modules"),
|
|
111
|
+
pluginDeps: pluginJson.dependencies ?? {}
|
|
112
|
+
};
|
|
113
|
+
displayName = localEntry?.name ?? runeDef.name ?? runeKey;
|
|
114
|
+
displayDescription = localEntry?.description ?? runeDef.description ?? null;
|
|
115
|
+
const batchBlock = localEntry ? localEntry.batch : runeDef.batch;
|
|
116
|
+
batch = batchBlock != null ? { allow: batchBlock.allow ?? [], deny: batchBlock.deny ?? [] } : null;
|
|
104
117
|
} else {
|
|
105
118
|
const desc = describeRunBlock(localEntry, configRoot);
|
|
106
119
|
replFile = blockModule(localEntry, "repl", configRoot);
|
|
@@ -126,19 +139,19 @@ async function resolveRuneDocs(config, key, projectRoot, configRoot) {
|
|
|
126
139
|
displayDescription = localEntry.description ?? null;
|
|
127
140
|
batch = localEntry.batch != null ? { allow: localEntry.batch.allow ?? [], deny: localEntry.batch.deny ?? [] } : null;
|
|
128
141
|
}
|
|
129
|
-
const runEffective = computeEffectivePermissions(basePerms,
|
|
130
|
-
const replEffective = computeEffectivePermissions(basePerms,
|
|
142
|
+
const runEffective = computeEffectivePermissions(basePerms, projectPerms, "run");
|
|
143
|
+
const replEffective = computeEffectivePermissions(basePerms, projectPerms, "repl");
|
|
131
144
|
let schema = null;
|
|
132
145
|
let schemaError = null;
|
|
133
146
|
try {
|
|
134
|
-
schema = native ? await getRunBlockSchema(native, projectRoot, { vars, runeKey: key }) : await getArgsSchema(runeFile, runEffective, projectRoot, { vars, runeKey: key });
|
|
147
|
+
schema = native ? await getRunBlockSchema(native, projectRoot, { vars, runeKey: key }) : await getArgsSchema(runeFile, runEffective, projectRoot, { ...pluginOpts, vars, runeKey: key });
|
|
135
148
|
} catch (err) {
|
|
136
149
|
schemaError = err.message;
|
|
137
150
|
output.warn(`Could not load args schema for "${key}": ${err.message}`);
|
|
138
151
|
}
|
|
139
152
|
let repl = null;
|
|
140
153
|
if (replFile) try {
|
|
141
|
-
const { argsSchema, commandsSchema } = await getReplSchema(replFile, replEffective, [], projectRoot, { vars, runeKey: key });
|
|
154
|
+
const { argsSchema, commandsSchema } = await getReplSchema(replFile, replEffective, [], projectRoot, { ...pluginOpts, vars, runeKey: key });
|
|
142
155
|
if (argsSchema !== null || commandsSchema !== null) repl = { argsSchema, commandsSchema };
|
|
143
156
|
} catch (err) {
|
|
144
157
|
output.warn(`Could not load REPL schema for "${key}": ${err.message}`);
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
runPluginRune,
|
|
8
8
|
runRuneInIsolate,
|
|
9
9
|
runRuneInRepl
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-KP4EW2DS.js";
|
|
11
11
|
import "./chunk-HYPUZ5DT.js";
|
|
12
12
|
import "./chunk-CBWT3DFR.js";
|
|
13
13
|
import "./chunk-BAIIJ4OC.js";
|
|
@@ -15,7 +15,7 @@ import "./chunk-OV4WBJT3.js";
|
|
|
15
15
|
import "./chunk-RQ6KHY6W.js";
|
|
16
16
|
import "./chunk-PRCVJ727.js";
|
|
17
17
|
import "./chunk-AFAVAB5Q.js";
|
|
18
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-4SZGKHSW.js";
|
|
19
19
|
import "./chunk-C2JSNCGY.js";
|
|
20
20
|
import "./chunk-Q6K5MEDF.js";
|
|
21
21
|
import "./chunk-ZT4QFTQM.js";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import {
|
|
2
|
+
describeForReview,
|
|
3
|
+
handler,
|
|
4
|
+
scriptLines
|
|
5
|
+
} from "./chunk-ZLIG4RAI.js";
|
|
6
|
+
import "./chunk-PRCVJ727.js";
|
|
7
|
+
import "./chunk-HQUMVDQE.js";
|
|
8
|
+
import "./chunk-BK4WG54O.js";
|
|
9
|
+
import "./chunk-V2VVG44B.js";
|
|
10
|
+
import "./chunk-CEQBF5LN.js";
|
|
11
|
+
import "./chunk-ESXRY4PQ.js";
|
|
12
|
+
import "./chunk-4SZGKHSW.js";
|
|
13
|
+
import "./chunk-7YY3GPPK.js";
|
|
14
|
+
import "./chunk-DR6PVO72.js";
|
|
15
|
+
import "./chunk-FATG2PA7.js";
|
|
16
|
+
export {
|
|
17
|
+
describeForReview,
|
|
18
|
+
handler,
|
|
19
|
+
scriptLines
|
|
20
|
+
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
uninstallPlugin
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-THGPCLJD.js";
|
|
4
4
|
import "./chunk-GBUZOC3O.js";
|
|
5
|
-
import "./chunk-
|
|
5
|
+
import "./chunk-J33GQMPV.js";
|
|
6
6
|
import {
|
|
7
7
|
output
|
|
8
8
|
} from "./chunk-RQ6KHY6W.js";
|
|
@@ -11,8 +11,8 @@ import {
|
|
|
11
11
|
le
|
|
12
12
|
} from "./chunk-PRCVJ727.js";
|
|
13
13
|
import "./chunk-AFAVAB5Q.js";
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-HQUMVDQE.js";
|
|
15
|
+
import "./chunk-YUI5RTLD.js";
|
|
16
16
|
import "./chunk-BK4WG54O.js";
|
|
17
17
|
import {
|
|
18
18
|
loadRegistry,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
} from "./chunk-V2VVG44B.js";
|
|
21
21
|
import "./chunk-CEQBF5LN.js";
|
|
22
22
|
import "./chunk-ESXRY4PQ.js";
|
|
23
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-4SZGKHSW.js";
|
|
24
24
|
import "./chunk-7YY3GPPK.js";
|
|
25
25
|
import "./chunk-DR6PVO72.js";
|
|
26
26
|
import {
|
|
@@ -3,16 +3,16 @@ import {
|
|
|
3
3
|
} from "./chunk-Z4W3ZDFC.js";
|
|
4
4
|
import {
|
|
5
5
|
installPlugin
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-THGPCLJD.js";
|
|
7
7
|
import "./chunk-GBUZOC3O.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-J33GQMPV.js";
|
|
9
9
|
import {
|
|
10
10
|
output
|
|
11
11
|
} from "./chunk-RQ6KHY6W.js";
|
|
12
12
|
import "./chunk-PRCVJ727.js";
|
|
13
13
|
import "./chunk-AFAVAB5Q.js";
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-HQUMVDQE.js";
|
|
15
|
+
import "./chunk-YUI5RTLD.js";
|
|
16
16
|
import "./chunk-BK4WG54O.js";
|
|
17
17
|
import {
|
|
18
18
|
loadRegistry,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
} from "./chunk-V2VVG44B.js";
|
|
21
21
|
import "./chunk-CEQBF5LN.js";
|
|
22
22
|
import "./chunk-ESXRY4PQ.js";
|
|
23
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-4SZGKHSW.js";
|
|
24
24
|
import "./chunk-7YY3GPPK.js";
|
|
25
25
|
import "./chunk-DR6PVO72.js";
|
|
26
26
|
import {
|
package/dist/cli.js
CHANGED
|
@@ -3397,7 +3397,7 @@ var program = new Command();
|
|
|
3397
3397
|
// src/cli/program.js
|
|
3398
3398
|
function buildProgram() {
|
|
3399
3399
|
const program3 = new Command();
|
|
3400
|
-
program3.name("crunes").description("CLI tool for managing context runes").version("0.
|
|
3400
|
+
program3.name("crunes").description("CLI tool for managing context runes").version("0.12.0", "-v, --version").enablePositionalOptions().option("-y, --yes", "assume yes to all prompts and skip interactive mode (also auto-detected in non-TTY environments)").option("-p, --plain", "plain output: no colors, no box-drawing, plain symbols \u2014 optimised for AI/pipe use").option("--cwd <path>", "project root to use instead of the current working directory").option("--ccd <path>", "config directory \u2014 where .crunes/config.json and local rune files live (default: --cwd)").option("--verbose", "print full error stack traces and other verbose output");
|
|
3401
3401
|
program3.hook("preAction", (_thisCommand, actionCommand) => {
|
|
3402
3402
|
const opts = { ...program3.opts(), ...actionCommand.opts() };
|
|
3403
3403
|
configure({ plain: !!opts.plain, verbose: !!opts.verbose });
|
|
@@ -3417,7 +3417,7 @@ function buildProgram() {
|
|
|
3417
3417
|
"after",
|
|
3418
3418
|
'\nImportant: Global flags (e.g. --cwd) MUST appear before the "run" command.\n\nSyntax:\n [run-flags] <key>[-s s1,s2] [rune-args...]\n -b [run-flags] <key1>[-s s1] [rune-args1] + <key2>[-s s2] [rune-args2]\n\nCommand flags:\n -b, --batch enable batching multiple runes with +\n --format text|jsonl output format (default: text)\n --fail-fast stop on first error\n\nPer-rune bracket flags (inside key[...]):\n -s, --section s1,s2 filter output sections for this rune\n\nKey prefixes:\n project:name resolve from project config only\n plugin:name resolve directly from an enabled plugin\n name auto-resolve: project config first, then plugins\n\nFor rune argument documentation: crunes docs rune <key>'
|
|
3419
3419
|
).allowUnknownOption().passThroughOptions().action(async (args, _opts, _command) => {
|
|
3420
|
-
const { handler, parseRunArgs } = await import("./chunks/run-
|
|
3420
|
+
const { handler, parseRunArgs } = await import("./chunks/run-CYGL3HTA.js");
|
|
3421
3421
|
const { segments, format, failFast, isBatch } = parseRunArgs(args);
|
|
3422
3422
|
await handler({ segments, format, failFast, isBatch, projectRoot: projectRoot(), configRoot: configRoot() });
|
|
3423
3423
|
});
|
|
@@ -3425,7 +3425,7 @@ function buildProgram() {
|
|
|
3425
3425
|
"after",
|
|
3426
3426
|
'\nImportant: Global flags (e.g. --cwd) MUST appear before the "repl" command.\n\nSyntax:\n [--format text|jsonl] <key>[-s s1,s2] [rune-args...]\n\nPer-rune bracket flags (inside key[...]):\n -s, --section s1,s2 filter output sections for this rune\n\nThe rune must export repl(args) and/or inputRepl(input).\nFor rune argument documentation: crunes docs rune <key>'
|
|
3427
3427
|
).allowUnknownOption().passThroughOptions().action(async (args, _opts, _command) => {
|
|
3428
|
-
const { handler, parseReplArgs } = await import("./chunks/repl-
|
|
3428
|
+
const { handler, parseReplArgs } = await import("./chunks/repl-PSADU3MJ.js");
|
|
3429
3429
|
const { key, runeArgs, sections, format } = parseReplArgs(args);
|
|
3430
3430
|
await handler({ key, runeArgs, sections, format, projectRoot: projectRoot(), configRoot: configRoot() });
|
|
3431
3431
|
});
|
|
@@ -3434,7 +3434,7 @@ function buildProgram() {
|
|
|
3434
3434
|
"after",
|
|
3435
3435
|
"\n crunes docs rune index of every rune and its commands\n crunes docs rune <key> command index for one rune\n crunes docs rune <key> <cmd>... detail for one command path\n"
|
|
3436
3436
|
).addOption(new Option("--format <format>", "output format").choices(["text", "json"]).default("text")).action(async (key, path3, opts) => {
|
|
3437
|
-
const { handler } = await import("./chunks/rune-
|
|
3437
|
+
const { handler } = await import("./chunks/rune-OQX5EYSQ.js");
|
|
3438
3438
|
await handler({ key, path: path3, format: opts.format, projectRoot: projectRoot(), configRoot: configRoot() });
|
|
3439
3439
|
});
|
|
3440
3440
|
helpGroup.command("utils [namespaces...]").description("Show function signatures and parameter docs for utils.* namespaces").addOption(new Option("--format <format>", "output format").choices(["text", "json"]).default("text")).action(async (namespaces, opts) => {
|
|
@@ -3446,7 +3446,7 @@ function buildProgram() {
|
|
|
3446
3446
|
await handler({ format: opts.format });
|
|
3447
3447
|
});
|
|
3448
3448
|
helpGroup.command("intro").description("Generate a comprehensive introduction to Crunes: rune anatomy, calling conventions, config, permissions and the full @utils API. Generic \u2014 for this project's own runes use `crunes list` and `crunes docs rune`").option("--out <path>", "output file path (defaults to stdout)").action(async (opts) => {
|
|
3449
|
-
const { handler } = await import("./chunks/intro-
|
|
3449
|
+
const { handler } = await import("./chunks/intro-PN7LT6ZG.js");
|
|
3450
3450
|
await handler({ out: opts.out });
|
|
3451
3451
|
});
|
|
3452
3452
|
helpGroup.command("args").description("Show detailed documentation, conventions, and examples for the args(builder) export").action(async () => {
|
|
@@ -3482,18 +3482,18 @@ function buildProgram() {
|
|
|
3482
3482
|
await handler();
|
|
3483
3483
|
});
|
|
3484
3484
|
program3.command("version").description("Print the installed version and check for updates").option("--no-check", "skip the npm update check").action(async (opts) => {
|
|
3485
|
-
const { handler } = await import("./chunks/version-
|
|
3485
|
+
const { handler } = await import("./chunks/version-QBWEJ45I.js");
|
|
3486
3486
|
await handler({ check: opts.check, plain: !!program3.opts().plain });
|
|
3487
3487
|
});
|
|
3488
3488
|
program3.command("doctor").description("Verify environment and project setup").option("-p, --plain", "plain output: no colors, no box-drawing, plain symbols \u2014 optimised for AI/pipe use").action(async () => {
|
|
3489
|
-
const { handler } = await import("./chunks/doctor-
|
|
3489
|
+
const { handler } = await import("./chunks/doctor-SXKAEYUF.js");
|
|
3490
3490
|
await handler({ projectRoot: projectRoot() });
|
|
3491
3491
|
});
|
|
3492
3492
|
program3.command("bench [args...]").description("Time rune execution and report fast, ok, or slow.").addHelpText(
|
|
3493
3493
|
"after",
|
|
3494
3494
|
'\nImportant: Global flags (e.g. --cwd) MUST appear before the "bench" command.\n\nSyntax:\n [--runs <n>] [--warmup] <key>[--runs <n>] [--warmup] [-s s1,s2] [rune-args...]\n\nCommand flags:\n -b, --batch enable batching multiple runes with +\n --format text|jsonl output format (default: text)\n --fail-fast stop on first error\n --runs <n> default number of runs for all runes (default: 1)\n --warmup default warmup run for all runes\n\nPer-rune bracket flags (inside key[...]):\n --runs <n> override run count for this rune\n --warmup override warmup for this rune\n -s, --section s1,s2 filter output sections for this rune'
|
|
3495
3495
|
).allowUnknownOption().passThroughOptions().action(async (args, _opts, _command) => {
|
|
3496
|
-
const { handler, parseBenchArgs } = await import("./chunks/benchmark-
|
|
3496
|
+
const { handler, parseBenchArgs } = await import("./chunks/benchmark-2TVN6HDF.js");
|
|
3497
3497
|
const parsed = parseBenchArgs(args);
|
|
3498
3498
|
if (!parsed.segments[0]?.key) {
|
|
3499
3499
|
const { output } = await import("./chunks/output-JVJFXQPF.js");
|
|
@@ -3503,7 +3503,7 @@ function buildProgram() {
|
|
|
3503
3503
|
await handler({ ...parsed, plain: !!program3.opts().plain, projectRoot: projectRoot(), configRoot: configRoot() });
|
|
3504
3504
|
});
|
|
3505
3505
|
program3.command("list").description("List all registered runes").addOption(new Option("--format <format>", "output format").choices(["text", "json"]).default("text")).option("-p, --plain", "plain output: no colors, no box-drawing, plain symbols \u2014 optimised for AI/pipe use").option("-g, --global", "list only runes from the global config (~/.crunes/config.json)").action(async (opts) => {
|
|
3506
|
-
const { handler } = await import("./chunks/list-
|
|
3506
|
+
const { handler } = await import("./chunks/list-THRLETUN.js");
|
|
3507
3507
|
await handler({ format: opts.format, plain: !!program3.opts().plain || !!opts.plain, projectRoot: projectRoot(), configRoot: configRoot(), global: !!opts.global });
|
|
3508
3508
|
});
|
|
3509
3509
|
const jobs = program3.command("job").description("Manage background jobs");
|
|
@@ -3560,65 +3560,65 @@ function buildProgram() {
|
|
|
3560
3560
|
await handler({ id, sql, projectDir: projectRoot(), plugin: opts.plugin });
|
|
3561
3561
|
});
|
|
3562
3562
|
program3.command("init").description("Create .crunes/config.json in the current project").option("-g, --global", "operate on the global config (~/.crunes/config.json) instead of the project").action(async (opts) => {
|
|
3563
|
-
const { handler } = await import("./chunks/init-
|
|
3563
|
+
const { handler } = await import("./chunks/init-EY5R26HE.js");
|
|
3564
3564
|
await handler({ yes: !!program3.opts().yes, projectRoot: projectRoot(), global: !!opts.global });
|
|
3565
3565
|
});
|
|
3566
3566
|
program3.command("create [new-rune]").description("Scaffold a new rune and register it in config").addOption(new Option("--format <format>", "rune output format").choices(["tree", "markdown"])).option("--path <path>", "file path for the rune (default: .crunes/runes/<key>/src/index.rune.js)").addOption(new Option("--lang <lang>", "scaffold a script rune instead of a sandboxed JS one").choices(["python", "bash", "node"])).option("--name <name>", "human-readable label shown in crunes list").option("--description <description>", "short description of what context this rune provides").option("-g, --global", "operate on the global config (~/.crunes/config.json) instead of the project").option("--plugin", "register the rune in .crunes-plugin/plugin.json instead of .crunes/config.json").option("--project", "register the rune in .crunes/config.json even when .crunes-plugin/plugin.json exists").action(async (key, opts) => {
|
|
3567
|
-
const { handler } = await import("./chunks/create-
|
|
3567
|
+
const { handler } = await import("./chunks/create-ZWBV7PPT.js");
|
|
3568
3568
|
await handler({ key, format: opts.format, lang: opts.lang, path: opts.path, name: opts.name, description: opts.description, yes: !!program3.opts().yes, projectRoot: projectRoot(), configRoot: configRoot(), global: !!opts.global, plugin: !!opts.plugin, project: !!opts.project });
|
|
3569
3569
|
});
|
|
3570
3570
|
program3.command("add <key> <command> [argv...]").description("Register an existing script or program as a rune (fixed arguments go after --)").option("--name <name>", "human-readable label shown in crunes list").option("--description <description>", "short description of what the rune does").option("-g, --global", "operate on the global config (~/.crunes/config.json) instead of the project").addHelpText("after", '\nExamples:\n crunes add coverage tools/coverage.py --description "Test coverage per module"\n crunes add log git -- log --oneline -n 20').action(async (key, command, argv, opts) => {
|
|
3571
|
-
const { handler } = await import("./chunks/add-
|
|
3571
|
+
const { handler } = await import("./chunks/add-GDF3XEGN.js");
|
|
3572
3572
|
await handler({ key, command, argv, name: opts.name, description: opts.description, configRoot: configRoot(), global: !!opts.global });
|
|
3573
3573
|
});
|
|
3574
3574
|
const plugin = program3.command("plugin").description("Manage rune plugins");
|
|
3575
3575
|
plugin.command("install <source>").description("Install a plugin from a configured marketplace in the format <marketplace>@<plugin>").option("-g, --global", "enable in the global config (~/.crunes/config.json) instead of the project").action(async (source, opts) => {
|
|
3576
|
-
const { handler } = await import("./chunks/install-
|
|
3576
|
+
const { handler } = await import("./chunks/install-FSJAC3CL.js");
|
|
3577
3577
|
await handler({ source, projectRoot: projectRoot(), configRoot: configRoot(), yes: !!program3.opts().yes, global: !!opts.global });
|
|
3578
3578
|
});
|
|
3579
3579
|
plugin.command("uninstall <plugin>").description("Uninstall an installed plugin").option("-g, --global", "also drop the plugin from the global config (~/.crunes/config.json)").action(async (name, opts) => {
|
|
3580
|
-
const { handler } = await import("./chunks/uninstall-
|
|
3580
|
+
const { handler } = await import("./chunks/uninstall-MSCIWDWV.js");
|
|
3581
3581
|
await handler({ name, yes: !!program3.opts().yes, projectRoot: projectRoot(), configRoot: configRoot(), global: !!opts.global });
|
|
3582
3582
|
});
|
|
3583
3583
|
plugin.command("list").description("List installed plugins").addOption(new Option("--format <format>", "output format").choices(["text", "json"]).default("text")).option("-p, --plain", "plain output: no colors, no box-drawing, plain symbols \u2014 optimised for AI/pipe use").action(async (opts) => {
|
|
3584
|
-
const { handler } = await import("./chunks/list-
|
|
3584
|
+
const { handler } = await import("./chunks/list-WFMSED5O.js");
|
|
3585
3585
|
await handler({ format: opts.format, projectRoot: projectRoot() });
|
|
3586
3586
|
});
|
|
3587
3587
|
plugin.command("update [plugin]").description("Update one or all installed plugins").action(async (name) => {
|
|
3588
|
-
const { handler } = await import("./chunks/update-
|
|
3588
|
+
const { handler } = await import("./chunks/update-IHCYA3JW.js");
|
|
3589
3589
|
await handler({ name, projectRoot: projectRoot(), configRoot: configRoot() });
|
|
3590
3590
|
});
|
|
3591
3591
|
plugin.command("trust <plugin> [rune]").description("Review a plugin's native runes \u2014 scripts that run outside the sandbox \u2014 and trust them to run").action(async (name, rune) => {
|
|
3592
|
-
const { handler } = await import("./chunks/trust-
|
|
3592
|
+
const { handler } = await import("./chunks/trust-7GU7ODWL.js");
|
|
3593
3593
|
await handler({ name, rune: rune ?? null, yes: !!program3.opts().yes });
|
|
3594
3594
|
});
|
|
3595
3595
|
plugin.command("enable <plugin>").description("Add a plugin to this project's enabled list").option("-g, --global", "enable in the global config (~/.crunes/config.json), for every directory").action(async (name, opts) => {
|
|
3596
|
-
const { handler } = await import("./chunks/enable-
|
|
3596
|
+
const { handler } = await import("./chunks/enable-D5BM5VZ7.js");
|
|
3597
3597
|
await handler({ name, projectRoot: projectRoot(), configRoot: configRoot(), global: !!opts.global });
|
|
3598
3598
|
});
|
|
3599
3599
|
plugin.command("disable <plugin>").description("Turn a plugin off for this project, including one enabled globally").option("-g, --global", "disable in the global config (~/.crunes/config.json) instead of the project").action(async (name, opts) => {
|
|
3600
|
-
const { handler } = await import("./chunks/disable-
|
|
3600
|
+
const { handler } = await import("./chunks/disable-QLB4FZOF.js");
|
|
3601
3601
|
await handler({ name, projectRoot: projectRoot(), configRoot: configRoot(), global: !!opts.global });
|
|
3602
3602
|
});
|
|
3603
3603
|
plugin.command("create [new-plugin]").description("Scaffold a new plugin directory with all required files").option("--description <text>", "short description for plugin.json and marketplace.json").option("--author <name>", "author name (default: git config user.name)").option("--license <spdx>", "SPDX license identifier (default: MIT)").option("--out <path>", "output directory (default: ./<name>)").option("--multi", "scaffold under runes/example/{src,test}/ for a multi-rune plugin").action(async (name, opts) => {
|
|
3604
|
-
const { handler } = await import("./chunks/create-
|
|
3604
|
+
const { handler } = await import("./chunks/create-YLXRZQXI.js");
|
|
3605
3605
|
await handler({ name, description: opts.description, author: opts.author, license: opts.license, out: opts.out, multi: !!opts.multi, yes: !!program3.opts().yes, projectRoot: projectRoot() });
|
|
3606
3606
|
});
|
|
3607
3607
|
const template = program3.command("template").description("Manage rune templates");
|
|
3608
3608
|
template.command("list [template-source]").description('List available templates. [template-source] can be "project" (project config only) or a plugin name; omit to list all.').addOption(new Option("--format <format>", "output format").choices(["text", "json"]).default("text")).action(async (source, opts) => {
|
|
3609
|
-
const { handler } = await import("./chunks/list-
|
|
3609
|
+
const { handler } = await import("./chunks/list-U44ZZ3NZ.js");
|
|
3610
3610
|
await handler({ source, format: opts.format, plain: !!program3.opts().plain, projectRoot: projectRoot(), configRoot: configRoot() });
|
|
3611
3611
|
});
|
|
3612
|
-
template.command("apply <template>").description("Copy a template into the project as a new rune and register it in config.").addHelpText(
|
|
3612
|
+
template.command("apply <template>").description("Copy a template folder into the project as a new rune and register it in config.").addHelpText(
|
|
3613
3613
|
"after",
|
|
3614
3614
|
"\nKey prefixes:\n project:name \u2014 use a template defined in this project's config\n plugin:name \u2014 use a template from a specific installed plugin\n name \u2014 auto-resolve: project config first, then installed plugins"
|
|
3615
|
-
).option("--as <new-rune>", "register the rune under a different key (default: template name)").option("--path <path>", "
|
|
3616
|
-
const { handler } = await import("./chunks/apply-
|
|
3615
|
+
).option("--as <new-rune>", "register the rune under a different key (default: template name)").option("--path <path>", "folder for the rune (default: .crunes/runes/<key>)").option("--name <name>", "human-readable label shown in crunes list").option("--description <description>", "short description of what context this rune provides").action(async (ref, opts) => {
|
|
3616
|
+
const { handler } = await import("./chunks/apply-GDTGTBPD.js");
|
|
3617
3617
|
await handler({ ref, key: opts.as, path: opts.path, name: opts.name, description: opts.description, yes: !!program3.opts().yes, projectRoot: projectRoot(), configRoot: configRoot() });
|
|
3618
3618
|
});
|
|
3619
|
-
template.command("create [new-template]").description("Scaffold a new template
|
|
3620
|
-
const { handler } = await import("./chunks/create-
|
|
3621
|
-
await handler({ name, path: opts.path, templateName: opts.name, description: opts.description, yes: !!program3.opts().yes, projectRoot: projectRoot(), configRoot: configRoot(), global: !!opts.global });
|
|
3619
|
+
template.command("create [new-template]").description("Scaffold a new template folder and register it in config").option("--path <path>", "folder for the template (default: .crunes/templates/<name>)").addOption(new Option("--lang <lang>", "scaffold a script template instead of a sandboxed JS one").choices(["python", "bash", "node"])).option("--name <name>", "display label shown in crunes template list (separate from the template key)").option("--description <description>", "short description of what kind of rune this template produces").option("-g, --global", "operate on the global config (~/.crunes/config.json) instead of the project").action(async (name, opts) => {
|
|
3620
|
+
const { handler } = await import("./chunks/create-4DEH53O6.js");
|
|
3621
|
+
await handler({ name, path: opts.path, lang: opts.lang, templateName: opts.name, description: opts.description, yes: !!program3.opts().yes, projectRoot: projectRoot(), configRoot: configRoot(), global: !!opts.global });
|
|
3622
3622
|
});
|
|
3623
3623
|
const marketplace = program3.command("marketplace").description("Manage plugin marketplace sources");
|
|
3624
3624
|
marketplace.command("add <url>").description("Add a marketplace source URL").action(async (url) => {
|