A comprehensive and versatile C library for parsing command-line interfaces. GenericCShellParserLIB is designed to facilitate robust CLI functionalities in C projects, featuring a range of built-in commands like show, config, debug, and clear. Ideal for developers seeking to integrate a powerful yet customizable shell parser into their applications.
- Wide Range of Commands: Includes common commands like show, config, debug, clear, and more.
- Easy Integration: Designed for seamless integration into existing C projects.
- Customizability: Easily extendable to add new commands specific to your application needs.
- Robust Parsing: Efficient and accurate parsing of command-line input.
- Standard C development environment
- Basic understanding of command-line interfaces and C programming
Clone the repository:
git clone https://github.com/harshithsunku/GenericCShellParserLIB.gitInstall Readline library:
sudo apt-get install libreadline-devCompile the library:
//To Build
make
//To clean
make cleanHere's a simple example of how to use GenericCShellParserLIB in your C application:
int
main(int argc, char **argv){
init_libcli();
param_t *show = libcli_get_show_hook();
param_t *debug = libcli_get_debug_hook();
param_t *config = libcli_get_config_hook();
param_t *clear = libcli_get_clear_hook();
param_t *run = libcli_get_run_hook();
support_cmd_negation(config);
/*Do not add any param in config command tree after above line*/
start_shell();
return 0;
}For more detailed documentation, see docs/documentation.md.
Contributions to GenericCShellParserLIB are welcome! Please read our Contributing Guidelines for more information on how to contribute.
This project is licensed under the GNU General Public License v3 (GPLv3).