frugalmechanic / scala-optparse   1.2.1

Apache License 2.0 GitHub

Command line option parsing for scala

Scala versions: 3.x 2.13 2.12 2.11 2.10

Scala OptParse

Build Status scala-optparse Scala version support

Scala OptParse is a simple command line parsing library for Scala.

This was one of the first Scala libraries that I wrote (as you can probably tell by looking at the code). It is still in production use today (as of Jan 2022) although no longer at Frugal Mechanic (which no longer exists).

Supported Scala Versions

  • 2.10
  • 2.11
  • 2.12
  • 2.13
  • 3.x

SBT Dependency

libraryDependencies += "com.frugalmechanic" %% "scala-optparse" % "1.2.0"

Example Usage

import com.frugalmechanic.optparse._

object HelloWorldApp extends OptParse {
  val name = StrOpt()

  def main(args:Array[String]) {
    println("Hello "+name.getOrElse("world"))


Tim Underwood (GitHub, LinkedIn, Twitter)


Copyright Frugal Mechanic


Apache License, Version 2.0