Developer Area/CLI Framework

From Mahara Wiki

< Developer Area
Revision as of 06:56, 16 September 2011 by Andrewnicols (talk | contribs) (Beginnings of CLI framework usage and description)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

To facilitate creation of Command Line Interface (CLI) scripts, a CLI framework has been created for Mahara.

This is a work in progress


The CLI framework has been designed to make creating CLI scripts easier. To this end, it has a number of features:

  • help/usage creation supporting:
    • descriptions;
    • default values;
    • example values; and
    • word wrapping of text.
  • option validation;
  • log level control (ability to turn on verbosity); and an
  • option getter supporting:
    • long and short option names.


Basic usage is currently documented in htdocs/lib/cli.php