claudmax 3.0.9 → 3.1.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.
Files changed (2) hide show
  1. package/index.js +9 -8
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -17,6 +17,15 @@ const HOME = os.homedir();
17
17
  // ── CLI args ──────────────────────────────────────────────────────────────
18
18
  const args = process.argv.slice(2);
19
19
 
20
+ // Parse flags early so --run/--claude/--version/--help can exit before interactive prompts
21
+ const flags = {};
22
+ for (let i = 0; i < args.length; i++) {
23
+ if (args[i].startsWith('--')) {
24
+ const key = args[i].slice(2);
25
+ flags[key] = args[i + 1] !== undefined && !args[i + 1].startsWith('--') ? args[i + 1] : true;
26
+ }
27
+ }
28
+
20
29
  // --run <prompt> — launch Claude Code in full autonomous mode
21
30
  if (flags.run || flags.r) {
22
31
  const { spawn } = require('child_process');
@@ -95,14 +104,6 @@ if (args.includes('--help') || args.includes('-h')) {
95
104
  process.exit(0);
96
105
  }
97
106
 
98
- const flags = {};
99
- for (let i = 0; i < args.length; i++) {
100
- if (args[i].startsWith('--')) {
101
- const key = args[i].slice(2);
102
- flags[key] = args[i + 1] !== undefined && !args[i + 1].startsWith('--') ? args[i + 1] : true;
103
- }
104
- }
105
-
106
107
  // ── Color helpers ─────────────────────────────────────────────────────────
107
108
  const C = {
108
109
  reset: '\x1b[0m',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claudmax",
3
- "version": "3.0.9",
3
+ "version": "3.1.0",
4
4
  "description": "ClaudMax CLI — Configure Claude Code, Cursor, Windsurf, Cline, and Roo Code to use ClaudMax API gateway with one command",
5
5
  "main": "index.js",
6
6
  "bin": {