
Hi, Seeing that I've got a lot of useful feedback for the initial release, I am pleased to announce the availability of CLI 1.1.0. CLI is an open-source (MIT license), cross-platform command line interface compiler for C++. It allows you to specify the options that your program supports, their types, default values, and documentation. This specification can then be automatically translated to C++ classes that implement parsing of the command line arguments and provide a convenient and type-safe interface for accessing the extracted data. The automatic usage and documentation generation is by far the biggest new feature in this release. The usage information is formatted during compilation and the documentation can be generated in the HTML and man page formats. For an example of the HTML output, see the documentation for the CLI compiler itself (you may also want to check the cli.1 man page and the usage information printed by the compiler): http://www.codesynthesis.com/projects/cli/doc/cli.xhtml Other new features in this release: * Optional generation of modifiers in addition to accessors. * Support for erasing the parsed elements from the argv array. * Support for custom argument sources via an abstract scanner interface. * Support for reading command line arguments from the argv array as well as files specified with command line options. For a more detailed list of new features in this release see: http://www.codesynthesis.com/pipermail/cli-users/2009-December/000001.html More information, documentation, and source code distributions are available from the project's web page: http://www.codesynthesis.com/projects/cli/ Enjoy, Boris -- Boris Kolpackov, Code Synthesis http://codesynthesis.com/~boris/blog Open-source XML data binding for C++ http://codesynthesis.com/products/xsd XML data binding for embedded systems http://codesynthesis.com/products/xsde Command line interface to C++ compiler http://codesynthesis.com/projects/cli

Boris Kolpackov wrote:
Seeing that I've got a lot of useful feedback for the initial release, I am pleased to announce the availability of CLI 1.1.0.
CLI is an open-source (MIT license), cross-platform command line interface compiler for C++.
Hello Boris, look interesting, but I must admit that I was confused by the name. To me, a CLI is either the user interface or the interpreter, whereas I think you are covering something that has to do with command-line arguments or program options. Are you considering to pursue inclusion in Boost, or is this just an advertisement? Cheers, Rutger

Hi Rutger, Rutger ter Borg <rutger@terborg.net> writes:
look interesting, but I must admit that I was confused by the name. To me, a CLI is either the user interface or the interpreter, whereas I think you are covering something that has to do with command-line arguments or program options.
One of the expansions of the CLI acronym is Command-Line Interface[1]. [1] http://en.wikipedia.org/wiki/Command-line_interface
Are you considering to pursue inclusion in Boost
There is already a "solution" for this problem in Boost (program_options) though the implementations are very different ("library" vs "compiler" approach). So I am not sure if there is interest in an alternative. Boris -- Boris Kolpackov, Code Synthesis http://codesynthesis.com/~boris/blog Open-source XML data binding for C++ http://codesynthesis.com/products/xsd XML data binding for embedded systems http://codesynthesis.com/products/xsde Command line interface to C++ compiler http://codesynthesis.com/projects/cli

"Boris" == Boris Kolpackov <boris@codesynthesis.com> writes:
Boris> Hi Rutger, Rutger ter Borg <rutger@terborg.net> writes: >> look interesting, but I must admit that I was confused by the >> name. To me, a CLI is either the user interface or the >> interpreter, whereas I think you are covering something that has >> to do with command-line arguments or program options. Boris> One of the expansions of the CLI acronym is Command-Line Boris> Interface[1]. Boris> [1] http://en.wikipedia.org/wiki/Command-line_interface But if I understand your project, it is not a CLI, rather a compiler that takes a description of command line options/flags and _generates_ code that handle the command line interface, hence the confusion. >> Are you considering to pursue inclusion in Boost Boris> There is already a "solution" for this problem in Boost Boris> (program_options) though the implementations are very Boris> different ("library" vs "compiler" approach). So I am not Boris> sure if there is interest in an alternative. Probably not, although I can only speak for myself. The present boost library has the nice property of being C++. If one wanted to go the script route, there're dozens of alternatives. Which brings the question: why exactly this keep being advertised on the boost mailing lists? Most people here follows freshmeat and sourceforge announcements and I don't think we want to see here posts on every and each script out there that happens to generate C++ code. Best regards, Maurizio

