Skip to main content
Module

x/cliffy/examples/command/global_options.ts

Command line framework for deno 🦕 Including Commandline-Interfaces, Prompts, CLI-Table, Arguments Parser and more...
Extremely Popular
Go to Latest
File
#!/usr/bin/env -S deno run
import { Command } from "../../command/command.ts";
await new Command() .option("-l, --local [val:string]", "Only available on this command.") .option( "-g, --global [val:string]", "Available on this and all nested child command's.", { global: true }, ) .action(console.log) .command( "command1", new Command() .description("Some sub command.") .action(console.log) .command( "command2", new Command() .description("Some nested sub command.") .action(console.log), ), ) .parse(Deno.args);