mirror of
https://github.com/anomalyco/opencode.git
synced 2026-07-17 12:56:41 +02:00
7f571d36ea
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
19 lines
748 B
TypeScript
Executable File
19 lines
748 B
TypeScript
Executable File
#!/usr/bin/env bun
|
|
|
|
import * as NodeRuntime from "@effect/platform-node/NodeRuntime"
|
|
import * as NodeServices from "@effect/platform-node/NodeServices"
|
|
import * as Effect from "effect/Effect"
|
|
import * as Layer from "effect/Layer"
|
|
import * as Command from "effect/unstable/cli/Command"
|
|
import { DebugCommand } from "./debug"
|
|
import { LocationServiceMap } from "@opencode-ai/core/location-layer"
|
|
|
|
const cli = Command.make("opencode", {}, () => Effect.void).pipe(
|
|
Command.withDescription("OpenCode command line interface"),
|
|
Command.withSubcommands([DebugCommand]),
|
|
)
|
|
|
|
const layer = Layer.mergeAll(LocationServiceMap.layer, NodeServices.layer)
|
|
|
|
Command.run(cli, { version: "local" }).pipe(Effect.provide(layer), Effect.scoped, NodeRuntime.runMain)
|