https://github.com/webern/cmdgen
Generate Command Line Argument Parsers in Multiple Languages
https://github.com/webern/cmdgen
Last synced: about 1 year ago
JSON representation
Generate Command Line Argument Parsers in Multiple Languages
- Host: GitHub
- URL: https://github.com/webern/cmdgen
- Owner: webern
- License: mit
- Created: 2019-08-25T14:38:48.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-09-20T02:47:40.000Z (over 6 years ago)
- Last Synced: 2025-01-24T21:25:11.869Z (over 1 year ago)
- Language: C++
- Homepage:
- Size: 386 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
cmdgen
======
[](https://circleci.com/gh/webern/cmdgen/tree/master)
[](https://circleci.com/gh/webern/cmdgen/tree/develop)
cmdgen is a command line program which reads a definition of commands and arguments, provided by an xml file, and generates the necessary code to stub out CLI program that takes those commands and arguments.
Commands form a tree-like structure, and should be familiar to most from git. For example this:
```
git remote add origin https://github.com/webern/cmdgen.git
^ ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
program commands argument(s)
```
This can be specified and generated with xml that looks like this:
```xml
git
remote
origin
1
1
string
```
You can then stub out the program with `cmdgen -i config.xml`