# optparse-applicative

> Applicative command-line option parser for Haskell

Source: https://talira.ai/catalog/optparse-applicative-ycq9bhnd
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [libraries / cli frameworks](https://talira.ai/categories/libraries/cli-frameworks), [languages / haskell](https://talira.ai/categories/languages/haskell)
- Licence: BSD-3-Clause[^1]
- Pricing: Free and open source[^1]
- Free tier: yes[^1]
- Backed by: [Huw Campbell](https://talira.ai/orgs/huw-campbell.md)

optparse-applicative is a Haskell library for parsing command-line options through an applicative interface: you compose small parsers for options, flags, arguments and subcommands into one. It reads and validates the arguments, reports errors, and generates the usage line, a full help screen and context-sensitive completions for bash, zsh and fish.

## Links

- GitHub: https://github.com/pcapriotti/optparse-applicative

## Problems it solves

- parse command-line flags and subcommands in a Haskell program
- get a generated --help screen for my Haskell CLI
- add shell completions to a Haskell command-line tool

## Features

- applicative parsers for options, flags, arguments and subcommands
- argument validation and error reporting
- generated usage line and help screen
- bash, zsh and fish completions

## Trust

Overall: 0.42 out of 1.
Signals: maintenance 0.46, adoption 0.60, momentum 0.24, community 0.73, backing 0.30, extensibility 0.00.

- last commit 3 months ago
- 1 commits in the last 90 days
- latest release 0.19.0 18 months ago
- 957 GitHub stars
- 65 contributors
- backed by Huw Campbell

## Alternatives

- [optparse-generic](https://talira.ai/catalog/optparse-generic-3w7tgz93.md): Auto-generate a Haskell command-line parser from your data type

## Sources

[^1]: https://github.com/pcapriotti/optparse-applicative/blob/master/LICENSE (checked 27 Nov 2026)
