bkirwi/decline
A composable command-line parser for Scala.
{ "createdAt": "2016-10-23T00:30:19Z", "defaultBranch": "main", "description": "A composable command-line parser for Scala.", "fullName": "bkirwi/decline", "homepage": "http://monovore.com/decline/", "language": "Scala", "name": "decline", "pushedAt": "2025-11-09T22:52:36Z", "stargazersCount": 668, "topics": [], "updatedAt": "2025-11-14T13:59:45Z", "url": "https://github.com/bkirwi/decline"}decline
Section titled “decline”A composable command-line parser, inspired by [optparse-applicative][optparse]
and built on [cats][cats].
import cats.syntax.all._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
Section titled “About the Project”decline is a Typelevel project,
and follows the Typelevel Scala Code of Conduct.
This project is released under the Apache License 2.0.
[optparse] !: https://github.com/pcapriotti/optparse-applicative [cats] !: https://github.com/typelevel/cats [decline] !: http://ben.kirw.in/decline/