Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Fetching contributors…
Cannot retrieve contributors at this time
52 lines (35 sloc) 1.34 KB


a general purpose template cli


npm install tpl or npm install -g tpl



To parse a file and apply a template, simply provide the file as an argument.

tpl hello-world.mkd

This will do several things.

  1. Look for a .conf directory in the current working directory, if none exists look for one in the parent directory, in the parent's parent directory and so on. If there's no .conf directory all the way up to the root, use the default .conf in the installation directory.
  2. Use the configuration defined in ./tpl/conf.json.
  3. Look for a parser for the file extension (.mkd). If none was found, use the default parser.
  4. Read and parse the file.
  5. Look if the file defined a template, which should be used for its rendering. If not, use the default rendering.
  6. Print the rendered document.

If you want to save the output, you can use

tpl hello-world.mkd > hello-world.html

Use custom configuration

For information on how to customize the behavior of tpl, look at the wiki.

Bugs and Issues

If you encounter any bugs or issues, feel free to open an issue at github.


This package is licensed under the MIT license.

Jump to Line
Something went wrong with that request. Please try again.