ReadArgs alternatives and similar packages
Based on the "Command Line" category.
Alternatively, view ReadArgs alternatives based on common mentions on social networks and blogs.
unused9.9 1.0 ReadArgs VS unusedA command line tool to identify unused code.
herms9.6 0.0 ReadArgs VS herms:stew::fork_and_knife: A command-line manager for delicious kitchen recipes
shellmet8.5 0.0 ReadArgs VS shellmet🐚 Out of the shell solution for scripting in Haskell
cli-extras7.9 0.0 ReadArgs VS cli-extrasMiscellaneous utilities for building and working with command line interfaces
cli7.4 0.0 ReadArgs VS cliCommand Line Interface Utility (Printing, Formatting, Options parsing) for Haskell
harg6.9 0.0 ReadArgs VS hargHaskell program configuration using higher kinded data
sexpr-parser5.2 0.0 ReadArgs VS sexpr-parserS-expression parser in Haskell
otp-authenticator5.0 0.0 ReadArgs VS otp-authenticatorOTP Authenticator (ala Google Authenticator) cli app
rob3.4 0.0 ReadArgs VS robPersonal projects generator written in haskell
ploton2.8 0.0 ReadArgs VS plotonA useful cli tool to draw figures
gli2.5 0.0 ReadArgs VS glitiny git"lab/hub" cli wrapper
translate-cli2.1 0.0 ReadArgs VS translate-cliCommand Line Interface to translate words
file-templates1.8 0.0 ReadArgs VS file-templatesUse templates for files and directories
req-oauth21.8 2.3 ReadArgs VS req-oauth2OAuth2 package for use with Req
platinum-parsing1.5 0.0 ReadArgs VS platinum-parsingAll-around tools for compilation development
optima-for-hasql1.5 0.0 ReadArgs VS optima-for-hasqlOptima CLI arguments parsers for Hasql
oset1.3 0.0 ReadArgs VS osetAn insertion-order-preserving set
gen-passwd1.2 0.0 ReadArgs VS gen-passwdGenerate a wordlist-based password easily
optparse-applicative-simpleSimple command line interface arguments parser
morpheus-graphql-cliMorpheus GraphQL CLI
hnormaliseLog message normalisation tool producing structured JSON messages
Access the most powerful time series database as a service
Do you think we are missing an alternative of ReadArgs or a related project?
ReadArgs provides the readArgs IO action, which lets you tell the compiler to parse the command line arguments to fit the type signature you give.
(a :: Int, b :: String, c :: Float) <- readArgs would
parse the first runtime argument as an Int, the second as a String (no
quotes required) and the third as a float.
If the runtime arguments are incompatible with the type signature, then a simple usage statement is given of the types needed.
Continuing the previous example, if it was used in a program named Example, the error message for the above action would be:
usage: Example Int String Float
Any type that has both Typeable and Read instances can be used. Char, String, and Text are handled specially so that command line arguments for both do not require quotes (as their Read instances do). A special instance is provided for FilePath so that no constructor or quotes are required.
readArgs also supports optional arguments and variadic arguments.
Optional arguments are specified using Maybe, and variadic arguments
using a list.
(a :: Int, b :: Maybe String, c :: [Float]) <- readArgs
would successfully parse any of the following sets of command line arguments:
Example 1 Example 1 2 3 4 Example 1 foo Example 1 foo 2 3 4
Example Example foo Example 1.0
Usage statements for optional and variadic arguments use command-line parlance:
usage: Example Int [String] [Float..]
Note that both optional and variadic parsers are greedy by default
Example 1 2 3 4 was parsed as
(1, "2", [3.0,4.0]). They
may both be made non-greedy through use of the NonGreedy constructor:
( a :: Int , NonGreedy b :: NonGreedy Maybe String , NonGreedy c :: NonGreedy  Float ) <- readArgs