has-flag - Check if argv has a specific flag

  •        9

Correctly stops looking after an -- argument terminator.Returns a boolean whether the flag exists.

https://github.com/sindresorhus/has-flag

Tags
Implementation
License
Platform

   




Related Projects

minimist - parse argument options

  •    Javascript

This module is the guts of optimist's argument parser without all the fanciful decoration.Return an argument object argv populated with the array arguments from args.

args - Toolkit for building command line interfaces

  •    Javascript

This package makes creating command line interfaces a breeze. Register a new option for the binary in which it's being called.

Caporal.js - A full-featured framework for building command line applications (cli) with node.js

  •    Javascript

A full-featured framework for building command line applications (cli) with node.js, including help generation, colored output, verbosity control, custom logger, coercion and casting, typos suggestions, and auto-complete for bash/zsh/fish.Angled brackets (e.g. <item>) indicate required input. Square brackets (e.g. [env]) indicate optional input.

node-optimist - Light-weight option parsing for node.js

  •    Javascript

I don't want to maintain this module anymore since I just use minimist, the argument parsing engine, directly instead nowadays.See yargs for the modern, pirate-themed successor to optimist.

getopts - Node.js CLI arguments parser

  •    Javascript

Getopts is a Node.js CLI arguments parser. It's designed closely following the Utility Syntax Guidelines so that your programs behave like typical UNIX utilities effortlessly and without sacrificing developer experience. Use getopts to parse the command-line arguments passed to your program.


argh - Argh! A minimalist argument handler.

  •    C++

If you're writing a highly-sophisticated command line tool, then Boost.Program_options and its kind might give you many advanced options. However, if you need to get up and running quickly, effectively and with minimal fuss, give the single header-file argh a try.

flags - GoSquared's flag icon set

  •    Makefile

Here you'll find all the files available in our flag icon set and the tools we use to generate the downloadable file. If you want to build your own version of this flag set, with any additions or modifications, just edit the files in src/flags. Each flag has its own folder, and inside each folder there is one PNG file for each size of the flag. Also in each folder is a file called code, which contains the ISO-3166-2 country code for the flag.

commando - An Elegant CLI Library for PHP

  •    PHP

Commando is a PHP command line interface library that beautifies and simplifies writing PHP scripts intended for command line use. PHP's $argv magic variable and global $_SERVER['argv'] make me cringe, getopt isn't all that much better, and most other PHP CLI libraries are far too OOP bloated. Commando gets down to business without a ton of overhead, removes the common boilerplate stuff when it comes to handling CLI input, all while providing a clean and readable interface.

Gengetopt - Command Line Argument Parser in C

  •    C

Gengetopt is a tool to generate C code to parse the command line arguments argc and argv that are part of every C or C++ program. The generated code uses the C library function getopt_long to perform the actual command line parsing.

nash - Craft command-line masterpieces in Node.js

  •    Javascript

Run the cli app with the given arguments. Normally you'd pass in process.argv. The callback can be used to execute more code after everything has completed. Create a command with the given name(s). Supports a single name, and array of names, or multiple names separated by commas as arguments to the command method. Returns an instance of Command.

go-arg - Struct-based argument parsing in Go

  •    Go

Declare the command line arguments your program accepts by defining a struct. As the example above shows, the help tag can be used in conjunction with arg, or instead. When used together, they can appear in either order.

Args

  •    

A simple argument parser. Originally written by Robert C. Martin and ported to .NET by me. It is developed in C#.

clap - A full featured, fast Command Line Argument Parser for Rust

  •    Rust

It is a simple-to-use, efficient, and full-featured library for parsing command line arguments and subcommands when writing console/terminal applications. clap is used to parse and validate the string of command line arguments provided by a user at runtime. You provide the list of valid possibilities, and clap handles the rest. This means you focus on your applications functionality, and less on the parsing and validating of arguments.

Java Command Line App Framework

  •    

A Java framework for writing command line utilities by argument parsing, option setting, and pretty-printed help (all by reflection) -- similar to getopt. Fields are set by reflection from the command line and other arguments are sent to the appropriate

yargs - yargs the modern, pirate-themed successor to optimist.

  •    Javascript

Having problems? want to contribute? join our community slack.Yargs be a node.js library fer hearties tryin' ter parse optstrings.

C# Command-Line Option Parsing Library

  •    CSharp

C# (.NET) class library to assist with parsing command-line arguments. Design has been originally derived from the Perl Getopt libraries. Code is designed for flexibility and tight integration with features provided by the .NET platform.

sade - Smooth (CLI) Operator 🎶

  •    Javascript

Define your global/program-wide version, options, description, and/or examples first. Once you define a Command, you can't access the global-scope again. Define all commands & options in the order that you want them to appear. Sade will not mutate or sort your CLI for you. Global options print before local options.

picocli - a mighty tiny command line interface

  •    Java

Picocli is a one-file Java framework for parsing command line arguments and generating polished, easily tailored usage help messages. Java command line parser with both an annotations API and a programmatic API, featuring usage help with ANSI colors, autocomplete and nested subcommands. In a single file, so you can include it in source form. This lets users run picocli-based applications without requiring picocli as an external dependency.

audit - For auditing what collaborators, hooks, and deploy keys you have added on all your GitHub repositories

  •    Go

For checking what collaborators, hooks, deploy keys, and protected branches you have added on all your GitHub repositories. This also scans all an organization's repos you have permission to view. Because nobody has enough RAM in their brain to remember this stuff for 100+ repos. Check out genuinetools/pepper for setting all your GitHub repo's master branches to be protected. Pepper even has settings for organizations and a dry-run flag for the paranoid.