# @jacoblincool/tmpl

> Jacob's Project Templating Tool.

Latest version **1.4.0** (published 2023-01-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install @jacoblincool/tmpl
pnpm add @jacoblincool/tmpl
yarn add @jacoblincool/tmpl
bun add @jacoblincool/tmpl
```

Provides the command `tmpl`.

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.4.0 |
| Published | 2023-01-30 |
| First published | 2023-01-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 7 |
| Unpacked size | 91.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | JacobLinCool |
| Maintainers | jacoblincool |
| Keywords | template |

## Links

- npm: https://www.npmjs.com/package/@jacoblincool/tmpl
- Repository: https://github.com/JacobLinCool/tmpl
- Homepage: https://jacoblincool.github.io/tmpl
- Issues: https://github.com/JacobLinCool/tmpl/issues
- npm.io page: https://npm.io/package/@jacoblincool/tmpl

## Dependencies (7)

- [ora](https://npm.io/package/ora.md) ^5.4.1
- [chalk](https://npm.io/package/chalk.md) ^4.1.2
- [debug](https://npm.io/package/debug.md) ^4.3.4
- [globby](https://npm.io/package/globby.md) ^11.1.0
- [inquirer](https://npm.io/package/inquirer.md) ^8.2.5
- [commander](https://npm.io/package/commander.md) ^10.0.0
- [controlled-fs](https://npm.io/package/controlled-fs.md) ^2.3.1

## Recent versions

- 1.4.0 (latest) — 2023-01-30
- 1.3.0 — 2023-01-30
- 1.2.2 — 2023-01-29
- 1.2.1 — 2023-01-29
- 1.2.0 — 2023-01-28
- 1.1.1 — 2023-01-28
- 1.1.0 — 2023-01-28
- 1.0.0 — 2023-01-28

## README

# `tmpl`

Jacob's Project Templating Tool.

## Features

- [x] Make a template from a directory
- [x] Use a template in a directory
- [x] List all templates
- [x] Peek the file structure and variables of a template
- [x] Import a template from a remote `git` repository
- [x] Template variables
- [x] Composability of multiple templates

## Installation

```sh
pnpm i -g @jacoblincool/tmpl
```

## CLI Usage

It is intended to be an interactive tool, but it can be used in a non-interactive way.

![](https://raw.githubusercontent.com/JacobLinCool/tmpl/main/screenshots/help.gif)

> Use `tmpl --help` / `tmpl <command> --help` to see all the options.

### Make new template

`cd` into the directory you want to make a template of, and run:

```sh
tmpl make
```

It will prompt you for a name and do the rest for you.

![](https://raw.githubusercontent.com/JacobLinCool/tmpl/main/screenshots/make.gif)

#### Template variables

You can use variables in your template.

Use `$#VAR#$` to mark a variable of name `VAR`.

Template variables are case-insensitive.

Character range: `A-Z` (`a-z`), `0-9`, `_`, `.`, and `-`.

### Use template

`cd` into the directory you want to use the template in, and run:

```sh
tmpl use
```

It will give you a list of templates to choose from and do the rest for you.

If there are any files that already exist, it will prompt you to overwrite them or not.

![](https://raw.githubusercontent.com/JacobLinCool/tmpl/main/screenshots/use.gif)

### List templates

It will give you a list of existing templates.

```sh
tmpl list
```

![](https://raw.githubusercontent.com/JacobLinCool/tmpl/main/screenshots/list.gif)

### Peek template

Sometimes you want to see what a template is before using it. You can do that with:

```sh
tmpl list
```

It will show you the file structure and variables of the template.

![](https://raw.githubusercontent.com/JacobLinCool/tmpl/main/screenshots/peek.gif)

### Import template

This tool uses `git` under the hood to manage templates.

By leveraging the power of `git`, you can import templates from any remote repository.

```sh
tmpl import
```

It will prompt you for a remote repository URL and a (local) name for the template.

![](https://raw.githubusercontent.com/JacobLinCool/tmpl/main/screenshots/import.gif)

## API Usage

It can also be used as a library.

See the [documentation](https://jacoblin.cool/tmpl) for more information.

---
_Source: https://npm.io/package/@jacoblincool/tmpl · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
