OnWorks favicon

cli-generate - Online in the Cloud

Run cli-generate in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command cli-generate that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator



cli-generate - Generate source and documentation from CLI descriptions


cli-generate [ -c | -h | -m | -w ] FILENAME.cli


cli-generate reads in a CLI (command line interface) description file, parses it into its
various sections, and prints out one of a set of output files. In typical usage, that
output would be directed to a file and later compiled or included in other sources.

The CLI file (named PROGRAM.cli) is divided into two parts, a header (formatted much like
a standard mail header) and a series of sections. Headers and sections other than those
specified below are ignored. All headers and sections are optional.

File Format
file = header "\n" *section

header = *(header-line "\n")

header-line = header-field ":" whitespace value

whitespace = *(SPACE / TAB)

section = "[" name "]" "\n" lines

lines = *( line "\n" )

A one-line description of what the program does.

Add C statements to #include the given source file. Must be formatted as either
<file> or file

Min: The minimum number of allowed non-option arguments. Defaults to 0.

Max: The maximum number of allowed non-option arguments. Negative values mean
unlimited. Defaults to -1.

Set to non-zero if the resulting program is to show its PID with every output
message. Defaults to 0.

Usage: A one-line description of the intended usage. Defaults to empty.

Section Names
The text in this section is shown in the command usage before the options

The list of options this program accepts. See below for their format.

The text in this section is shown in the command usage after the options


[return value]





[see also]







These sections are formatted and copied into the man page in the standard order.

Options Format
options = *(option / separator)

option = option1 "\n" option2 "\n" *(line "\n")

option1 = [shortopt] [longopt] type ["=" flag-value] variable ["=" init]

option2 = helpstr ["=" default]

separator = "-- " text "\n"

shortopt = "-" character

longopt = "--" word


If not specified, flag-value and init are 0, and default is empty.

Except for [prefix], [options], and [suffix], all of the sections support formatting
instructions similar to that of TeXinfo (but greatly simplified).

Use "strong" (bold) text.

Indicate the name of a command.

Indicate a command-line option.

Use "emphatic" (italicized) text.

Indicate a metasyntactic variable.

Indicate an environment variable.

Indicate the name of a file.

Indicate text that is a literal example of a piece of a program.

Indicate text that is a literal example of a sequence of characters.


@end example
The text between these two tags is indented.


@end verbatim
Everything between these two tags is passed as-is (verbatim) to the output.

@table @format

@end table
Mark up a two-column table, or "definition list".

@item paragraph
Add an item to a table. The @item starts a paragraph that will be the actual list
entry. Any subsequent paragraphs will be typeset seperately.


-c Output C source code.

-h Output C header file.

-m Output a UNIX man page.

-w Output HTML (web) markup.


Here is a sample CLI file, containing many of the described elements.

Min: 1
Max: 1
Usage: PATH
Description: Create a file.
Show-Pid: 0
Include: <stdio.h>

If the given PATH is a directory, it is suffixed with another name.

@program generates a new random file from a variety of sources including
@command{ls} and @command{ps} output.

If the given @option{PATH} is a directory, it is suffixed with another
name of my choosing.

-v --verbose FLAG=1 opt_verbose

-t --type STRING opt_type = "type1"
The type of the file to generate. = type1
Possible types for this include @option{type1} and @option{base64}.

Use cli-generate online using onworks.net services

Free Servers & Workstations

Download Windows & Linux apps

  • 1
    Clover EFI bootloader
    Clover EFI bootloader
    Project has moved to
    Features:Boot macOS, Windows, and Linux
    in UEFI or legacy mode on Mac or PC with
    Download Clover EFI bootloader
  • 2
    Join us in Gitter!
    Enable the URPMS repository in your
    system -
    Download unitedrpms
  • 3
    Boost C++ Libraries
    Boost C++ Libraries
    Boost provides free portable
    peer-reviewed C++ libraries. The
    emphasis is on portable libraries which
    work well with the C++ Standard Library.
    See http://www.bo...
    Download Boost C++ Libraries
  • 4
    VirtualGL redirects 3D commands from a
    Unix/Linux OpenGL application onto a
    server-side GPU and converts the
    rendered 3D images into a video stream
    with which ...
    Download VirtualGL
  • 5
    Library to enable user space
    application programs to communicate with
    USB devices. Audience: Developers, End
    Users/Desktop. Programming Language: C.
    Download libusb
  • 6
    SWIG is a software development tool
    that connects programs written in C and
    C++ with a variety of high-level
    programming languages. SWIG is used with
    Download SWIG
  • More »

Linux commands