Skip to main content
Home

A small cli framework for Deno/Node.

This package works with Node.js, DenoIt is unknown whether this package works with Cloudflare Workers, Bun, Browsers
It is unknown whether this package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
It is unknown whether this package works with Bun
It is unknown whether this package works with Browsers
JSR Score
82%
Published
11 months ago (0.0.15)
type alias Flag

The Flag interface represents a command-line argument or option that can be used in various applications. This interface includes properties that define the behavior, identity, and requirements of the flag.

Properties

type:
"string"
| "boolean"
| "number"

Represents a variable that can hold values of type string, boolean, or number.

The type can be one of the following:

  • "string": for textual data.
  • "boolean": for true/false values.
  • "number": for numeric values.

This variable type can be useful for scenarios where the value can be one of the multiple data types.

The name of the flag - this is the name that is used to access the value associated with the flag.

The usage of the flag - used in the auto-generated help.

A single character name for the flag.

Sets whether a particular flag is mandatory. When set to true, the framework will error usages of the command that don't specify the flag.

When set, the flag will be available to any sub-commands.

default:
null
| unknown
| unknown[]

Default value for the flag

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@aricart/cobra

Import symbol

import { type Flag } from "@aricart/cobra";
or

Import directly with a jsr specifier

import { type Flag } from "jsr:@aricart/cobra";

Add Package

pnpm i jsr:@aricart/cobra
or (using pnpm 10.8 or older)
pnpm dlx jsr add @aricart/cobra

Import symbol

import { type Flag } from "@aricart/cobra";

Add Package

yarn add jsr:@aricart/cobra
or (using Yarn 4.8 or older)
yarn dlx jsr add @aricart/cobra

Import symbol

import { type Flag } from "@aricart/cobra";

Add Package

vlt install jsr:@aricart/cobra

Import symbol

import { type Flag } from "@aricart/cobra";

Add Package

npx jsr add @aricart/cobra

Import symbol

import { type Flag } from "@aricart/cobra";

Add Package

bunx jsr add @aricart/cobra

Import symbol

import { type Flag } from "@aricart/cobra";