+23
-5
@@ -12,2 +12,3 @@ #!/usr/bin/env node | ||
| const os = require('os'); | ||
| const fs = require('fs'); | ||
| const { spawn } = require('child_process'); | ||
@@ -25,8 +26,19 @@ | ||
| function getPlatform() { | ||
| const key = `${os.platform()}-${os.arch()}`; | ||
| return PLATFORMS[key] || PLATFORMS['linux-x64']; | ||
| function getPlatformKey() { | ||
| return `${os.platform()}-${os.arch()}`; | ||
| } | ||
| const platformPackage = getPlatform(); | ||
| function resolvePlatformPackage() { | ||
| const key = getPlatformKey(); | ||
| return PLATFORMS[key] || null; | ||
| } | ||
| const platformPackage = resolvePlatformPackage(); | ||
| if (!platformPackage) { | ||
| const supported = Object.keys(PLATFORMS).sort().join(', '); | ||
| console.error(`Unsupported platform/architecture: ${getPlatformKey()}`); | ||
| console.error(`Supported targets: ${supported}`); | ||
| process.exit(1); | ||
| } | ||
| const binDir = path.join(__dirname, '..', platformPackage, 'bin'); | ||
@@ -37,2 +49,8 @@ const isWindows = os.platform() === 'win32'; | ||
| if (!fs.existsSync(binaryPath)) { | ||
| console.error(`codexctl binary not found at: ${binaryPath}`); | ||
| console.error('Reinstall package to fetch the correct optional dependency for this platform.'); | ||
| process.exit(1); | ||
| } | ||
| const child = spawn(binaryPath, process.argv.slice(2), { | ||
@@ -43,2 +61,2 @@ stdio: 'inherit', | ||
| child.on('exit', (code) => process.exit(code ?? 0)); | ||
| child.on('exit', (code) => process.exit(code ?? 0)); |
+11
-14
| { | ||
| "name": "codexctl", | ||
| "version": "0.6.2", | ||
| "description": "Codex CLI Profile Manager - Manage multiple AI CLI accounts", | ||
| "version": "0.7.0", | ||
| "description": "Codex Controller - Full control plane for Codex CLI", | ||
| "repository": { | ||
@@ -10,10 +10,7 @@ "type": "git", | ||
| "keywords": [ | ||
| "ai", | ||
| "codex", | ||
| "controller", | ||
| "cli", | ||
| "codex", | ||
| "claude", | ||
| "gemini", | ||
| "openai", | ||
| "profile", | ||
| "manager" | ||
| "profiles", | ||
| "usage" | ||
| ], | ||
@@ -33,7 +30,7 @@ "author": "Bhanu Korthiwada", | ||
| "optionalDependencies": { | ||
| "@codexctl/linux-x64": "^0.6.2", | ||
| "@codexctl/linux-arm64": "^0.6.2", | ||
| "@codexctl/darwin-x64": "^0.6.2", | ||
| "@codexctl/darwin-arm64": "^0.6.2", | ||
| "@codexctl/win32-x64": "^0.6.2" | ||
| "@codexctl/linux-x64": "^0.7.0", | ||
| "@codexctl/linux-arm64": "^0.7.0", | ||
| "@codexctl/darwin-x64": "^0.7.0", | ||
| "@codexctl/darwin-arm64": "^0.7.0", | ||
| "@codexctl/win32-x64": "^0.7.0" | ||
| }, | ||
@@ -40,0 +37,0 @@ "files": [ |
+4
-4
@@ -1,4 +0,4 @@ | ||
| # CodexCTL | ||
| # Codex Controller (`codexctl`) | ||
| Codex CLI Profile Manager - Manage multiple AI CLI accounts (Codex, Claude, Gemini, OpenAI) | ||
| Codex Controller for Codex CLI. The first end-to-end slice is profile management, switching, usage visibility, and concurrent terminal workflows. | ||
@@ -34,3 +34,3 @@ ## Installation | ||
| - Fast profile switching | ||
| - Multiple AI CLI support (Codex, Claude, Gemini, OpenAI) | ||
| - Usage visibility across saved Codex profiles | ||
| - Export to use profiles concurrently in different terminals | ||
@@ -49,2 +49,2 @@ | ||
| MIT | ||
| MIT |
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
4772
13.4%53
43.24%49
2.08%1
Infinity%