arfg provides a simple meta-language (or rather, a framework for defining your own meta-language), combining various filters to produce its output.
In a typical application, every input file filename.arfg is sandwiched between .
arfg-pre and .arfg-post, fed to an arbitrary re-writing filter .arfg-rewrite, the m4 macro processor, a diversion filter, an embedded Perl interpreter, and an optional post-processing filter; the result is then written to filename.
After completion of this procedure for all filenames, an external command may also be called.
For maximum flexibility, it is advisable to repeat calling arfg on a set of filenames until the files no longer change; with this it is possible to write self-configuring software and to provide for non-linear flow of information through the code base.