@ende/cli
ende add jsr:@ende/cliVersion 2026.10.15 on JSR.
Tools for creating interactive command line tools.
import { parseArgs } from "@ende/cli/parse-args";
import { assertEquals } from "@ende/assert";
// Same as running `ende run example.ts --foo --bar=baz ./quux.txt`
const args = parseArgs(["--foo", "--bar=baz", "./quux.txt"]);
assertEquals(args, { foo: true, bar: "baz", _: ["./quux.txt"] });
Modules
@ende/cli/parse-args— Command line arguments parser based on minimist.@ende/cli/prompt-secret@ende/cli/unicode-width@ende/cli/unstable-ansi— Ansi is a module that offers export function s and variables that returns various Ansi Escape Sequences. This class is not an exhaustive list of what is possible with Ansi Escape Sequences, nor does it guarantee that every code will work in every terminal. The only way to guarantee that only one code will work in a particular terminal, is to check for yourself. Calling these export function s and variables does not automatically change the terminal settings. Only once they are passed to stdout or stderr will they take effect.@ende/cli/unstable-get-cursor@ende/cli/unstable-progress-bar@ende/cli/unstable-progress-bar-stream@ende/cli/unstable-prompt-multiple-select@ende/cli/unstable-prompt-select@ende/cli/unstable-spinner@ende/cli/unstable-static-line
Exports
Args— The value returned from parseArgs.parseArgs— Take a set of command line arguments, optionally with a set of options, and return an object representing the flags found in the passed arguments.ParseOptions— Options for parseArgs.promptSecret— Shows the given message and waits for the user's input. Returns the user's input as string. This is similar to `prompt()` but it print user's input as `*` to prevent password from being shown. Use an empty `mask` if you don't want to show any character.PromptSecretOptions— Options for promptSecret.unicodeWidth— Calculate the physical width of a string in a TTY-like environment. This is useful for cases such as calculating where a line-wrap will occur and underlining strings.