Mikroconf

Mikroconf is a command-line administration interface for embedded Linux devices written in Tcl. In other words, you can do things like:

Router> en
Router# conf term
Router(config)# hostname TclTk
TclTk(config)# end
TclTk# write
TclTk# show run
…

MikroConf is not only 100% written in Tcl, but also makes heavy use of certain Tcl features to facilitate implementation, and also allow administrators to do interesting things like:

  • In-line scripting in Tcl. Regular configuration commands and Tcl commands can be intertwined on the same command prompt. This is possible in a safe manner, using Tcl's safe interpreters.
  • It supports multiple concurrent UI sessions, using Tcl threads.
  • It supports an event-based/reactive configuration paradigm. Tcl procedures can be registered to be invoked when certain events occur (e.g. link up/down).
  • Automation of repeated tasks (sort of macros) with stored Tcl procedures.
  • Command output can be captured, filtered, manipulated, emailed etc. with all the power of Tcl.
  • Usability features such as: ANSI terminal colors and highlights, full screen editing of configuration, and others.

Of course, as expected by such an interface, it supports all the standard command-line editing conveniences: in-help, command abbreviations, command expansion, history substitutions, command-line editing keys and others.

MikroConf has a very well-thought design, which makes it particularly easy for developers to extend with new functionality. In particular:

  • It features a modular architecture. New functionality is introduced in the form of MikroConf modules, which can easily be written in Tcl by gluing together various underlying embedded Linux components. Tcl is particularly appropriate for this task as a glue language.
  • There is clear separation between the declaration of command syntax and its enforcement code (Tcl command handler).
  • XML description of command structure, syntax and hierarchy, authentication/configuration modes, running-config sections etc.
  • The highest possible flexibility in specifying command syntax, described as a deterministic finite automaton.
  • Server-Client architecture and transport protocol independence.

There is complete documentation on the framework, design document, and a tutorial on how to write new configuration modules. Users will find a Getting Started Guide and a command reference with description on each supported command.