@promus/cli 0.24.22 → 0.24.23
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/package.json +1 -1
- package/src/index.ts +18 -0
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -4,6 +4,20 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
const argv = process.argv.slice(2)
|
|
7
|
+
|
|
8
|
+
// --root <dir> override PROMUS_ROOT so each agent gets its own config + data.
|
|
9
|
+
// Must be parsed before any subcommand to affect agentPaths / config loading.
|
|
10
|
+
const rootIdx = argv.indexOf('--root')
|
|
11
|
+
if (rootIdx >= 0) {
|
|
12
|
+
const root = argv[rootIdx + 1]
|
|
13
|
+
if (!root) {
|
|
14
|
+
console.error('promus --root requires a directory path')
|
|
15
|
+
process.exit(1)
|
|
16
|
+
}
|
|
17
|
+
process.env.PROMUS_ROOT = root
|
|
18
|
+
argv.splice(rootIdx, 2) // remove --root <dir> from argv
|
|
19
|
+
}
|
|
20
|
+
|
|
7
21
|
// First arg starting with `--` means the user invoked the default subcommand
|
|
8
22
|
// (chat) with flags, e.g. `promus --yolo`. Treat it as if `chat` were implicit.
|
|
9
23
|
// Exception: `--help` and `--version` are top-level commands, not chat flags.
|
|
@@ -330,6 +344,10 @@ function printHelp(): void {
|
|
|
330
344
|
[
|
|
331
345
|
'promus: sovereign agent harness CLI',
|
|
332
346
|
'',
|
|
347
|
+
'Global flags:',
|
|
348
|
+
' --root <dir> use a separate agent root (config, keystore, sessions)',
|
|
349
|
+
' enables running multiple agents on the same machine',
|
|
350
|
+
'',
|
|
333
351
|
'Commands:',
|
|
334
352
|
' promus init bootstrap a new agent identity + keystore',
|
|
335
353
|
' promus [--yolo] interactive chat with your agent (default; --yolo skips approvals)',
|