Question about `@effect/cli` and its usage with required and optional arguments

Hey. I'm in the midst of exploring the effect ecosystem and have a question regarding
@effect/cli
.
const mainCommand = pipe(
  Command.make("git-create-jira-branch", {
    options: Options.all({
      baseBranch: Options.withDescription(
        Options.optional(Options.alias(Options.text("baseBranch"), "b")),
        "Base branch to create the new branch from"
      ),
      version: Options.withDescription(
        Options.alias(Options.boolean("version"), "v"),
        "Show version information"
      ),
      help: Options.withDescription(
        Options.alias(Options.boolean("help"), "h"),
        "Show this help text"
      ),
    }),
    args: Args.addDescription(
      Args.atMost(Args.text({ name: "jira-key" }), 1),
      "The Jira ticket key to create a branch for (e.g. FOOX-1234)"
    ),
  }),
  Command.map((args) => {
    return GitCreateJiraBranch({
      version: args.options.version,
      baseBranch: args.options.baseBranch,
      jiraKey: get(args.args, 0),
    });
  })
);


I would like the jira-key argument to be required, but only if none of the options help or version where provided. At the moment I make sure of this myself when running the command. Is there a way to do this directly with
@effect/cli
?
Was this page helpful?