jodersky / scala-argparse   0.13.0

BSD 3-clause "New" or "Revised" License Website GitHub

Pragmatic command line parsing and configuration for Scala apps

Scala versions: 3.x 2.13
Scala Native versions: 0.4


project docs discord project chat latest version stability: firm

Pragmatic command line parsing for Scala applications.


  • Simple interface, inspired by the argparse package from python.

  • Bash completion.

    • Standalone bash completion for a super snappy user experience, even on the JVM.

    • Interactive bash completion for the most custom needs.

  • Works with Scala 2 and 3, Native and JVM


  • HTML: look at the website
  • source (markdown): browse the docs/ folder.


This project uses Mill to build. The configuration is in the file.


  • compile main project for all supported versions of scala: ./mill argparse.__.compile
  • run all tests: ./mill __.test
  • run an example:
    • ./mill examples.<name of example> <arguments>
    • e.g. ./mill examples.paramnamed --verbosity 5
    • note: examples use Scala Native and hence require llvm
  • publish main project locally: ./mill argparse.__.publishLocal


Look at the scripts in the ci/ directory.