Hi Maurizio, Maurizio Vitale <maurizio.vitale@polymath-solutions.com> writes:
But if I understand your project, it is not a CLI, rather a compiler that takes a description of command line options/flags and _generates_ code that handle the command line interface, hence the confusion.
The language that is used to describe the command line interface is called Command Line Interface definition language or CLI for short. The files in this language have the .cli extension and, following a certain tradition, the compiler name is also cli.
The present boost library has the nice property of being C++.
The CLI compiler itself is written in ANSI C++.
If one wanted to go the script route, there're dozens of alternatives.
Not sure what you mean by "script" here. The generated code is C++, the compiler is C++, the specification language is C++-like and declarative. However, I would appreciate if you can point me to the "script alternatives".
Which brings the question: why exactly this keep being advertised on the boost mailing lists? Most people here follows freshmeat and sourceforge announcements and I don't think we want to see here posts on every and each script out there that happens to generate C++ code.
The reason I announced the second release here is because I got interesting feedback from this list's members after the initial release and a number of new features and changes were the result of this feedback. So I wanted to let the people that responded know about it. Sorry if I offended you by my announcement. Boris -- Boris Kolpackov, Code Synthesis http://codesynthesis.com/~boris/blog Open-source XML data binding for C++ http://codesynthesis.com/products/xsd XML data binding for embedded systems http://codesynthesis.com/products/xsde Command line interface to C++ compiler http://codesynthesis.com/projects/cli

Boris Kolpackov wrote:
The reason I announced the second release here is because I got interesting feedback from this list's members after the initial release and a number of new features and changes were the result of this feedback. So I wanted to let the people that responded know about it. Sorry if I offended you by my announcement.
Perhaps if you had an option to compile the .cli file to code that uses the existing Boost command line interface support, then you would have a better reception here? Personally I'm all for mini-languages, but if the compiler doesn't use boost, and doesn't generate code that depends on boost, your post looks a bit like spam - even if this is in practice a forum that reaches hard-core C++ coders who would be interested. I don't know if anywhere else would be appropriate - I definitely gave up on comp.lang.cplusplus (err, or whatever it was called) a looong time ago. (For extra points, generate code for POCO's command line handler too ;-) )

Hi James, James Mansion <james@mansionfamily.plus.com> writes:
Perhaps if you had an option to compile the .cli file to code that uses the existing Boost command line interface support, then you would have a better reception here?
Personally I'm all for mini-languages, but if the compiler doesn't use boost, and doesn't generate code that depends on boost, your post looks a bit like spam
It doesn't make "design" sense to do this. Boost program_options' complexity comes from the need to have the specification in C++. On the other hand, CLI generates really simple code because all the information is available at compile time. In this situation adding a dependency on program_options would be like putting text in a web page just to get picked up by google. Now that I would call spamming. The reason I announced CLI on boost-dev is because I tried to use program_options myself but wasn't really satisfied with the result. So I went ahead and coded my own solution which, IMO and at least for some use-cases, is more convenient than program_options. I thought it would be only fair to let others know about it. I don't think boost developers/users would want to force others to use "their solution" over a better alternative. Or would they ;-)? Boris -- Boris Kolpackov, Code Synthesis http://codesynthesis.com/~boris/blog Open-source XML data binding for C++ http://codesynthesis.com/products/xsd XML data binding for embedded systems http://codesynthesis.com/products/xsde Command line interface to C++ compiler http://codesynthesis.com/projects/cli

On 12/22/2009 5:23 AM, Boris Kolpackov wrote:
The reason I announced CLI on boost-dev is because I tried to use program_options myself but wasn't really satisfied with the result. So I went ahead and coded my own solution which, IMO and at least for some use-cases, is more convenient than program_options. I thought it would be only fair to let others know about it. I don't think boost developers/users would want to force others to use "their solution" over a better alternative. Or would they ;-)?
Boris, the boost developers list is for issues regarding the boost libraries. Your CLI announcements are offtopic here. For issues that you think would be of interest to boost users and developers, please use boost-interest@lists.boost.org. Thanks, -- Eric Niebler BoostPro Computing http://www.boostpro.com
participants (5)
-
Boris Kolpackov
-
Eric Niebler
-
James Mansion
-
Maurizio Vitale
-
Rutger ter Borg