# FLAP v2.5.1 released

**URL:** <https://fortran-lang.discourse.group/t/flap-v2-5-1-released/11148>\
**Category:** Announcements\
**Created:** [October 2, 2026, 4:27pm UTC](https://fortran-lang.discourse.group/t/flap-v2-5-1-released/11148 "2026-10-02T16:27:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![szaghi](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/szaghi/32/6974_2.png) [@szaghi](https://fortran-lang.discourse.group/u/szaghi)\
**Post date:** [October 2, 2026, 4:27pm UTC](https://fortran-lang.discourse.group/t/flap-v2-5-1-released/11148/1 "2026-10-02T16:27:06Z")

</div>

### FLAP v2.5.1 is out.

> Fortran command Line Arguments Parser

- GitHub: [GitHub - szaghi/FLAP: Fortran command Line Arguments Parser for poor people · GitHub](https://github.com/szaghi/FLAP)
- Documentation: [FLAP Documentation](https://szaghi.github.io/FLAP/)

FLAP (Fortran command Line Arguments Parser) is a pure Fortran 2018 library for building command line interfaces. You describe your command line once, with a handful of calls; FLAP parses it, reads the environment and the configuration files, checks every value, and writes the help, the errors, the man page and the shell completions.

What it covers:

- options, positionals, flags and `--x/--no-x` pairs, counters, repeatable options, lists and `KEY=VALUE` maps
- typed values: one `get` for every integer and real kind, logicals and strings
- validation: required options, choices, numeric ranges, path checks, mutually exclusive sets
- git-style commands, with aliases and shared options
- values from the command line, environment variables and INI files, with the source of each value reported
- generated help, man page, Markdown, and completion scripts for bash, zsh, fish and PowerShell
- errors with “did you mean” suggestions
- and much more…

A minimal program:

```fortran
program greet
use flap
implicit none
type(command_line_interface) :: cli
character(32) :: name
integer :: times, i, error

call cli%init(progname='greet', description='Greet someone')
call cli%add(positional=.true., position=1, help='Who to greet', required=.true., metavar='NAME')
call cli%add(switch='--times', switch_ab='-t', help='How many times', def='1', min='1', max='5')
call cli%parse(error=error)
if (error /= 0) stop 1
call cli%get(position=1, val=name, error=error)
call cli%get(switch='--times', val=times, error=error)
do i = 1, times
  print '(A)', 'Hello '//trim(name)
enddo
endprogram greet

```

FLAP builds with FoBiS, fpm, CMake or Make, is tested with GNU gfortran, NVIDIA nvfortran and Intel ifx, and is multi-licensed (GPL v3, BSD 2-Clause, BSD 3-Clause, MIT).

Feedback, issues, and contributions are welcome.

Stefano

---

<div class="post-metadata">

**Author:** ![Capinol](https://avatars.discourse-cdn.com/v4/letter/c/ce7236/32.png) [@Capinol](https://fortran-lang.discourse.group/u/Capinol)\
**Post date:** [October 2, 2026, 7:29pm UTC](https://fortran-lang.discourse.group/t/flap-v2-5-1-released/11148/2 "2026-10-02T19:29:55Z")

</div>

Very interesting, definitely will take a look into this!

Pretty sure this is the first fortran lib that does this (afaik), might use it for my next project.
