{"id":16143475,"url":"https://github.com/lhns/scala-commandline","last_synced_at":"2026-02-17T13:31:56.089Z","repository":{"id":39802156,"uuid":"257920906","full_name":"lhns/scala-commandline","owner":"lhns","description":"Scala command line parser","archived":false,"fork":false,"pushed_at":"2026-01-06T00:32:02.000Z","size":166,"stargazers_count":1,"open_issues_count":13,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-14T03:51:27.077Z","etag":null,"topics":["cli","commandline","parser","scala"],"latest_commit_sha":null,"homepage":"","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lhns.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-04-22T14:11:17.000Z","updated_at":"2022-01-08T20:09:11.000Z","dependencies_parsed_at":"2024-05-02T02:30:56.749Z","dependency_job_id":"d79487c6-308a-4aef-8463-ce967799e008","html_url":"https://github.com/lhns/scala-commandline","commit_stats":null,"previous_names":["lolhens/scala-commandline"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/lhns/scala-commandline","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lhns%2Fscala-commandline","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lhns%2Fscala-commandline/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lhns%2Fscala-commandline/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lhns%2Fscala-commandline/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lhns","download_url":"https://codeload.github.com/lhns/scala-commandline/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lhns%2Fscala-commandline/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29545580,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-17T13:00:00.370Z","status":"ssl_error","status_checked_at":"2026-02-17T12:57:14.072Z","response_time":100,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","commandline","parser","scala"],"created_at":"2024-10-10T00:09:21.049Z","updated_at":"2026-02-17T13:31:56.071Z","avatar_url":"https://github.com/lhns.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# scala-commandline\n\n[![build](https://github.com/lhns/scala-commandline/actions/workflows/build.yml/badge.svg)](https://github.com/lhns/scala-commandline/actions/workflows/build.yml)\n[![Maven Central](https://img.shields.io/maven-central/v/de.lhns/scala-commandline_2.13)](https://search.maven.org/artifact/de.lhns/scala-commandline_2.13)\n[![Apache License 2.0](https://img.shields.io/github/license/lhns/scala-commandline.svg?maxAge=3600)](https://www.apache.org/licenses/LICENSE-2.0)\n[![Scala Steward badge](https://img.shields.io/badge/Scala_Steward-helping-blue.svg?style=flat\u0026logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAQCAMAAAARSr4IAAAAVFBMVEUAAACHjojlOy5NWlrKzcYRKjGFjIbp293YycuLa3pYY2LSqql4f3pCUFTgSjNodYRmcXUsPD/NTTbjRS+2jomhgnzNc223cGvZS0HaSD0XLjbaSjElhIr+AAAAAXRSTlMAQObYZgAAAHlJREFUCNdNyosOwyAIhWHAQS1Vt7a77/3fcxxdmv0xwmckutAR1nkm4ggbyEcg/wWmlGLDAA3oL50xi6fk5ffZ3E2E3QfZDCcCN2YtbEWZt+Drc6u6rlqv7Uk0LdKqqr5rk2UCRXOk0vmQKGfc94nOJyQjouF9H/wCc9gECEYfONoAAAAASUVORK5CYII=)](https://scala-steward.org)\n\nA small state-monad-based command line parser library written in scala.\n\n### build.sbt\n\n```sbt\nlibraryDependencies += \"de.lhns\" %% \"scala-commandline\" % \"0.4.0\"\n```\n\n## Example\n```scala\ncase class Options(help: Boolean,\n                   version: Boolean,\n                   logLevel: Option[String],\n                   decode: Boolean,\n                   validate: Boolean,\n                   params: Seq[String])\n\ndef main(args: Array[String]): Unit = {\n  val options: Options = CommandLine(args) {\n    for {\n      default \u003c- CommandLine.defaultOpts()\n      /* shorthand for:\n      empty \u003c- CommandLine.isEmpty\n      help \u003c- CommandLine.opt(\"-h\", \"--help\").flag\n      version \u003c- CommandLine.opt(\"--version\").flag\n      */\n      logLevel \u003c- CommandLine.opt(\"--loglevel\").arg.map(_.lastOption)\n      decode \u003c- CommandLine.opt(\"-d\", \"--decode\").flag\n      validate \u003c- CommandLine.opt(\"--validate\").flag\n      _ \u003c- CommandLine.errorOnUnrecognizedOpts()\n      params \u003c- CommandLine.args\n    } yield Options(\n      help = default.empty || default.help,\n      version = default.version,\n      logLevel = logLevel,\n      decode = decode,\n      validate = validate,\n      params = params\n    )\n  }\n}\n```\n\n## License\nThis project uses the Apache 2.0 License. See the file called LICENSE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flhns%2Fscala-commandline","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flhns%2Fscala-commandline","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flhns%2Fscala-commandline/lists"}