@iamdevlinph/codex-kit 1.0.1 → 1.0.3

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 CHANGED
@@ -12,13 +12,18 @@ Codex model configuration; configuration is a separate, explicit command.
12
12
 
13
13
  ## Install on a device
14
14
 
15
- No npm or GitHub login is required:
15
+ No npm or GitHub login is required. For regular use, install the CLI globally:
16
16
 
17
17
  ```sh
18
- pnpm dlx @iamdevlinph/codex-kit@latest global install
19
- pnpm dlx @iamdevlinph/codex-kit@latest global configure
18
+ pnpm add --global @iamdevlinph/codex-kit@latest
19
+ codex-kit global install
20
+ codex-kit global configure
20
21
  ```
21
22
 
23
+ `npm install --global @iamdevlinph/codex-kit@latest` works as an alternative.
24
+ For one-off use without a global installation, prefix a command with
25
+ `pnpm dlx @iamdevlinph/codex-kit@latest`.
26
+
22
27
  `global install` copies reusable agents to `${CODEX_HOME:-~/.codex}` and
23
28
  maintains a marked routing section in the global `AGENTS.md`.
24
29
 
@@ -27,8 +32,13 @@ maintains a marked routing section in the global `AGENTS.md`.
27
32
  ```toml
28
33
  model = "gpt-5.6-sol"
29
34
  model_reasoning_effort = "high"
35
+ plan_mode_reasoning_effort = "high"
30
36
  ```
31
37
 
38
+ Before changing these keys, codex-kit creates a timestamped `config.toml`
39
+ backup and records their previous values. `global uninstall` restores those
40
+ values without replacing unrelated configuration changed afterward.
41
+
32
42
  Use a different Codex home when needed:
33
43
 
34
44
  ```sh
@@ -44,8 +54,9 @@ Inspect the installed setup:
44
54
  pnpm dlx @iamdevlinph/codex-kit@latest global list
45
55
  ```
46
56
 
47
- The summary shows the Codex home, orchestrator, reasoning effort, routing
48
- status, and installed custom agents without dumping unrelated configuration.
57
+ The summary shows the Codex home, orchestrator, normal and Plan-mode reasoning
58
+ effort, routing status, and installed custom agents without dumping unrelated
59
+ configuration.
49
60
 
50
61
  Uninstall package-managed global files:
51
62
 
@@ -60,6 +71,8 @@ unmanaged `commit-pusher.toml` is reported but never silently deleted.
60
71
 
61
72
  | Action | Command |
62
73
  | --- | --- |
74
+ | Show command help | `codex-kit --help` |
75
+ | Print the installed version | `codex-kit --version` |
63
76
  | Install global agents and routing | `codex-kit global install` |
64
77
  | Configure the orchestrator | `codex-kit global configure` |
65
78
  | Inspect global configuration | `codex-kit global list` |
package/bin/codex-kit.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { copyFileSync, existsSync, mkdirSync, readFileSync, readdirSync, renameSync, rmSync, statSync, writeFileSync, } from "node:fs";
2
+ import { copyFileSync, existsSync, mkdirSync, readFileSync, realpathSync, readdirSync, renameSync, rmSync, statSync, writeFileSync, } from "node:fs";
3
3
  import { createHash } from "node:crypto";
4
4
  import { spawnSync } from "node:child_process";
5
5
  import { homedir } from "node:os";
@@ -71,7 +71,7 @@ function topLevelConfigEntries(contents) {
71
71
  }
72
72
  if (inTable)
73
73
  continue;
74
- const match = /^(\s*)(model|model_reasoning_effort)\s*=\s*(.*?)\s*$/.exec(line);
74
+ const match = /^(\s*)(model|model_reasoning_effort|plan_mode_reasoning_effort)\s*=\s*(.*?)\s*$/.exec(line);
75
75
  const key = match?.[2];
76
76
  const value = match?.[3];
77
77
  if (key && value !== undefined && !entries.has(key))
