It looks like you're encountering a couple of issues with your setup. Let's address them one by one:

Hi, just getting started with effect (had some experience with ZIO 1.0 few year back)
i created the project using cli template and disappointingly having difficulties already 😦

started with updating Cli.ts by following this example https://github.com/effect-ts/effect/tree/main/packages/cli#basic-usage

I have now

import { Args } from "@effect/cli"
import * as Command from "@effect/cli/Command"
import { Console } from "effect/Console"

// Define a text argument
const text = Args.text({ name: "text" })

// Create a command that logs the provided text argument to the console
const command = Command.make("echo", { text }, ({ text }) => Console.log(text))

export const run = Command.run(command, {
  name: "Echo CLI",
  version: "v0.0.1"
})


but running it doesn't output anything. Additionally VSCode reports an issue Property 'log' does not exist on type 'Tag<Console, Console>'.ts(2339)

effect-link-checker git:(main) pnpx tsx src/bin.ts test
effect-link-checker git:(main) pnpx tsx src/bin.ts
Missing argument <text>

effect-link-checker git:(main) pnpx tsx src/bin.ts --help
Echo CLI

Echo CLI v0.0.1

USAGE

$ echo <text>

ARGUMENTS

<text>

  A user-defined piece of text.


Any ideas what is happening?
Was this page helpful?