Skip to content

PerplexSystems/commandry

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

commandry

commandry is a command line parser for Standard ML.

val cli: string Cli.parser =
  Cli.app "hello" "1.0.0" "Says hello to someone"
    (fn name => name)
    |> Cli.positional {name = "name", help = "Someone's name"}
    |> Cli.cli

fun main () =
  Cli.exec (fn name => print ("Hello, " ^ name)) cli

Features

  • Declarative builder pattern: Construct command line by chaining functions together
  • Rich argument types: Supports flags, string/int options with defaults, and positional arguments (required, optional or variadic)
  • Nested subcommands: Create hierarchical command structures
  • Auto-generated help: Automatic --help and --version flags with formatted usage text

Installation

The library is a single file, copy src/cli.sml into your project.

Documentation

See the docs/ directory for detailed guides:

About

A command-line parser for Standard ML

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors