claude-codex-proxy 1.0.0 → 1.0.1

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
@@ -1,4 +1,4 @@
1
- # Codex Claude Proxy
1
+ # Claude Codex Proxy
2
2
 
3
3
  ![Architecture banner](./images/f757093f-507b-4453-994e-f8275f8b07a9.png)
4
4
 
@@ -9,6 +9,8 @@
9
9
  > **Use Claude Code CLI with the power of ChatGPT Codex models.**
10
10
  > A local proxy that translates Anthropic API requests into ChatGPT Codex calls, enabling you to use the `claude` CLI tool with your ChatGPT Free/Plus/Pro subscription.
11
11
 
12
+ > This project is forked from the original `codex-claude-proxy` project and maintained with additional changes for this distribution.
13
+
12
14
  ---
13
15
 
14
16
  ## 🚀 Features
@@ -70,6 +72,17 @@ claude-codex-proxy start
70
72
 
71
73
  ---
72
74
 
75
+ ## ✅ Recommended Claude Code Version
76
+
77
+ Recommended Claude Code CLI versions:
78
+
79
+ - `2.1.79`
80
+ - `2.1.88`
81
+
82
+ Other versions may work, but these versions are recommended for better compatibility with this proxy.
83
+
84
+ ---
85
+
73
86
  ## 🚦 Quick Start
74
87
 
75
88
  ### 1. Start the Proxy
package/bin/cli.js CHANGED
@@ -16,12 +16,12 @@ const command = args[0];
16
16
 
