Files
orcs-code/bin/openclaude
2026-04-01 12:43:14 +05:30

34 lines
759 B
JavaScript
Executable File

#!/usr/bin/env node
/**
* OpenClaude — Claude Code with any LLM
*
* If dist/cli.mjs exists (built), run that.
* Otherwise, tell the user to build first or use `bun run dev`.
*/
import { existsSync } from 'fs'
import { join, dirname } from 'path'
import { fileURLToPath } from 'url'
import { getDistImportSpecifier } from './import-specifier.mjs'
const __dirname = dirname(fileURLToPath(import.meta.url))
const distPath = join(__dirname, '..', 'dist', 'cli.mjs')
if (existsSync(distPath)) {
await import(getDistImportSpecifier(__dirname))
} else {
console.error(`
openclaude: dist/cli.mjs not found.
Build first:
bun run build
Or run directly with Bun:
bun run dev
See README.md for setup instructions.
`)
process.exit(1)
}