Skip to content

Claude Code opened to any LLM — OpenAI, Gemini, DeepSeek, Ollama, and 200+ models via OpenAI-compatible API shim

TypeScript

Fix Windows ESM import by using file URL

SenaxZz2ee43e010b70
diff --git a/bin/openclaude b/bin/openclaude
index a568852..2ecc153 100755
--- a/bin/openclaude
+++ b/bin/openclaude
@@ -9,14 +9,13 @@
import { existsSync } from 'fs'
import { join, dirname } from 'path'
-import { fileURLToPath } from 'url'
-import { getDistImportSpecifier } from './import-specifier.mjs'
+import { fileURLToPath, pathToFileURL } from 'url'
const __dirname = dirname(fileURLToPath(import.meta.url))
const distPath = join(__dirname, '..', 'dist', 'cli.mjs')
if (existsSync(distPath)) {
- await import(getDistImportSpecifier(__dirname))
+ await import(pathToFileURL(distPath).href)
} else {
console.error(`
openclaude: dist/cli.mjs not found.