npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

template-manager-cli

v1.0.1

Published

A CLI tool to manage your project templates.

Downloads

12

Readme

Template Manager CLI

Introduction

Template Manager is a command-line tool that helps you manage templates for your projects. It allows you to add, list, and remove templates from your template repository.

Why Template Manager?

Feel tired of managing templates in different places? 😩📂

Template Manager can help you manage templates in a single git repository, and you can manage all your templates in a single place.

Features

  • 🌍 Support multiple remote sources for flexible template management.
  • 📂 Manage templates in a single git repository.
  • 📂 Easy to add, list, remove, update templates.
  • 🌐 Open templates in the browser quickly.
  • 🚀 Create new projects from templates with a single command.
  • 🔄 Pull templates from the remote repository to your local.

Installation

Install the template manager

npm install -g template-manager-cli

Setting Up Your Template Repository

When using Template Manager for the first time, you'll need to set up a remote template source. This is typically a GitHub repository URL.

  1. Add a remote template source:
# tm remote add <name> <source-url>
tm remote add my-template-repo [email protected]:Donovan-Ye/template-manager.git
  1. List your remote template sources:
tm remote list
  1. Select a remote template source as your current source:
# tm remote use <name>
tm remote use my-template-repo
  1. Initialize your template repository:
tm init

This command sets up your repository with the necessary files: template.json and README.md. If these files already exist, you'll be prompted to overwrite them.

For more details on the tm remote command, use tm remote -h.

Manual Setup (Optional)

If you prefer not to use the tm init command, ensure you have the following files in your repository:

  1. template.json:

    [
      {
        "name": "template-name",
        "path": "template-path"
      }
    ]
  2. README.md with placeholders <!-- tm-list-start --> and <!-- tm-list-end --> for the template list:

    # My Templates Repository
    
    ## My templates
    <!-- tm-list-start -->
    
    <!-- tm-list-end -->

Managing Your Templates

Once your repository is set up, you can start managing your templates:

  • Add a new template:
# tm add <template-name> <template-path>
tm add template-name template-path
  • List all templates:
tm list
  • Update an existing template:
# tm set <template-name> <template-path>
tm set template-name new-template-path
  • Pull a template from the remote repository:
# tm pull [template-name]
tm pull template-name
# or don't specify the template name, it will pull all templates from the remote repository
tm pull
  • Create a new project from a template, it will clone the template to your local and remove the git history:
# tm create [template-name]
tm create template-name
# or don't specify the template name, it will prompt you to choose one from the template list
tm create
  • Open a template in the browser:
# tm open [template-name]
tm open template-name
# or don't specify the template name, it will prompt you to choose one from the template list
tm open
  • Remove a template:
# tm remove [template-name]
tm remove template-name
# or don't specify the template name, it will remove all templates
tm remove

For a complete list of commands and their usage, run tm -h.

Usage

Global Options

Usage: tm [options] [command]

A CLI tool to manage your project templates.

Options:
  -v, --version          display the version number
  -h, --help             display help for command

Commands:
  remote                 Manage remote template sources
  init [options]         Initialize current remote source repository with initial files.
  add <template> <path>  Add a new template.
  list|ls [options]      List all available templates from your template repository, will be cached for 1 hour. You can use -f to force to get
                         templates from the template repository.
  set <template> <path>  Update a template to a path.
  remove|rm [template]   Remove a template.
  open                   Choose a template to open in the browser.
  create                 Choose a template to create a new project, all the git history will be removed.
  pull                   Pull a template from the remote repository, all the git history will be preserved.
  help [command]         display help for command

Remote Commands

Usage: tm remote [options] [command]

Manage remote template sources

Options:
  -h, --help               display help for command

Commands:
  list|ls                  List all remote template sources
  add <name> <source-url>  Add a remote template source
  remove|rm <name>         Remove a remote template source
  use <name>               Use a remote template source
  help [command]           display help for command

License

MIT License © 2024-PRESENT DonovanYe