Recommended CLI parsing libraries

This page summarizes the projects mentioned and recommended in the original post on /r/scala

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • case-app

    Type-level & seamless command-line argument parsing for Scala

    I'm a big fan of case-app: https://github.com/alexarchambault/case-app

  • Scallop

    a simple Scala CLI parsing library

    Scallop is great -- it allows you to wrap entire functions and routines inside calls which pass arguments (like --name) and use them.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

  • picocli

    Picocli is a modern framework for building powerful, user-friendly, GraalVM-enabled command line apps with ease. It supports colors, autocompletion, subcommands, and more. In 1 source file so apps can include as source & avoid adding a dependency. Written in Java, usable from Groovy, Kotlin, Scala, etc.

    I realized the functional police may jump all over me for suggesting this, but you might want to use https://picocli.info to parse the CLI arts. It's my go-to library. It's development is far more active than any of the scala CLI libraries. And it's well battle tested.

  • zio-cli

    Rapidly build powerful command-line applications powered by ZIO

    I know this is at very early stage, no docs, not recommended for prod use but you may want to add zio-cli into your watch list.

  • decline

    A composable command-line parser for Scala.

    That issue is not about sum types, it's about products of subcommand decoders. E.g. you might want to support a syntax like this:

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts