codex-copilot-dx 0.4.8 → 0.4.9
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 +8 -8
- package/bin/cli.mjs +6 -4
- package/package.json +3 -2
- package/src/claude-desktop-config.mjs +7 -7
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# codex-copilot-dx
|
|
2
2
|
|
|
3
|
-
Use [Codex Desktop](https://openai.com/codex), [Claude Code](https://claude.com/claude-code), and optionally Claude
|
|
3
|
+
Use [Codex Desktop](https://openai.com/codex), [Claude Code](https://claude.com/claude-code), and optionally Claude App with your **GitHub Copilot** subscription.
|
|
4
4
|
|
|
5
5
|
## How it works
|
|
6
6
|
|
|
@@ -8,7 +8,7 @@ A single in-process adapter (port `2026`) exposes both APIs over your Copilot su
|
|
|
8
8
|
|
|
9
9
|
- **Codex** -> OpenAI Responses API (`/v1/responses`, `/v1/responses/compact`); Responses-only models and compaction proxy directly, chat models convert to Chat Completions.
|
|
10
10
|
- **Claude Code** -> Anthropic Messages API (`/v1/messages`, `/v1/messages/count_tokens`), translated to/from Chat Completions.
|
|
11
|
-
- **Claude
|
|
11
|
+
- **Claude App** -> optional Claude Desktop App gateway profile using the same local Messages API plus local model discovery for the configured gateway key.
|
|
12
12
|
|
|
13
13
|
Supports both HTTP SSE streaming and non-streaming.
|
|
14
14
|
|
|
@@ -16,7 +16,7 @@ Supports both HTTP SSE streaming and non-streaming.
|
|
|
16
16
|
|
|
17
17
|
- GitHub Copilot subscription (Individual, Business, or Enterprise)
|
|
18
18
|
- Node.js 18+
|
|
19
|
-
- [Codex Desktop](https://openai.com/codex), [Claude Code](https://claude.com/claude-code), and/or Claude
|
|
19
|
+
- [Codex Desktop](https://openai.com/codex), [Claude Code](https://claude.com/claude-code), and/or Claude App installed
|
|
20
20
|
|
|
21
21
|
## Usage
|
|
22
22
|
|
|
@@ -38,9 +38,9 @@ Claude Code picks up the new `ANTHROPIC_BASE_URL` on its next launch.
|
|
|
38
38
|
|
|
39
39
|
Do not set Claude Code by manually exporting `ANTHROPIC_BASE_URL` or `ANTHROPIC_AUTH_TOKEN` in your shell. Let `codex-copilot-dx` write the local config files instead. If you previously exported those variables, remove them from shell startup files and restart the terminal before launching Claude Code.
|
|
40
40
|
|
|
41
|
-
### Claude
|
|
41
|
+
### Claude App opt-in
|
|
42
42
|
|
|
43
|
-
Claude
|
|
43
|
+
Claude App support is opt-in so the default Codex Desktop and Claude Code setup stays unchanged:
|
|
44
44
|
|
|
45
45
|
```bash
|
|
46
46
|
npx codex-copilot-dx@latest --configure-claude-desktop
|
|
@@ -52,7 +52,7 @@ Or set:
|
|
|
52
52
|
CCDX_CONFIGURE_CLAUDE_DESKTOP=1 npx codex-copilot-dx@latest
|
|
53
53
|
```
|
|
54
54
|
|
|
55
|
-
This writes a local Claude
|
|
55
|
+
This writes a local Claude App 3P gateway profile that points to the adapter root URL, such as `http://127.0.0.1:2026`. The profile uses a generated local bearer key unless `CCDX_CLAUDE_DESKTOP_API_KEY` is set. Restart Claude App after running the command.
|
|
56
56
|
|
|
57
57
|
## Configuration
|
|
58
58
|
|
|
@@ -70,8 +70,8 @@ Environment variables:
|
|
|
70
70
|
| `CCDX_IMG_MIN_BYTES` | `100000` | Images smaller than this are left untouched |
|
|
71
71
|
| `CCDX_IMG_CONCURRENCY` | `4` | Concurrent image optimization tasks; values above `12` are capped at `12` |
|
|
72
72
|
| `CCDX_DISABLE_IMG_OPT` | unset | Set to `1` to disable image optimization |
|
|
73
|
-
| `CCDX_CONFIGURE_CLAUDE_DESKTOP` | unset | Set to `1` to write the Claude
|
|
74
|
-
| `CCDX_CLAUDE_DESKTOP_API_KEY` | generated for opt-in setup | Bearer key written into the Claude
|
|
73
|
+
| `CCDX_CONFIGURE_CLAUDE_DESKTOP` | unset | Set to `1` to write the Claude App 3P gateway profile during startup |
|
|
74
|
+
| `CCDX_CLAUDE_DESKTOP_API_KEY` | generated for opt-in setup | Bearer key written into the Claude App profile and recognized by the adapter for model discovery |
|
|
75
75
|
| `CCDX_CLAUDE_MODEL_ALIASES` | built-in Claude aliases | Comma-separated Desktop-to-upstream aliases, for example `claude-sonnet-4-6=claude-sonnet-4.6` |
|
|
76
76
|
| `CCDX_USAGE_PATH` | `~/.local/share/codex-copilot-dx/usage.jsonl` | Local JSONL token usage log |
|
|
77
77
|
| `CCDX_DISABLE_USAGE` | unset | Set to `1` to disable usage logging |
|
package/bin/cli.mjs
CHANGED
|
@@ -32,7 +32,7 @@ if (command === "usage") {
|
|
|
32
32
|
|
|
33
33
|
console.log(`
|
|
34
34
|
codex-copilot-dx v${LOCAL_VERSION}
|
|
35
|
-
Use Codex Desktop, Claude Code, and Claude
|
|
35
|
+
Use Codex Desktop, Claude Code, and Claude App with GitHub Copilot
|
|
36
36
|
`);
|
|
37
37
|
|
|
38
38
|
checkForUpdate({ currentVersion: LOCAL_VERSION }).then(({ latestVersion, updateAvailable }) => {
|
|
@@ -68,8 +68,10 @@ try {
|
|
|
68
68
|
host: ADAPTER_HOST,
|
|
69
69
|
gatewayApiKey: claudeDesktopApiKey,
|
|
70
70
|
});
|
|
71
|
-
console.log(status("ok", `Configured Claude
|
|
71
|
+
console.log(status("ok", `Configured Claude App gateway profile at ${result.baseUrl}`));
|
|
72
72
|
console.log(formatClaudeDesktopApplyResult(result));
|
|
73
|
+
} else {
|
|
74
|
+
console.log(status("ok", "Claude App support available with --configure-claude-desktop"));
|
|
73
75
|
}
|
|
74
76
|
|
|
75
77
|
// Launch Codex when available.
|
|
@@ -77,8 +79,8 @@ try {
|
|
|
77
79
|
|
|
78
80
|
console.log(`
|
|
79
81
|
${status("ok", CONFIGURE_CLAUDE_DESKTOP
|
|
80
|
-
? "Ready. Codex, Claude Code, and Claude
|
|
81
|
-
: "Ready. Codex and Claude Code are using your GitHub Copilot subscription.")}
|
|
82
|
+
? "Ready. Codex, Claude Code, and Claude App are using your GitHub Copilot subscription."
|
|
83
|
+
: "Ready. Codex and Claude Code are using your GitHub Copilot subscription. Claude App support is available with --configure-claude-desktop.")}
|
|
82
84
|
|
|
83
85
|
Adapter: http://${ADAPTER_HOST}:${ADAPTER_PORT}
|
|
84
86
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codex-copilot-dx",
|
|
3
|
-
"version": "0.4.
|
|
4
|
-
"description": "Use Codex Desktop, Claude Code, and Claude
|
|
3
|
+
"version": "0.4.9",
|
|
4
|
+
"description": "Use Codex Desktop, Claude Code, and Claude App with GitHub Copilot",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"codex-copilot-dx": "bin/cli.mjs"
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
"copilot",
|
|
17
17
|
"github",
|
|
18
18
|
"claude",
|
|
19
|
+
"claude-app",
|
|
19
20
|
"claude-code",
|
|
20
21
|
"claude-desktop",
|
|
21
22
|
"anthropic",
|
|
@@ -54,16 +54,16 @@ export function validateClaudeDesktopBaseUrl(raw) {
|
|
|
54
54
|
try {
|
|
55
55
|
parsed = new URL(raw);
|
|
56
56
|
} catch {
|
|
57
|
-
throw new Error(`Claude
|
|
57
|
+
throw new Error(`Claude App gateway base URL is not valid: ${raw}`);
|
|
58
58
|
}
|
|
59
59
|
if (parsed.protocol !== "http:" && parsed.protocol !== "https:") {
|
|
60
|
-
throw new Error("Claude
|
|
60
|
+
throw new Error("Claude App gateway base URL must use http or https");
|
|
61
61
|
}
|
|
62
62
|
if (parsed.protocol === "http:" && !isLoopbackHost(parsed.hostname)) {
|
|
63
|
-
throw new Error("Claude
|
|
63
|
+
throw new Error("Claude App allows http only for loopback; use https for LAN or remote gateways");
|
|
64
64
|
}
|
|
65
65
|
if (parsed.pathname !== "/" || parsed.search || parsed.hash) {
|
|
66
|
-
throw new Error("Claude
|
|
66
|
+
throw new Error("Claude App gateway base URL must be the root URL without /v1, query, or hash");
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
|
|
@@ -84,7 +84,7 @@ export function computeClaudeDesktopProfile(sourceProfile = {}, {
|
|
|
84
84
|
} = {}) {
|
|
85
85
|
validateClaudeDesktopBaseUrl(baseUrl);
|
|
86
86
|
if (!String(gatewayApiKey || "").trim()) {
|
|
87
|
-
throw new Error("Claude
|
|
87
|
+
throw new Error("Claude App gateway API key is required");
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
const profile = {};
|
|
@@ -207,7 +207,7 @@ export function applyClaudeDesktopConfig({
|
|
|
207
207
|
|
|
208
208
|
export function formatClaudeDesktopApplyResult(result) {
|
|
209
209
|
return [
|
|
210
|
-
"Claude
|
|
210
|
+
"Claude App local gateway profile",
|
|
211
211
|
`profile id: ${result.profileId}`,
|
|
212
212
|
`profile path: ${result.profilePath}`,
|
|
213
213
|
`base url: ${result.baseUrl}`,
|
|
@@ -222,7 +222,7 @@ export function ensureClaudeDesktopConfig(port = 2026, host = "127.0.0.1") {
|
|
|
222
222
|
host,
|
|
223
223
|
gatewayApiKey: process.env.CCDX_CLAUDE_DESKTOP_API_KEY || process.env.CCDX_PROXY_API_KEY || generatedClaudeDesktopApiKey(),
|
|
224
224
|
});
|
|
225
|
-
console.log(status("ok", `Configured Claude
|
|
225
|
+
console.log(status("ok", `Configured Claude App gateway profile at ${result.baseUrl}`));
|
|
226
226
|
console.log(formatClaudeDesktopApplyResult(result));
|
|
227
227
|
return result;
|
|
228
228
|
}
|