@@ -97,7 +97,7 @@ function setTopLevelConfig(contents, desired) {
97
97
  const line = lines[index];
98
98
  if (line === undefined)
99
99
  continue;
100
- const match = /^(\s*)(model|model_reasoning_effort)\s*=\s*(.*?)\s*$/.exec(line);
100
+ const match = /^(\s*)(model|model_reasoning_effort|plan_mode_reasoning_effort)\s*=\s*(.*?)\s*$/.exec(line);
101
101
  const key = match?.[2];
102
102
  if (!match || !key || seen.has(key))
103
103
  continue;
@@ -128,7 +128,7 @@ function restoreTopLevelConfig(contents, config) {
128
128
  const line = lines[index];
129
129
  if (line === undefined)
130
130
  continue;
131
- const match = /^(\s*)(model|model_reasoning_effort)\s*=\s*(.*?)\s*$/.exec(line);
131
+ const match = /^(\s*)(model|model_reasoning_effort|plan_mode_reasoning_effort)\s*=\s*(.*?)\s*$/.exec(line);
132
132
  const key = match?.[2];
133
133
  if (!match || !key || restored.has(key))
134
134
  continue;
@@ -286,6 +286,7 @@ function configureGlobal(options) {
286
286
  const desired = {
287
287
  model: options.orchestrator,
288
288
  model_reasoning_effort: options.reasoningEffort,
289
+ plan_mode_reasoning_effort: options.reasoningEffort,
289
290
  };
290
291
  const priorState = loadState(home);
291
292
  const original = existsSync(configFile) ? readText(configFile) : "";
@@ -327,6 +328,7 @@ function configureGlobal(options) {
327
328
  saveState(home, priorState);
328
329
  console.log(`Orchestrator: ${desired.model}`);
329
330
  console.log(`Reasoning effort: ${desired.model_reasoning_effort}`);
331
+ console.log(`Plan mode reasoning effort: ${desired.plan_mode_reasoning_effort}`);
330
332
  }
331
333
  function listGlobal(options) {
332
334
  const home = options.codexHome;
@@ -353,6 +355,7 @@ function listGlobal(options) {
353
355
  console.log(`Config: ${configFile}${existsSync(configFile) ? "" : " (missing)"}`);
354
356
  console.log(`Orchestrator: ${value("model")}`);
355
357
  console.log(`Reasoning effort: ${value("model_reasoning_effort")}`);
358
+ console.log(`Plan mode reasoning effort: ${value("plan_mode_reasoning_effort")}`);
356
359
  console.log(`Kit state: ${existsSync(stateFile) ? state.version : "not installed"}`);
357
360
  const hasRoutingBlock = existsSync(globalAgents) && readText(globalAgents).includes(GLOBAL_BEGIN);
358
361
  console.log(`Global routing: ${hasRoutingBlock ? "installed" : "not installed"}`);
@@ -653,10 +656,11 @@ Usage:
653
656
  codex-kit project status [--cwd PATH]
654
657
  codex-kit project mark-applied [--cwd PATH]
655
658
  codex-kit version check
659
+ codex-kit --help
656
660
  codex-kit --version
657
661
 
658
- Global configure defaults to gpt-5.6-sol with high reasoning and edits only
659
- the top-level model settings in CODEX_HOME/config.toml.
662
+ Global configure defaults to gpt-5.6-sol with high normal and Plan-mode reasoning
663
+ and edits only those top-level model settings in CODEX_HOME/config.toml.
660
664
  Global install manages custom agents and a marked routing block under CODEX_HOME.
661
665
  Project sync refreshes TEMPLATE_AGENTS.md and never merges it into AGENTS.md.`);
662
666
  }
@@ -685,7 +689,8 @@ export function main(argv = process.argv.slice(2)) {
685
689
  return checkVersion();
686
690
  throw new Error(`Unknown command: ${options.positionals.join(" ")}`);
687
691
  }
688
- if (process.argv[1] && resolve(process.argv[1]) === fileURLToPath(import.meta.url)) {
692
+ if (process.argv[1] &&
693
+ realpathSync(resolve(process.argv[1])) === realpathSync(fileURLToPath(import.meta.url))) {
689
694
  try {
690
695
  main();
691
696
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iamdevlinph/codex-kit",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "Portable Codex subagents and project AGENTS.md defaults.",
5
5
  "type": "module",
6
6
  "bin": {