Skip to content

lovejia2022/cfgopt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cfgopt - Multi-language command line parser generator based on config file

What is cfgopt

cfgopt read a config file, which defined interface of command line argument for you application, and generate code for different programming languages to parse that command line argument.

How to use now

cfgopt is at a early stage. There is only a C generator.

cargo r -- -lc lib/c/cfgopt_gen.h

This read "./cfgopt.toml" and generate "lib/c/cfgopt_gen.h". Include this file to your application to parse command line arguments. lib/c/cfgopt_test.c is a example to use that parser.

TODO

  • Package and release.
  • Interface:
    • Read command line arguments from file.
    • Read command line arguments from environment variables.
    • Generate help.
  • Parser:
    • Parse short flags.
    • Parse positonal arguments.
  • Support more languages:
    • C++
    • Rust
    • Python
    • Go
    • POSIX shell

About

Multi-language command-line parser generator base on config file

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published