GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - clicon/cligen: CLIgen is a Command-Line Interface generator

BranchesTags
Open more actions menu

Latest commit

 

History

780 Commits
780 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
config-aux
config-aux
 
 
debian
debian
 
 
fuzz
fuzz
 
 
scripts
scripts
 
 
test
test
 
 
.editorconfig
.editorconfig
 
 
.gitignore
.gitignore
 
 
CHANGELOG.md
CHANGELOG.md
 
 
Doxyfile
Doxyfile
 
 
LICENSE.md
LICENSE.md
 
 
Makefile.in
Makefile.in
 
 
README.md
README.md
 
 
SECURITY.md
SECURITY.md
 
 
banned.h
banned.h
 
 
cligen.h
cligen.h
 
 
cligen_buf.c
cligen_buf.c
 
 
cligen_buf.h
cligen_buf.h
 
 
cligen_buf_internal.h
cligen_buf_internal.h
 
 
cligen_callback.c
cligen_callback.c
 
 
cligen_callback.h
cligen_callback.h
 
 
cligen_config.h.in
cligen_config.h.in
 
 
cligen_custom.h
cligen_custom.h
 
 
cligen_cv.c
cligen_cv.c
 
 
cligen_cv.h
cligen_cv.h
 
 
cligen_cv_internal.h
cligen_cv_internal.h
 
 
cligen_cvec.c
cligen_cvec.c
 
 
cligen_cvec.h
cligen_cvec.h
 
 
cligen_cvec_internal.h
cligen_cvec_internal.h
 
 
cligen_expand.c
cligen_expand.c
 
 
cligen_expand.h
cligen_expand.h
 
 
cligen_file.c
cligen_file.c
 
 
cligen_getline.c
cligen_getline.c
 
 
cligen_getline.h
cligen_getline.h
 
 
cligen_handle.c
cligen_handle.c
 
 
cligen_handle.h
cligen_handle.h
 
 
cligen_handle_internal.h
cligen_handle_internal.h
 
 
cligen_hello.c
cligen_hello.c
 
 
cligen_history.c
cligen_history.c
 
 
cligen_history.h
cligen_history.h
 
 
cligen_history_internal.h
cligen_history_internal.h
 
 
cligen_io.c
cligen_io.c
 
 
cligen_io.h
cligen_io.h
 
 
cligen_match.c
cligen_match.c
 
 
cligen_match.h
cligen_match.h
 
 
cligen_object.c
cligen_object.c
 
 
cligen_object.h
cligen_object.h
 
 
cligen_parse.h
cligen_parse.h
 
 
cligen_parse.l
cligen_parse.l
 
 
cligen_parse.y
cligen_parse.y
 
 
cligen_parsetree.c
cligen_parsetree.c
 
 
cligen_parsetree.h
cligen_parsetree.h
 
 
cligen_print.c
cligen_print.c
 
 
cligen_print.h
cligen_print.h
 
 
cligen_pt_head.c
cligen_pt_head.c
 
 
cligen_pt_head.h
cligen_pt_head.h
 
 
cligen_read.c
cligen_read.c
 
 
cligen_read.h
cligen_read.h
 
 
cligen_regex.c
cligen_regex.c
 
 
cligen_regex.h
cligen_regex.h
 
 
cligen_result.c
cligen_result.c
 
 
cligen_result.h
cligen_result.h
 
 
cligen_syntax.c
cligen_syntax.c
 
 
cligen_syntax.h
cligen_syntax.h
 
 
cligen_tutorial.c
cligen_tutorial.c
 
 
cligen_tutorial.pdf
cligen_tutorial.pdf
 
 
cligen_tutorial.tex
cligen_tutorial.tex
 
 
cligen_util.c
cligen_util.c
 
 
cligen_util.h
cligen_util.h
 
 
codecov.yml
codecov.yml
 
 
configure
configure
 
 
configure.ac
configure.ac
 
 
tutorial.cli
tutorial.cli
 
 
usage.pdf
usage.pdf
 
 

Repository files navigation

CLIgen

Build Status codecov Coverity Scan Build Status

CLIgen is a Command-Line Interface generator.

Well, actually it is not really a generator, since it does not generate code for CLI:s. Instead, it builds and interprets datastructures (a parse-tree) which a library (libcligen) interprets in runtime. It is fast and efficient and helps you develop CLI:s easier. You enter a CLI syntax in a text file, and write callback functions in C. The callback functions add the semantics, that is, what the commands in the CLI are supposed to do.

The main documentation is the cligen tutorial which is usually kept up-to-date and is probably the best way to understand CLIgen.

Some background material can be found on the CLIgen project page.

CLIgen is not a system in itself, you need to build your own 'backend'. There is another co-project: 'clixon' which is a whole system where you load dynamic frontend and backend modules. See CLIXON project page and CLIXON github. Clixon provides a system with embedded database, commit semantics, YANG and NETCONF interface, etc. CLIgen is a part of clixon but can be used by itself.

The source code here is built and installed using:

  configure;
  make;
  sudo make install.

The source builds a single library. If you build applications, you should include cligen.h and link with the library.

There are several example applications:

  • cligen_hello Simplest possible. Just builds a 'hello world' greeting by in-line C
  • cligen_file Read a syntax specification from file. You must supply the file.
  • cligen_tutorial Samples of techniques used in cligen_tutorial.pdf

See also Changelog.

For building the C reference documentation using doxygen, do: make doc and place your browser at doc/index.html.

CLIgen is dual license. Either Apache License, Version 2.0 or GNU General Public License Version 2. You choose.

I can be found at [email protected].

getline

CLIgen uses getline with the following copyright:

Copyright (C) 1991, 1992, 1993 by Chris Thewalt ([email protected])

Permission to use, copy, modify, and distribute this software for any purpose and without fee is hereby granted, provided that the above copyright notices appear in all copies and that both the copyright notice and this permission notice appear in supporting documentation. This software is provided "as is" without express or implied warranty.

About

CLIgen is a Command-Line Interface generator

www.cligen.se

Resources

Readme
License

Security policy

Security policy
Activity
Custom properties

Stars

36 stars

Watchers

3 watching

Forks

45 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.