Download packages/cli/src/index.ts from SaylorTwift/opencode: direct link, hf CLI and curl.
- Browser
- Download file 1.17 kB
-
https://huggingface.co/SaylorTwift/opencode/resolve/main/packages/cli/src/index.ts
- Command line
-
hf download hf://SaylorTwift/opencode/packages/cli/src/index.ts
-
curl -L -o index.ts https://huggingface.co/SaylorTwift/opencode/resolve/main/packages/cli/src/index.ts
1.17 kB
| import * as NodeRuntime from "@effect/platform-node/NodeRuntime" | |
| import * as NodeServices from "@effect/platform-node/NodeServices" | |
| import * as Effect from "effect/Effect" | |
| import { Commands } from "./commands/commands" | |
| import { Runtime } from "./framework/runtime" | |
| import { Daemon } from "./services/daemon" | |
| const Handlers = Runtime.handlers(Commands, { | |
| $: () => import("./commands/handlers/default"), | |
| api: () => import("./commands/handlers/api"), | |
| debug: { | |
| agents: () => import("./commands/handlers/debug/agents"), | |
| }, | |
| migrate: () => import("./commands/handlers/migrate"), | |
| service: { | |
| start: () => import("./commands/handlers/service/start"), | |
| restart: () => import("./commands/handlers/service/restart"), | |
| status: () => import("./commands/handlers/service/status"), | |
| stop: () => import("./commands/handlers/service/stop"), | |
| password: () => import("./commands/handlers/service/password"), | |
| }, | |
| serve: () => import("./commands/handlers/serve"), | |
| }) | |
| Runtime.run(Commands, Handlers, { version: "local" }).pipe( | |
| Effect.provide(Daemon.layer), | |
| Effect.provide(NodeServices.layer), | |
| Effect.scoped, | |
| NodeRuntime.runMain, | |
| ) | |