Skip to content
Scala type safe command line options parser built using
Scala
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
.gitignore
README.md
build.sbt
optparse.scala

README.md

Scala type safe command line options parser built using shapeless

Usage

import optparse.OptParse._

def main(args: Array[String]){
    val debug :: host :: port :: HNil = parse(
        flag("-d", "--debug") ::
        opt("-h", "--host", "localhost") ::
        opt("-p", "--port", 80) ::
        HNil
    )(args)

    // debug: Boolean
    // host: String
    // port: Int
}
Something went wrong with that request. Please try again.