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.
- Host: GitHub
- URL: https://github.com/atomicptr/tmplr
- Owner: atomicptr
- License: gpl-3.0
- Created: 2024-07-16T12:40:40.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-09-22T15:44:15.000Z (over 1 year ago)
- Last Synced: 2025-03-07T00:37:45.209Z (11 months ago)
- Topics: cli, golang, templates, terminal
- Language: Go
- Homepage:
- Size: 356 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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
---