@technomoron/agent-run 0.99.27 → 0.99.29
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/CHANGES +22 -0
- package/README.md +106 -52
- package/dist/checks.js +4 -0
- package/dist/cli.js +47 -19
- package/dist/commands.js +110 -14
- package/dist/config-tree.js +254 -2
- package/dist/constants.js +1 -1
- package/dist/defaults.js +34 -3
- package/dist/manifest.js +2 -1
- package/dist/project.js +31 -22
- package/dist/renderer.js +30 -4
- package/dist/templates.js +3 -0
- package/dist/tools.js +6 -0
- package/examples/basic-config/README.md +2 -1
- package/examples/basic-config/agent-config/agent-run.defaults.jsonc +2 -1
- package/examples/basic-config/agent-config/global/tool-templates/AGENTS.md.njk +2 -0
- package/examples/basic-config/agent-config/global/tool-templates/CLAUDE.md.njk +1 -0
- package/examples/basic-config/agent-config/global/tool-templates/claude-settings.json.njk +2 -0
- package/examples/basic-config/agent-config/global/tool-templates/codex-config.toml.njk +2 -1
- package/examples/basic-config/agent-config/starter/basic-project/notes/memory/README.md +8 -0
- package/examples/basic-config/agent-config/starter/basic-project/overrides/claude-settings.json.njk +2 -0
- package/examples/basic-config/agent-config/starter/basic-project/overrides/codex-config.toml.njk +2 -1
- package/ops/systemd/ai-tools-update.service +1 -1
- package/package.json +1 -1
- package/scripts/install-systemd-jobs.sh +15 -5
- package/scripts/update-ai-tools.sh +37 -2
package/CHANGES
CHANGED
|
@@ -1,6 +1,28 @@
|
|
|
1
1
|
CHANGES
|
|
2
2
|
=======
|
|
3
3
|
|
|
4
|
+
Version 0.99.29 (2026-09-04)
|
|
5
|
+
----------------------------
|
|
6
|
+
* Add tracked per-profile project memory under `notes/memory`, while keeping
|
|
7
|
+
native Codex memories in ignored machine-local runtime state.
|
|
8
|
+
* Detect older memory layouts before profile updates and agent launches, ask
|
|
9
|
+
before staging tracked moves with `git mv`, and support
|
|
10
|
+
`migrate-config --yes` for non-interactive migrations.
|
|
11
|
+
* Make copied systemd updater files portable, install the helper under
|
|
12
|
+
`/usr/local/libexec`, and remove stale AI tool launchers before global
|
|
13
|
+
package updates.
|
|
14
|
+
* Explain the shared configuration model for native coding agents in the
|
|
15
|
+
README.
|
|
16
|
+
|
|
17
|
+
Version 0.99.28 (2026-08-30)
|
|
18
|
+
----------------------------
|
|
19
|
+
* Add interactive `agent-run setup [org/repo]`, make `agent-run generate` the
|
|
20
|
+
profile-initialization command, and retain `init` as a deprecated alias.
|
|
21
|
+
* Use `~/.agent-run` as the single default config directory, overridable with
|
|
22
|
+
`--configdir`, `AGENT_CONFIG_DIR`, or a project-local `.agent-run.env`.
|
|
23
|
+
* Resolve profiles from `package.json.repository` and avoid rewriting unchanged
|
|
24
|
+
generated files.
|
|
25
|
+
|
|
4
26
|
Version 0.99.27 (2026-08-11)
|
|
5
27
|
----------------------------
|
|
6
28
|
* Rename the unattended-run option from `--danger` to `--yolo` for Codex and
|
package/README.md
CHANGED
|
@@ -1,10 +1,46 @@
|
|
|
1
1
|
# agent-run
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**Config once. Run with any native coding agent.**
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
`agent-run` lets you manage Codex, Claude Code, Gemini CLI, and Grok Build from
|
|
6
|
+
one shared configuration system while continuing to use each vendor's native
|
|
7
|
+
agent.
|
|
8
|
+
|
|
9
|
+
Keep agent configuration in a separate Git repository instead of adding
|
|
10
|
+
agent-specific files to every codebase. Define project instructions, skills,
|
|
11
|
+
MCP servers, policies, and reusable configuration fragments once, then generate
|
|
12
|
+
the native configuration each agent expects.
|
|
13
|
+
|
|
14
|
+
Configuration is template-based using Nunjucks/Jinja-style templates, making it
|
|
15
|
+
easy to build hierarchical setups from global defaults, organization rules,
|
|
16
|
+
project-specific settings, reusable fragments, and local overrides.
|
|
17
|
+
|
|
18
|
+
`agent-run` generates isolated agent runtimes outside the source repository, so
|
|
19
|
+
application repositories remain clean and developers do not have to maintain
|
|
20
|
+
separate `AGENTS.md`, `CLAUDE.md`, `GEMINI.md`, skills, and tool configuration
|
|
21
|
+
for every agent.
|
|
22
|
+
|
|
23
|
+
The core idea is simple:
|
|
24
|
+
|
|
25
|
+
**One configuration repository. One set of skills. Multiple native agents.**
|
|
26
|
+
|
|
27
|
+
```text
|
|
28
|
+
shared config repository
|
|
29
|
+
↓
|
|
30
|
+
global + project + local templates
|
|
31
|
+
↓
|
|
32
|
+
canonical instructions / skills / MCP
|
|
33
|
+
↓
|
|
34
|
+
agent-specific generated runtime
|
|
35
|
+
↓
|
|
36
|
+
Codex | Claude Code | Gemini CLI | Grok Build
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
The native agents remain native. `agent-run` does not replace their execution
|
|
40
|
+
engines, authentication, models, or tooling. It provides the portable
|
|
41
|
+
configuration layer around them.
|
|
42
|
+
|
|
43
|
+
**Config once, run anywhere.**
|
|
8
44
|
|
|
9
45
|
## Model
|
|
10
46
|
|
|
@@ -17,31 +53,33 @@ There are three things:
|
|
|
17
53
|
Example:
|
|
18
54
|
|
|
19
55
|
```text
|
|
20
|
-
|
|
21
|
-
agent-
|
|
22
|
-
agent-run.defaults.jsonc
|
|
23
|
-
org/
|
|
24
|
-
my-api/
|
|
25
|
-
agent-run.jsonc
|
|
26
|
-
local.md.njk # optional
|
|
27
|
-
overrides/ # optional
|
|
28
|
-
live/
|
|
29
|
-
CLAUDE.md
|
|
30
|
-
.claude/
|
|
31
|
-
bin/
|
|
32
|
-
memories/
|
|
33
|
-
codex-home/
|
|
34
|
-
AGENTS.md
|
|
35
|
-
config.toml
|
|
36
|
-
skills/
|
|
56
|
+
~/.agent-run/
|
|
57
|
+
agent-run.defaults.jsonc
|
|
37
58
|
org/
|
|
38
59
|
my-api/
|
|
60
|
+
agent-run.jsonc
|
|
61
|
+
local.md.njk # optional
|
|
62
|
+
overrides/ # optional
|
|
63
|
+
notes/
|
|
64
|
+
memory/
|
|
65
|
+
README.md # durable project memory, normally tracked
|
|
66
|
+
live/
|
|
67
|
+
CLAUDE.md
|
|
68
|
+
.claude/
|
|
69
|
+
bin/
|
|
70
|
+
memories/
|
|
71
|
+
codex-home/
|
|
72
|
+
AGENTS.md
|
|
73
|
+
config.toml
|
|
74
|
+
memories/ # native Codex memory, local generated state
|
|
75
|
+
skills/
|
|
76
|
+
~/source/org/my-api/
|
|
39
77
|
```
|
|
40
78
|
|
|
41
79
|
If your source repo is `~/source/org/my-api`, `agent-run` maps it to:
|
|
42
80
|
|
|
43
81
|
```text
|
|
44
|
-
|
|
82
|
+
~/.agent-run/org/my-api
|
|
45
83
|
```
|
|
46
84
|
|
|
47
85
|
The source repo stays clean. The agent files live in the matching path under
|
|
@@ -53,6 +91,7 @@ the agent config tree.
|
|
|
53
91
|
- `agent-run.jsonc`: sparse profile manifest and profile-discovery marker
|
|
54
92
|
- `local.md.njk`: optional project-specific instructions
|
|
55
93
|
- `overrides/`: optional per-profile template overrides
|
|
94
|
+
- `notes/memory/`: durable project memory shared through the config repository
|
|
56
95
|
- `live/memories/codex-home/AGENTS.md`: generated Codex instructions
|
|
57
96
|
- `live/memories/codex-home/config.toml`: generated Codex config
|
|
58
97
|
- `live/memories/codex-home/skills/`: generated Codex skills
|
|
@@ -96,13 +135,15 @@ The mapped path is:
|
|
|
96
135
|
|
|
97
136
|
1. `AGENT_RUN_PROFILE` in `.agent-run.env`
|
|
98
137
|
2. GitHub `origin` remote
|
|
99
|
-
3. `package.json.
|
|
100
|
-
4.
|
|
138
|
+
3. `package.json.repository` (string or object `url`)
|
|
139
|
+
4. `package.json.name`
|
|
140
|
+
5. the project path as `[parent]/[current]`
|
|
101
141
|
|
|
102
142
|
Examples:
|
|
103
143
|
|
|
104
144
|
- `AGENT_RUN_PROFILE=org/my-api` -> `org/my-api`
|
|
105
145
|
- `AGENT_RUN_PROFILE=unrelated/hello` -> `unrelated/hello`
|
|
146
|
+
- `package.json.repository = "github:org/my-api"` -> `org/my-api`
|
|
106
147
|
- `package.json.name = "@org/my-api"` -> `org/my-api`
|
|
107
148
|
- `package.json.name = "my-api"` -> `my-api`
|
|
108
149
|
- `/work/org/my-api` with none of the above -> `org/my-api`
|
|
@@ -124,20 +165,10 @@ AGENT_RUN_PROFILE=org/my-api
|
|
|
124
165
|
|
|
125
166
|
Config root:
|
|
126
167
|
|
|
127
|
-
- default
|
|
128
|
-
- override with `--
|
|
168
|
+
- default: `~/.agent-run`
|
|
169
|
+
- override with `--configdir=/path/to/agent-configs`
|
|
129
170
|
- override with `AGENT_CONFIG_DIR=/path/to/agent-configs`
|
|
130
|
-
-
|
|
131
|
-
- or set `AGENT_CONFIG_DIR=/path/to/agent-configs` or `AGENT_CONFIG_ROOT=/path/to/agent-configs` in `.agent-run.env`
|
|
132
|
-
|
|
133
|
-
For commands without a project root, `agent-run` looks for an existing config
|
|
134
|
-
root in these locations:
|
|
135
|
-
|
|
136
|
-
- Windows: `~/Documents/code/agent-config`, `~/Documents/code/agent-configs`,
|
|
137
|
-
`~/Desktop/code/agent-config`, `~/Desktop/code/agent-configs`,
|
|
138
|
-
`C:\code\agent-config`, `C:\code\agent-configs`
|
|
139
|
-
- Unix: `~/code/agent-config`, `~/code/agent-configs`, `~/agent-config`,
|
|
140
|
-
`~/agent-configs`, `~/.agent-config`, `~/.agent-configs`
|
|
171
|
+
- or set `AGENT_CONFIG_DIR=/path/to/agent-configs` in `.agent-run.env`
|
|
141
172
|
|
|
142
173
|
## Commands
|
|
143
174
|
|
|
@@ -163,6 +194,26 @@ When `~/.codex/auth.json` exists, profile-specific Codex homes link their
|
|
|
163
194
|
`auth.json` to that shared login cache so changing profiles does not require a
|
|
164
195
|
new ChatGPT login.
|
|
165
196
|
|
|
197
|
+
### Project Memory
|
|
198
|
+
|
|
199
|
+
Each profile has a durable `notes/memory/` directory outside the source repo.
|
|
200
|
+
`README.md` is a short index; agents read only the linked files relevant to the
|
|
201
|
+
current task. Agents may update project memory only when the user explicitly
|
|
202
|
+
asks them to remember or update something for that project.
|
|
203
|
+
|
|
204
|
+
Codex's native `$CODEX_HOME/memories/` remains under ignored `live/` state. It
|
|
205
|
+
is generated, machine-local recall data and is not copied into the tracked
|
|
206
|
+
project memory directory. Project memory is plain Markdown so it can be
|
|
207
|
+
reviewed and shared through the Git repository that normally holds the
|
|
208
|
+
`.agent-run` config tree.
|
|
209
|
+
|
|
210
|
+
When a profile still uses `memory/`, loose `memory*.md` files, or Markdown files
|
|
211
|
+
directly under the old `memories/` directory, agent-run detects the old layout
|
|
212
|
+
before updating or launching an agent. If those files are tracked, agent-run
|
|
213
|
+
shows the moves and asks before staging them with `git mv`. In a non-Git config
|
|
214
|
+
tree, or for untracked files, it uses ordinary filesystem moves. Non-interactive
|
|
215
|
+
runs stop with a command that can confirm the migration explicitly.
|
|
216
|
+
|
|
166
217
|
Claude Code currently has no `--cd` equivalent. `agent-run` keeps Claude's
|
|
167
218
|
process cwd at the project root, appends the generated `CLAUDE.md` with
|
|
168
219
|
`--append-system-prompt-file`, passes generated settings with `--settings`, and
|
|
@@ -186,12 +237,12 @@ to warn and continue for a specific invocation.
|
|
|
186
237
|
Initialize mapped files for the current repo:
|
|
187
238
|
|
|
188
239
|
```sh
|
|
189
|
-
agent-run
|
|
240
|
+
agent-run generate
|
|
190
241
|
```
|
|
191
242
|
|
|
192
243
|
This creates `<config-root>/agent-run.defaults.jsonc` when needed and a minimal
|
|
193
244
|
`agent-run.jsonc` marker for the mapped profile. It does not create empty local
|
|
194
|
-
instruction or override files.
|
|
245
|
+
instruction or override files. `agent-run init` remains as a deprecated alias.
|
|
195
246
|
|
|
196
247
|
Edit the source file for the current repo:
|
|
197
248
|
|
|
@@ -209,19 +260,18 @@ agent-run update
|
|
|
209
260
|
```
|
|
210
261
|
|
|
211
262
|
`update` requires an existing profile marker or local/legacy instruction file;
|
|
212
|
-
it does not silently scaffold an unconfigured project. Use `agent-run
|
|
263
|
+
it does not silently scaffold an unconfigured project. Use `agent-run generate` or
|
|
213
264
|
the tool command's `--create` option first.
|
|
214
265
|
|
|
215
266
|
Regenerate every profile under the config root without requiring matching code
|
|
216
267
|
checkouts:
|
|
217
268
|
|
|
218
269
|
```sh
|
|
219
|
-
agent-run update --all ~/.agent-
|
|
270
|
+
agent-run update --all ~/.agent-run
|
|
220
271
|
```
|
|
221
272
|
|
|
222
273
|
If the config root argument is omitted, `update --all` uses the normal configured
|
|
223
|
-
root. Without
|
|
224
|
-
project commands, the default is `[code]/agent-config`.
|
|
274
|
+
root. Without an override, the root is `$HOME/.agent-run`.
|
|
225
275
|
|
|
226
276
|
You can also generate from a tool command and stop before launch:
|
|
227
277
|
|
|
@@ -245,27 +295,28 @@ Per-profile override templates can be placed in:
|
|
|
245
295
|
- `overrides/codex-config.toml.njk`
|
|
246
296
|
- `overrides/claude-settings.json.njk`
|
|
247
297
|
|
|
248
|
-
##
|
|
298
|
+
## Default Config Tree
|
|
249
299
|
|
|
250
|
-
A complete
|
|
300
|
+
A complete default tree lives in `examples/basic-config`. It includes a minimal
|
|
251
301
|
project, `.agent-run.env`, root manifest defaults, global templates and
|
|
252
302
|
snippets, profile-local templates, skill templates, a personal memory skill,
|
|
253
303
|
profile skill overrides, tool config overrides, guardrails, checks, and
|
|
254
304
|
generated runtime paths.
|
|
255
305
|
|
|
256
|
-
To
|
|
306
|
+
To install the default tree and detected profile in your resolved config root:
|
|
257
307
|
|
|
258
308
|
```sh
|
|
259
309
|
agent-run setup
|
|
260
310
|
```
|
|
261
311
|
|
|
262
|
-
Or
|
|
312
|
+
Or select a profile non-interactively:
|
|
263
313
|
|
|
264
314
|
```sh
|
|
265
|
-
agent-run setup
|
|
315
|
+
agent-run setup myorg/myrepo
|
|
266
316
|
```
|
|
267
317
|
|
|
268
|
-
|
|
318
|
+
Use `--configdir=DIR` to choose a different destination. The copy skips files
|
|
319
|
+
that already exist, so local edits are preserved.
|
|
269
320
|
|
|
270
321
|
Try it from a checkout:
|
|
271
322
|
|
|
@@ -298,14 +349,17 @@ agent-run check --all ~/source
|
|
|
298
349
|
Migrate an existing config tree to the manifest/template layout:
|
|
299
350
|
|
|
300
351
|
```sh
|
|
301
|
-
agent-run migrate-config ~/.agent-
|
|
352
|
+
agent-run migrate-config --yes ~/.agent-run
|
|
302
353
|
```
|
|
303
354
|
|
|
304
355
|
This preserves `AGENTS-MODS.md`, creates `local.md.njk` and a sparse
|
|
305
356
|
`agent-run.jsonc` marker for legacy profiles, creates the root defaults and
|
|
306
357
|
`global/` templates, moves loose review files into `reviews/`, moves loose
|
|
307
|
-
|
|
308
|
-
`live/memories/codex-home` without overwriting existing
|
|
358
|
+
project memory files into each profile's `notes/memory/`, and moves old Codex
|
|
359
|
+
runtime files into `live/memories/codex-home` without overwriting existing
|
|
360
|
+
files. Use `--yes` to confirm tracked `git mv` operations in a non-interactive
|
|
361
|
+
run. Omit `--yes` to review and confirm tracked moves interactively. The
|
|
362
|
+
command stages moves but never commits them.
|
|
309
363
|
|
|
310
364
|
## Systemd Jobs
|
|
311
365
|
|
package/dist/checks.js
CHANGED
|
@@ -8,6 +8,7 @@ exports.hasErrors = hasErrors;
|
|
|
8
8
|
const fs = require("fs");
|
|
9
9
|
const path = require("path");
|
|
10
10
|
const constants_1 = require("./constants");
|
|
11
|
+
const config_tree_1 = require("./config-tree");
|
|
11
12
|
const manifest_1 = require("./manifest");
|
|
12
13
|
const project_1 = require("./project");
|
|
13
14
|
const renderer_1 = require("./renderer");
|
|
@@ -47,6 +48,9 @@ function checkAgentDirectory(projectRoot, agentDir) {
|
|
|
47
48
|
if (!(0, manifest_1.isProfileConfigured)(agentDir)) {
|
|
48
49
|
return [{ message: `missing manifest or legacy/local source file in ${agentDir}`, severity: 'ERROR' }];
|
|
49
50
|
}
|
|
51
|
+
for (const legacyPath of (0, config_tree_1.describeLegacyProfileLayout)(agentDir)) {
|
|
52
|
+
findings.push({ message: `old profile layout needs migration: ${legacyPath}`, severity: 'ERROR' });
|
|
53
|
+
}
|
|
50
54
|
for (const relativeTemplate of constants_1.REQUIRED_GLOBAL_TEMPLATES) {
|
|
51
55
|
if (!fs.existsSync(path.join(configRoot, relativeTemplate))) {
|
|
52
56
|
findings.push({
|
package/dist/cli.js
CHANGED
|
@@ -25,7 +25,7 @@ function applyGlobalOptions(options) {
|
|
|
25
25
|
}
|
|
26
26
|
function extractCommand(args) {
|
|
27
27
|
if (args.length === 0) {
|
|
28
|
-
(0, utils_1.fail)('usage: agent-run <codex|claude|check|
|
|
28
|
+
(0, utils_1.fail)('usage: agent-run <codex|claude|check|setup|generate|edit|update> [options] (run with --help for details)');
|
|
29
29
|
}
|
|
30
30
|
if (isHelpFlag(args[0])) {
|
|
31
31
|
printHelp('general');
|
|
@@ -50,6 +50,8 @@ function parseCommand(command, args) {
|
|
|
50
50
|
return parseCheckCommand(args);
|
|
51
51
|
case 'init':
|
|
52
52
|
return parseInitCommand(args);
|
|
53
|
+
case 'generate':
|
|
54
|
+
return parseGenerateCommand(args);
|
|
53
55
|
case 'setup':
|
|
54
56
|
return parseSetupCommand(args);
|
|
55
57
|
case 'edit':
|
|
@@ -85,18 +87,18 @@ function extractGlobalOptions(argv) {
|
|
|
85
87
|
else if (arg === '-v' || arg === '--verbose') {
|
|
86
88
|
options.verbose = true;
|
|
87
89
|
}
|
|
88
|
-
else if (arg === '--
|
|
90
|
+
else if (arg === '--configdir') {
|
|
89
91
|
const nextArg = argv[index + 1];
|
|
90
92
|
if (nextArg === undefined) {
|
|
91
|
-
(0, utils_1.fail)('missing value for --
|
|
93
|
+
(0, utils_1.fail)('missing value for --configdir');
|
|
92
94
|
}
|
|
93
95
|
options.configRootOverride = path.resolve(nextArg);
|
|
94
96
|
index += 1;
|
|
95
97
|
}
|
|
96
|
-
else if (arg.startsWith('--
|
|
97
|
-
const rootValue = arg.slice('--
|
|
98
|
+
else if (arg.startsWith('--configdir=')) {
|
|
99
|
+
const rootValue = arg.slice('--configdir='.length);
|
|
98
100
|
if (!rootValue) {
|
|
99
|
-
(0, utils_1.fail)('missing value for --
|
|
101
|
+
(0, utils_1.fail)('missing value for --configdir');
|
|
100
102
|
}
|
|
101
103
|
options.configRootOverride = path.resolve(rootValue);
|
|
102
104
|
}
|
|
@@ -196,8 +198,24 @@ function parseCheckCommand(inputArgs) {
|
|
|
196
198
|
function parseInitCommand(inputArgs) {
|
|
197
199
|
return { command: 'init', targetPath: parseSinglePath(inputArgs, 'init') };
|
|
198
200
|
}
|
|
201
|
+
function parseGenerateCommand(inputArgs) {
|
|
202
|
+
return { command: 'generate', targetPath: parseSinglePath(inputArgs, 'generate') };
|
|
203
|
+
}
|
|
199
204
|
function parseSetupCommand(inputArgs) {
|
|
200
|
-
|
|
205
|
+
let profile = null;
|
|
206
|
+
for (const arg of inputArgs) {
|
|
207
|
+
if (isHelpFlag(arg)) {
|
|
208
|
+
printHelp('setup');
|
|
209
|
+
}
|
|
210
|
+
if (arg.startsWith('--')) {
|
|
211
|
+
(0, utils_1.fail)(`unknown setup option: ${arg}`);
|
|
212
|
+
}
|
|
213
|
+
if (profile !== null) {
|
|
214
|
+
(0, utils_1.fail)('setup accepts at most one profile argument');
|
|
215
|
+
}
|
|
216
|
+
profile = arg;
|
|
217
|
+
}
|
|
218
|
+
return { command: 'setup', profile };
|
|
201
219
|
}
|
|
202
220
|
function parseEditCommand(inputArgs) {
|
|
203
221
|
return { command: 'edit', targetPath: parseSinglePath(inputArgs, 'edit') };
|
|
@@ -236,16 +254,22 @@ function parseUpdateCommand(inputArgs) {
|
|
|
236
254
|
}
|
|
237
255
|
function parseMigrateConfigCommand(inputArgs) {
|
|
238
256
|
let configRoot = (0, project_1.defaultConfigRoot)();
|
|
257
|
+
let yes = false;
|
|
239
258
|
for (const arg of inputArgs) {
|
|
240
259
|
if (isHelpFlag(arg)) {
|
|
241
260
|
printHelp('migrate-config');
|
|
242
261
|
}
|
|
243
|
-
if (arg
|
|
262
|
+
if (arg === '--yes') {
|
|
263
|
+
yes = true;
|
|
264
|
+
}
|
|
265
|
+
else if (arg.startsWith('--')) {
|
|
244
266
|
(0, utils_1.fail)(`unknown migrate-config option: ${arg}`);
|
|
245
267
|
}
|
|
246
|
-
|
|
268
|
+
else {
|
|
269
|
+
configRoot = arg;
|
|
270
|
+
}
|
|
247
271
|
}
|
|
248
|
-
return { command: 'migrate-config', configRoot: path.resolve(configRoot) };
|
|
272
|
+
return { command: 'migrate-config', configRoot: path.resolve(configRoot), yes };
|
|
249
273
|
}
|
|
250
274
|
function isHelpFlag(value) {
|
|
251
275
|
return value === '-h' || value === '--help';
|
|
@@ -274,8 +298,9 @@ function renderHelp(topic) {
|
|
|
274
298
|
' --all Check every repo under path',
|
|
275
299
|
''
|
|
276
300
|
],
|
|
277
|
-
init: ['Usage:', ' agent-run init [path]', '', '
|
|
278
|
-
|
|
301
|
+
init: ['Usage:', ' agent-run init [path]', '', 'Deprecated alias for `agent-run generate [path]`.', ''],
|
|
302
|
+
generate: ['Usage:', ' agent-run generate [path]', '', 'Create a minimal mapped profile marker and render generated files.', ''],
|
|
303
|
+
setup: ['Usage:', ' agent-run setup [org/repo]', '', 'Install the default config tree and selected profile.', ''],
|
|
279
304
|
edit: ['Usage:', ' agent-run edit [path]', '', 'Create or open the editable local profile template.', ''],
|
|
280
305
|
update: [
|
|
281
306
|
'Usage:',
|
|
@@ -287,9 +312,12 @@ function renderHelp(topic) {
|
|
|
287
312
|
],
|
|
288
313
|
'migrate-config': [
|
|
289
314
|
'Usage:',
|
|
290
|
-
' agent-run migrate-config [config-root]',
|
|
315
|
+
' agent-run migrate-config [--yes] [config-root]',
|
|
291
316
|
'',
|
|
292
317
|
'Convert an existing agent config tree to the current manifest and global-template layout.',
|
|
318
|
+
'',
|
|
319
|
+
'Options:',
|
|
320
|
+
' --yes Confirm tracked Git moves without prompting',
|
|
293
321
|
''
|
|
294
322
|
]
|
|
295
323
|
};
|
|
@@ -300,25 +328,25 @@ function renderHelp(topic) {
|
|
|
300
328
|
`agent-run ${agentRunVersion()}`,
|
|
301
329
|
'',
|
|
302
330
|
'Usage:',
|
|
303
|
-
' agent-run <codex|claude|check|setup|
|
|
331
|
+
' agent-run <codex|claude|check|setup|generate|edit|update> [options]',
|
|
304
332
|
'',
|
|
305
333
|
'Commands:',
|
|
306
334
|
' codex [--none] [--create] [--local] [--show] [--generate] [--yolo|--sandboxed] [--network] [args...]',
|
|
307
335
|
' Run codex with generated private config',
|
|
308
336
|
' claude [--none] [--create] [--local] [--show] [--generate] [--yolo] [args...]',
|
|
309
337
|
' Run claude with generated private config',
|
|
310
|
-
' setup [
|
|
338
|
+
' setup [org/repo] Install the default tree and selected profile',
|
|
311
339
|
' check [--all] [path] Validate generated profile output',
|
|
312
|
-
'
|
|
340
|
+
' generate [path] Create a sparse profile marker and render output',
|
|
313
341
|
' edit [path] Create or open local.md.njk',
|
|
314
342
|
' update [--all] [path] Regenerate existing profile output',
|
|
315
|
-
' migrate-config [config-root]
|
|
343
|
+
' migrate-config [--yes] [config-root] Convert existing config tree layout',
|
|
316
344
|
'',
|
|
317
345
|
'Global options:',
|
|
318
346
|
' -h, --help Show this help text',
|
|
319
347
|
' -V, --version Show the agent-run version',
|
|
320
348
|
' -v, --verbose Print path resolution and wrapper actions',
|
|
321
|
-
' --
|
|
349
|
+
' --configdir=DIR Override the config directory',
|
|
322
350
|
'',
|
|
323
351
|
'Run wrapper options:',
|
|
324
352
|
' --local Warn about local AI files instead of failing',
|
|
@@ -351,7 +379,7 @@ function normalizeCommandName(value) {
|
|
|
351
379
|
if (base === 'agent-run') {
|
|
352
380
|
return null;
|
|
353
381
|
}
|
|
354
|
-
return ['codex', 'claude', 'check', 'setup', 'init', 'edit', 'update', 'migrate-config'].includes(base)
|
|
382
|
+
return ['codex', 'claude', 'check', 'setup', 'generate', 'init', 'edit', 'update', 'migrate-config'].includes(base)
|
|
355
383
|
? base
|
|
356
384
|
: null;
|
|
357
385
|
}
|