I built a CLI tool to stop copy-pasting my backend boilerplate
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-jsSaving a template
templr save mybackendThis 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 mybackendThe 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 files –
node_modulesand.gitdirectories are never copied.
Links
- npm package:
- GitHub repository: