Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/tpunder/scala-optparse

Command line option parsing for scala
https://github.com/tpunder/scala-optparse

scala

Last synced: 1 day ago
JSON representation

Command line option parsing for scala

Awesome Lists containing this project

README

        

Scala OptParse
==============

[![Build Status](https://github.com/frugalmechanic/scala-optparse/actions/workflows/build.yml/badge.svg)](https://github.com/frugalmechanic/scala-optparse/actions/workflows/build.yml) [![scala-optparse Scala version support](https://index.scala-lang.org/frugalmechanic/scala-optparse/scala-optparse/latest-by-scala-version.svg)](https://index.scala-lang.org/frugalmechanic/scala-optparse/scala-optparse)

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
-------------

```scala
import com.frugalmechanic.optparse._

object HelloWorldApp extends OptParse {
val name = StrOpt()

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

Authors
-------

Tim Underwood (GitHub, LinkedIn, Twitter)

Copyright
---------

Copyright [Frugal Mechanic](http://frugalmechanic.com)

License
-------

[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt)