ucg 0.2.8

A configuration generation grammar.
docs.rs failed to build ucg-0.2.8
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: ucg-0.7.2

Universal Configuration Grammar.

Build Status

This is an experiment in configuration management. The approach is not to create a "parsable" config file format. We have plenty of those. Instead we try to specify a grammar for describing configuration values that can then target various configuration formats to output to.

In theory this could support anything from command line flags to json to yaml or toml or even xml.

The goal is to allow a global shared configuration repository that can be version controlled, enforce some typesafety, and output configuration for any application regardless of that applications preferred format.

The Usual Warnings

This is still very much an experiment and the language and api can be expected to change and mutate. It also probably has bugs and isn't yet the most user friendly language and compiler to use. You have been warned.


You can get ucg with cargo cargo install ucg.

Running ucg help will show the following output.

Universal Configuration Grammar compiler.

    ucg [SUBCOMMAND]

    -h, --help       Prints help information
    -V, --version    Prints version information

    build       Build a specific ucg file.
    help        Prints this message or the help of the given subcommand(s)
    inspect     Inspect a specific symbol in a ucg file.
    test        Check a specific ucg file for errors.


Build a list of ucg files.

    ucg build [FLAGS] -r [INPUT]...

    -h, --help       Prints help information
    -r               Whether we should recurse in directories or not.
    -V, --version    Prints version information

    <INPUT>...    Input ucg files or directories to build. If not provided then build the contents of the current directory.


Check a list of ucg files for errors and run test assertions.

   ucg test [FLAGS] -r [INPUT]...

   -h, --help       Prints help information
   -r               Whether we should recurse or not.
   -V, --version    Prints version information

   <INPUT>...    Input ucg files or directories to run test assertions for. If not provided it will scan the current directory for files with _test.ucg

Language Reference