I built a CLI tool to stop copy-pasting my backend boilerplate

Published: (March 29, 2026 at 04:39 AM EDT)
1 min read
Source: Dev.to

Source: Dev.to

The problem

Every time I started a new Node.js project I was doing the same things:

  • Create src/db/db.js
  • Create src/app.js
  • Set up Express, CORS, dotenv
  • Copy utility files such as asyncHandler, ApiError, ApiResponse

Repeating these steps was tedious and error‑prone.

The solution: templr‑js

I created a tiny CLI tool called templr‑js that lets you save a project skeleton once and reuse it instantly.

Installation

npm install -g templr-js

Saving a template

templr save mybackend

This command stores the current directory’s structure (excluding node_modules and .git) as a template named mybackend on your local machine.

Using a template

templr use mybackend

The saved skeleton is copied into the current directory, giving you a ready‑to‑go backend setup without any cloud services or extra configuration files.

Key characteristics

  • Zero dependencies – built with pure Node.js (fs, path, os).
  • Local storage only – templates are kept on your machine; nothing is uploaded.
  • No unwanted filesnode_modules and .git directories are never copied.
  • npm package:
  • GitHub repository:
0 views
Back to Blog

Related posts

Read more »