rlx-tpl(3) -- template  commands
================================

## SYNOPSIS

Commands for modifying and testing templates.

## COMMANDS

Environment variables set by these commands are prefixed with *tpl* and concatenated to the variable name using an underscore. When executing commands and referencing environment variable names this prefix should not be specified, but when referencing the environment variables in template files the prefix must be used.

Environment variable names must be valid identifiers, only alphanumeric characters and underscores are allowed.

* `tpl print`:

Print all template environment variables.

* `tpl get [name...]`:

Print specific template environment variable(s).

* `tpl set [print] [name=value...]`:

Set template environment variable(s).

* `tpl array [name] [values...]`:

Sets a series of environment variables that mimic an array.

* `tpl clean`:

Unset all template environment variables.

* `tpl find [id]`:

Find a template file by identifier, a custom search path specified using the `templates` setting is preferred over the system template path.

* `tpl parse [id] [print] [name=value...]`:

Parses a template file and print the resulting JSON document. The `print` option is a boolean indicating whether the document is printed, if this option is not a boolean it is treated as a name/value pair.

* `tpl copy [directory] [name]`:

Copy the system templates to *directory*, if *name* is not specified then the value *rlx-template* is used. The *directory* must exist but the target (*directory*/*name*) must not exist.

If the copy operation is successful the *templates* setting is set to the new template directory, run `settings save` to store the updated setting.

Use this command to generate a set of user templates if you wish to modify the templates.

## BUGS

**rlx** is written in bash and depends upon `bash >= 4.2`.

## COPYRIGHT

**rlx** is copyright (c) 2013 muji <http://xpm.io>

## SEE ALSO

rlx(1), couchdb(3)
