first ver

This commit is contained in:
Nikita
2024-09-22 13:56:58 +03:00
parent 21084cd3f3
commit dd04264bae
5 changed files with 25 additions and 3 deletions

BIN
cli/bun.lockb Executable file

Binary file not shown.

15
cli/main.ts Normal file
View File

@@ -0,0 +1,15 @@
import { Command } from "@effect/cli"
import { NodeContext, NodeRuntime } from "@effect/platform-node"
import { Console, Effect } from "effect"
// Define the top-level command
const command = Command.make("hello-world", {}, () => Console.log("Hello World"))
// Set up the CLI application
const cli = Command.run(command, {
name: "Hello World CLI",
version: "v1.0.0"
})
// Prepare and run the CLI application
cli(process.argv).pipe(Effect.provide(NodeContext.layer), NodeRuntime.runMain)

7
cli/package.json Normal file
View File

@@ -0,0 +1,7 @@
{
"name": "cli",
"dependencies": {
"@effect/cli": "^0.44.5",
"@effect/platform-node": "^0.60.5"
}
}

View File

@@ -2,4 +2,4 @@
> CLI for interfacing with LA
Will be modelled after [Encore's Go CLI](https://github.com/encoredev/encore/tree/main/cli/cmd/encore).
Built with [Effect CLI](https://github.com/effect-ts/effect/tree/main/packages/cli).