An open API service indexing awesome lists of open source software.

https://github.com/atomicptr/tmplr

Quickly create new files from templates.
https://github.com/atomicptr/tmplr

cli golang templates terminal

Last synced: 11 months ago
JSON representation

Quickly create new files from templates.

Awesome Lists containing this project

README

          

# tmplr

Quickly create new files from templates.

## Usage

Assuming we are in an empty directory:

```bash
$ tmplr src/index.php
```

This will create the directory "src" and an empty index.php file because we have not created a template just yet.

Lets create one!

First lets go into our template directory:

```bash
$ cd $(tmplr --template-dir)
```

next lets create a template file for PHP classes and PHP enums

```bash
$ hx [class].php
```

```php
---
name: PHP Class Template
vars:
- name: namespace
prompt: Namespace for this class
---