-
-
Notifications
You must be signed in to change notification settings - Fork 58
Home
1obo edited this page Jul 19, 2021
·
16 revisions
Scallop is a simple (yet powerful) command-line arguments parsing library for Scala.
The library is cross-built for Scala 3, 2.13, 2.12, 2.11, 2.10, supports Scala Native and ScalaJS.
Scallop supports:
- flag, single-value and multiple value options
- POSIX-style short option names (-a) with grouping (-abc)
- GNU-style long option names (--opt, --opt=value)
- unnamed integer options, like GNU tail (-42)
- Property arguments (-Dkey=value, -D key1=value key2=value)
- Non-string types of options and properties values (with extendable converters)
- Mutually exclusive and codependent option relationships
- Powerful matching on trailing args
- Subcommands
- Basic usage
- Option types and definitions
- Help information printing
- Using ScallopOption
- Arguments validation
- Exception handling
- Subcommands
- Custom converters
- Native and JS
- Migration notes
- Notes
- Development
For more examples, you can look at Scallop's test suite or consult the API docs.
Also, I wrote a blog post and another one about Scallop.