17
17
  function showHelp() {
18
18
  console.log(`
19
- codex-claude-proxy v${packageJson.version}
19
+ claude-codex-proxy v${packageJson.version}
20
20
 
21
21
  Proxy server for using ChatGPT Codex models with Claude Code CLI.
22
22
 
23
23
  USAGE:
24
- codex-claude-proxy <command> [options]
24
+ claude-codex-proxy <command> [options]
25
25
 
26
26
  COMMANDS:
27
27
  start Start the proxy server (default port: 8081)
@@ -41,15 +41,15 @@ ENVIRONMENT:
41
41
  PORT Server port (default: 8081)
42
42
 
43
43
  EXAMPLES:
44
- codex-claude-proxy start
45
- PORT=3000 codex-claude-proxy start
46
- codex-claude-proxy accounts add
47
- codex-claude-proxy accounts add --no-browser
48
- codex-claude-proxy accounts list
49
- codex-claude-proxy accounts verify
44
+ claude-codex-proxy start
45
+ PORT=3000 claude-codex-proxy start
46
+ claude-codex-proxy accounts add
47
+ claude-codex-proxy accounts add --no-browser
48
+ claude-codex-proxy accounts list
49
+ claude-codex-proxy accounts verify
50
50
 
51
51
  HEADLESS/VM USAGE:
52
- 1. Run: codex-claude-proxy accounts add --no-browser
52
+ 1. Run: claude-codex-proxy accounts add --no-browser
53
53
  2. Copy the URL shown and open in browser on another device
54
54
  3. After login, paste the callback URL back in terminal
55
55
 
@@ -102,7 +102,7 @@ async function main() {
102
102
 
103
103
  default:
104
104
  console.error(`Unknown command: ${command}`);
105
- console.error('Run "codex-claude-proxy --help" for usage information.');
105
+ console.error('Run "claude-codex-proxy --help" for usage information.');
106
106
  process.exit(1);
107
107
  }
108
108
  }
package/docs/OAUTH.md CHANGED
@@ -6,12 +6,12 @@ This proxy uses **OAuth 2.0 with PKCE** for secure authentication with ChatGPT.
6
6
 
7
7
  ### Desktop (Browser)
8
8
  ```bash
9
- codex-claude-proxy accounts add
9
+ claude-codex-proxy accounts add
10
10
  ```
11
11
 
12
12
  ### Headless/VM (No Browser)
13
13
  ```bash
14
- codex-claude-proxy accounts add --no-browser
14
+ claude-codex-proxy accounts add --no-browser
15
15
  ```
16
16
 
17
17
  ## Headless/VM Workflow
@@ -20,7 +20,7 @@ When running on a server without a browser (VM, Docker, SSH):
20
20
 
21
21
  1. Run the command with `--no-browser`:
22
22
  ```bash
23
- codex-claude-proxy accounts add --no-browser
23
+ claude-codex-proxy accounts add --no-browser
24
24
  ```
25
25
 
26
26
  2. It prints a URL like:
@@ -59,16 +59,16 @@ When running on a server without a browser (VM, Docker, SSH):
59
59
 
60
60
  ```bash
61
61
  # List accounts
62
- codex-claude-proxy accounts list
62
+ claude-codex-proxy accounts list
63
63
 
64
64
  # Add account (browser)
65
- codex-claude-proxy accounts add
65
+ claude-codex-proxy accounts add
66
66
 
67
67
  # Add account (headless)
68
- codex-claude-proxy accounts add --no-browser
68
+ claude-codex-proxy accounts add --no-browser
69
69
 
70
70
  # Clear all accounts
71
- codex-claude-proxy accounts clear
71
+ claude-codex-proxy accounts clear
72
72
  ```
73
73
 
74
74
  ## Troubleshooting
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-codex-proxy",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Multi-account proxy server for OpenAI Codex CLI with Claude API compatibility",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -45,7 +45,9 @@
45
45
  "test:api": "node --test tests/api.test.js",
46
46
  "test:routing": "node --test tests/routing.test.js",
47
47
  "test:cors": "node --test tests/cors_security.test.js",
48
- "test:ui": "node --test tests/ui.test.js"
48
+ "test:ui": "node --test tests/ui.test.js",
49
+ "pack:check": "npm pack --dry-run",
50
+ "release:npm": "npm run test:unit && npm pack --dry-run && npm publish"
49
51
  },
50
52
  "dependencies": {
51
53
  "express": "^4.18.2",
package/public/index.html CHANGED
@@ -4,7 +4,7 @@
4
4
  <head>
5
5
  <meta charset="UTF-8">
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
- <title>Codex Claude Proxy</title>
7
+ <title>Claude Codex Proxy</title>
8
8
  <link rel="icon" type="image/svg+xml" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>🚀</text></svg>">
9
9
  <script src="https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js" defer></script>
10
10
  <link rel="stylesheet" href="/css/style.css">
@@ -73,7 +73,7 @@
73
73
  <span class="text-[10px] text-gray-500 font-mono tracking-wider">CLAUDE PROXY SYSTEM</span>
74
74
  <span class="text-[10px] text-gray-500 font-mono tracking-wider" x-text="'v' + version"></span>
75
75
  </div>
76
- <a href="https://github.com/Ayush-Kotlin-Dev/codex-claude-proxy" target="_blank" class="text-[10px] text-neon-purple hover:text-purple-400 hover:underline transition-colors flex items-center gap-1">
76
+ <a href="https://github.com/zzy-life/codex-claude-proxy" target="_blank" class="text-[10px] text-neon-purple hover:text-purple-400 hover:underline transition-colors flex items-center gap-1">
77
77
  <svg class="w-3 h-3" fill="currentColor" viewBox="0 0 24 24"><path d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"/></svg>
78
78
  <span>Star on GitHub</span>
79
79
  </a>
@@ -526,18 +526,18 @@ async function main() {
526
526
  case 'help':
527
527
  default:
528
528
  console.log('\nUsage:');
529
- console.log(' codex-claude-proxy accounts add Add account (opens browser)');
530
- console.log(' codex-claude-proxy accounts add --no-browser Add account (manual code)');
531
- console.log(' codex-claude-proxy accounts list List all accounts');
532
- console.log(' codex-claude-proxy accounts remove Remove accounts interactively');
533
- console.log(' codex-claude-proxy accounts verify Verify account tokens');
534
- console.log(' codex-claude-proxy accounts clear Remove all accounts');
535
- console.log(' codex-claude-proxy accounts help Show this help');
529
+ console.log(' claude-codex-proxy accounts add Add account (opens browser)');
530
+ console.log(' claude-codex-proxy accounts add --no-browser Add account (manual code)');
531
+ console.log(' claude-codex-proxy accounts list List all accounts');
532
+ console.log(' claude-codex-proxy accounts remove Remove accounts interactively');
533
+ console.log(' claude-codex-proxy accounts verify Verify account tokens');
534
+ console.log(' claude-codex-proxy accounts clear Remove all accounts');
535
+ console.log(' claude-codex-proxy accounts help Show this help');
536
536
  console.log('\nOptions:');
537
537
  console.log(' --no-browser Manual authorization code input (for headless/VM servers)');
538
538
  console.log(' --port=<port> Server port (default: 8081)');
539
539
  console.log('\nHeadless/VM Usage:');
540
- console.log(' 1. Run: codex-claude-proxy accounts add --no-browser');
540
+ console.log(' 1. Run: claude-codex-proxy accounts add --no-browser');
541
541
  console.log(' 2. Copy the URL shown and open in browser on another device');
542
542
  console.log(' 3. After login, paste the callback URL back in terminal');
543
543
  break;
package/src/index.js CHANGED
@@ -1,19 +1,29 @@
1
1
  /**
2
- * Codex Claude Proxy
2
+ * Claude Codex Proxy
3
3
  * Entry point
4
4
  */
5
5
 
6
+ import { createRequire } from 'module';
6
7
  import { startServer } from './server.js';
7
8
  import { logger } from './utils/logger.js';
8
9
  import { getStatus, ACCOUNTS_FILE } from './account-manager.js';
9
10
 
11
+ const require = createRequire(import.meta.url);
12
+ const packageJson = require('../package.json');
10
13
  const PORT = Number(process.env.PORT || 8081);
14
+ const BANNER_WIDTH = 62;
15
+ const centerBannerText = (text) => {
16
+ const padding = Math.max(0, BANNER_WIDTH - text.length);
17
+ const left = Math.floor(padding / 2);
18
+ const right = padding - left;
19
+ return `${' '.repeat(left)}${text}${' '.repeat(right)}`;
20
+ };
11
21
 
12
22
  startServer({ port: PORT });
13
23
 
14
24
  console.log(`
15
25
  ╔══════════════════════════════════════════════════════════════╗
16
- Codex Claude Proxy v1.0.5
26
+ ║${centerBannerText(`Claude Codex Proxy v${packageJson.version}`)}
17
27
  ║ (Direct API Mode) ║
18
28
  ╠══════════════════════════════════════════════════════════════╣
19
29
  ║ Server: http://localhost:${PORT} ║
@@ -30,7 +40,7 @@ console.log(`
30
40
  ╠══════════════════════════════════════════════════════════════╣
31
41
  ║ Support: ║
32
42
  ║ ★ Give it a star on GitHub! ║
33
- ║ https://github.com/Ayush-Kotlin-Dev/codex-claude-proxy
43
+ ║ https://github.com/zzy-life/codex-claude-proxy
34
44
  ╚══════════════════════════════════════════════════════════════╝
35
45
  `);
36
46