Popularity
5.6
Stable
Activity
8.0
Growing
329
11
35

Programming language: Scala
Tags: Parsing    
Latest version: v1.0.0

decline alternatives and similar packages

Based on the "Parsing" category

Do you think we are missing an alternative of decline or a related project?

Add another 'Parsing' Package

README

decline

Build Status

A composable command-line parser, inspired by optparse-applicative and built on cats.

import cats.implicits._
import com.monovore.decline._

object HelloWorld extends CommandApp(
  name = "hello-world",
  header = "Says hello!",
  main = {
    val userOpt =
      Opts.option[String]("target", help = "Person to greet.")
        .withDefault("world")

    val quietOpt = Opts.flag("quiet", help = "Whether to be quiet.").orFalse

    (userOpt, quietOpt).mapN { (user, quiet) => 

      if (quiet) println("...")
      else println(s"Hello $user!")
    }
  }
)

To get started, please visit monovore.com/decline!

About the Project

decline is a Typelevel Incubator project, and follows the Scala Code of Conduct.

This project is released under the Apache License 2.0.


*Note that all licence references and agreements mentioned in the decline README section above are relevant to that project's source code only.