Projects / CmdOption


CmdOption is a simple annotation-driven command line parser toolkit for Java 5 applications. Everything you need is (at least one) simple configuration object. Each field and method annotated with an CmdOption annotation will be processed. Based on this config, CmdOption is able to parse any command line, guaranteeing the declared specification. The result is directly stored in the given config object. When errors occur, CmdOption gives a meaningful error message. Generated output and validation/error message can be localized.

Operating Systems

Last announcement

Repository migrated to GitHub 13 May 2014 06:55

We migrated out source code repository and issue tracker to GitHub. A overhaul of the project site and the download page will follow...

Recent releases

  •  27 Nov 2013 08:02

    Release Notes: This release fixes a visibility bug, makes the OptionHandle class public, adds JavaDoc, and improves debugging support.

    •  11 Aug 2013 18:36

      Release Notes: This release adds an IntegerHandler which supports Integer and int values for fields and methods. The line length for the usage formatter is now configurable via a constructor parameter of DefaultUsageFormatter. Debug output has improved.

      •  07 May 2013 19:41

        Release Notes: This release adds improved support for inherited configuration classes. CmdOption is now able to set all inherited annotated fields and methods, even if they are private. The handler for Boolean options has been improved and now better supports setter methods.

        •  25 Nov 2012 16:17

          Release Notes: This release adds localization support for output and configuration. It has enhanced configuration and validation capabilities so that options can require or conflict with other options when selected. It has an additional "AboutLine" to the usage formatter, adds a new URL parser, and makes some other internal improvements. The build system was migrated to SBuild, to build faster and also automatically merge translations and create releases.

          •  28 Jul 2012 11:10

            Release Notes: This is the first release under the de.tototec.cmdoption brand. The release date was 2012-03-07. CmdOption 0.1.0 brings a lot of new features, most notably commands support and better usage display. Besides the namespace change from de.tobiasroeser.cmdoption to de.tototec.cmdoption, the @CmdOption no longer has the longName and shortName attributes, but now supports any number of names with the names attribute.


            Project Spotlight


            A Fluent OpenStack client API for Java.


            Project Spotlight

            TurnKey TWiki Appliance

            A TWiki appliance that is easy to use and lightweight.