diff --git a/cli/bun.lockb b/cli/bun.lockb index 7400bf7a..ed9519c9 100755 Binary files a/cli/bun.lockb and b/cli/bun.lockb differ diff --git a/cli/main.ts b/cli/main.ts index ddfe439e..e7f20166 100644 --- a/cli/main.ts +++ b/cli/main.ts @@ -1,15 +1,12 @@ import { Command } from "@effect/cli" -import { NodeContext, NodeRuntime } from "@effect/platform-node" +import { BunContext } from "@effect/platform-bun" import { Console, Effect } from "effect" -// Define the top-level command -const command = Command.make("hello-world", {}, () => Console.log("Hello World")) +const command = Command.make("test", {}, () => Console.log("test")) -// Set up the CLI application const cli = Command.run(command, { - name: "Hello World CLI", - version: "v1.0.0" + name: "learn-anything.xyz CLI", + version: "v0.0.1" }) -// Prepare and run the CLI application -cli(process.argv).pipe(Effect.provide(NodeContext.layer), NodeRuntime.runMain) +Effect.runPromise(cli(process.argv).pipe(Effect.provide(BunContext.layer))) diff --git a/cli/package.json b/cli/package.json index 7e30be44..ae77166a 100644 --- a/cli/package.json +++ b/cli/package.json @@ -1,7 +1,11 @@ { "name": "cli", + "scripts": { + "dev": "bun --watch main.ts" + }, "dependencies": { "@effect/cli": "^0.44.5", + "@effect/platform-bun": "^0.45.5", "@effect/platform-node": "^0.60.5" } }