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 🙏

© 2026 – Pkg Stats / Ryan Hefner

dtr-cli

v1.2.6

Published

DTR is an open source developer helping CLI tool build on typescript

Downloads

15

Readme

DTR CLI tool

DTR - CLI thumbnail

  1. Introduction
  2. Installation
  3. Usage
  4. Commands
  5. Configuration
  6. Global Configuration
  7. Install for development

Introduction

DTR-CLI is a command-line interface tool designed to help manage and interact with code files in your directory. It includes various commands to initialize configurations, add code files, create new code files, read existing files, delete files, and manage boilerplate templates.

Installation

DTR-CLI already published on npm

npm install -g dtr-cli

For Linux and Mac user

  1. Install package from npm:

    sudo npm install -g dtr-cli
  2. Find dtr-cli global location:

    which dtr # it will return like `/usr/local/bin/dtr`
    cd /usr/local/bin
  3. Show dtr-cli all files:

    ls -la

    It will return something like this:

    lrwxrwxrwx 1 root root 42 Jul 17 23:09 dtr -> ../lib/node_modules/dtr-cli/build/index.js

    Go to this node_modules folder:

    cd ../lib/node_modules/
  4. Add read write permission:

    sudo chmod 775 -R dtr-cli/

Now you are ready to use dtr-cli by dtr command

Usage

After installation, you can use the dtr command followed by the specific subcommand.

dtr <command> [argument] [flags]

Commands

Init command

Initialize the dtr-config.json configuration file.

dtr init

Flags

  • -c, --code <codeFolder>: Path for the code file directory. This is optional. This is optional.

Add command

Add a code file to your directory.

dtr add

Arguments

  • [codeName]: Name of the code file you want to add. This is optional. This is optional.

Create command

Create a new code file.

dtr create

Argument

  • [codeName]: Name of the code file. This is optional.

Flags

  • -f, --from <codeFrom>: Source of the code file. Accepts 'local' | 'internet'. This is optional.
  • -u, --url <internetURL>: GitHub code URL if you select 'codeFrom' as 'internet'. This is optional.
  • -p, --path <localPath>: Current directory file path if you select 'codeFrom' as 'local'. This is optional.

Read command

Read all code files.

dtr read

Argument

  • [codeName]: Name of the code file. This is optional.

Delete command

Delete a global code file.

dtr delete

Create template command

Create a new boilerplate template.

dtr create-template

Argument

  • [templateName]: Name of the template. This is optional.

Options

  • -s, --source <source>: Source folder of the template. This is optional.

Template command

Add a boilerplate template in the current directory.

dtr template

Argument

  • [templateName]: Name of the template. This is optional.

Configuration

The dtr-config.json file will be initialized by init command. This file stores the configuration settings of current working directory.

Example dtr-config.json:

{
  "codeFolder": "code", // code folder name
  "addedCode": [
    {
      "fileName": "",
      "path": ""
    }
    // all code files
  ]
}

Global configuration

The configData.json file will be initialized in the global root directory. This file stores the configuration settings for the CLI tool.

Example configData.json:

{
  "allFiles": [
    {
      "fileName": "",
      "path": ""
    }
    // all code files
  ],
  "allTemplates": [
    {
      "templateName": "",
      "templateFolder": ""
    }
    // all templates
  ]
}

Install for development

  1. Clone the repository:

    git clone https://github.com/saiful7778/dtr-cli.git
    cd dtr-cli
  2. Install dependencies:

    npm install
    # or
    yarn install
    # or
    pnpm install
    # or
    bun install

Note: Here I use bun you can any of them

  1. Build the package:

    npm run build
    # or
    yarn run build
    # or
    pnpm run build
    # or
    bun run build