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

dtsm

v1.1.0

Published

TypeScript definition file (.d.ts) manager

Downloads

221

Readme

DTSM Circle CI Build status

The .d.ts manager

.d.ts is TypeScript definition file. DefinitelyTyped!

Install

$ npm install -g dtsm

dtsm depends on Node.js, npm and git command. please install git client.

Usage

# fetch from remote repository
$ dtsm fetch
fetching...
fetching https://github.com/DefinitelyTyped/DefinitelyTyped.git

# search .d.ts
$ dtsm search atom
Search results.

	atom/atom.d.ts
	dojo/dojox.atom.d.ts

# install .d.ts
$ dtsm install atom
atom/atom.d.ts #be0b6b
├── q/Q.d.ts
├── jquery/jquery.d.ts
├─┬ space-pen/space-pen.d.ts
│ └── jquery/jquery.d.ts
├─┬ emissary/emissary.d.ts
│ └── mixto/mixto.d.ts
├─┬ pathwatcher/pathwatcher.d.ts
│ ├── node/node.d.ts
│ └── q/Q.d.ts
├─┬ text-buffer/text-buffer.d.ts
│ ├─┬ emissary/emissary.d.ts
│ │ └── mixto/mixto.d.ts
│ └── q/Q.d.ts
└─┬ status-bar/status-bar.d.ts
  ├─┬ space-pen/space-pen.d.ts
  │ └── jquery/jquery.d.ts
  └─┬ text-buffer/text-buffer.d.ts
    ├─┬ emissary/emissary.d.ts
    │ └── mixto/mixto.d.ts
    └── q/Q.d.ts

$ tree typings
typings
├── atom
│   └── atom.d.ts
├── emissary
│   └── emissary.d.ts
├── jquery
│   └── jquery.d.ts
├── mixto
│   └── mixto.d.ts
├── node
│   └── node.d.ts
├── pathwatcher
│   └── pathwatcher.d.ts
├── q
│   └── Q.d.ts
├── space-pen
│   └── space-pen.d.ts
├── status-bar
│   └── status-bar.d.ts
└── text-buffer
    └── text-buffer.d.ts

10 directories, 10 files

# create dtsm.json and save dependencies
$ dtsm init
write to dtsm.json
{
  "repos": [
    {
      "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
      "ref": "master"
    }
  ],
  "path": "typings",
  "bundle": "typings/bundle.d.ts",
  "dependencies": {}
}

$ dtsm install --save atom
atom/atom.d.ts #be0b6b
├── q/Q.d.ts
├── jquery/jquery.d.ts
├─┬ space-pen/space-pen.d.ts
│ └── jquery/jquery.d.ts
├─┬ emissary/emissary.d.ts
│ └── mixto/mixto.d.ts
├─┬ pathwatcher/pathwatcher.d.ts
│ ├── node/node.d.ts
│ └── q/Q.d.ts
├─┬ text-buffer/text-buffer.d.ts
│ ├─┬ emissary/emissary.d.ts
│ │ └── mixto/mixto.d.ts
│ └── q/Q.d.ts
└─┬ status-bar/status-bar.d.ts
  ├─┬ space-pen/space-pen.d.ts
  │ └── jquery/jquery.d.ts
  └─┬ text-buffer/text-buffer.d.ts
    ├─┬ emissary/emissary.d.ts
    │ └── mixto/mixto.d.ts
    └── q/Q.d.ts

$ cat dtsm.json
{
  "repos": [
    {
      "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
      "ref": "master"
    }
  ],
  "path": "typings",
  "bundle": "typings/bundle.d.ts",
  "dependencies": {
    "atom/atom.d.ts": {
      "ref": "be0b6b394f77a59e192ad7cfec18078706e44db5"
    }
  }
}

$ rm -rf typings/

$ dtsm install
atom/atom.d.ts #be0b6b
├── q/Q.d.ts
├── jquery/jquery.d.ts
├─┬ space-pen/space-pen.d.ts
│ └── jquery/jquery.d.ts
├─┬ emissary/emissary.d.ts
│ └── mixto/mixto.d.ts
├─┬ pathwatcher/pathwatcher.d.ts
│ ├── node/node.d.ts
│ └── q/Q.d.ts
├─┬ text-buffer/text-buffer.d.ts
│ ├─┬ emissary/emissary.d.ts
│ │ └── mixto/mixto.d.ts
│ └── q/Q.d.ts
└─┬ status-bar/status-bar.d.ts
  ├─┬ space-pen/space-pen.d.ts
  │ └── jquery/jquery.d.ts
  └─┬ text-buffer/text-buffer.d.ts
    ├─┬ emissary/emissary.d.ts
    │ └── mixto/mixto.d.ts
    └── q/Q.d.ts

$ ls -la | grep typings
drwxr-xr-x  13 vvakame  wheel     442  3 27 00:31 typings

$ dtsm update --save
atom/atom.d.ts #0c2ee8
├── q/Q.d.ts
├── jquery/jquery.d.ts
├─┬ space-pen/space-pen.d.ts
│ └── jquery/jquery.d.ts
├─┬ emissary/emissary.d.ts
│ └── mixto/mixto.d.ts
├─┬ pathwatcher/pathwatcher.d.ts
│ ├── node/node.d.ts
│ └── q/Q.d.ts
├─┬ text-buffer/text-buffer.d.ts
│ ├─┬ emissary/emissary.d.ts
│ │ └── mixto/mixto.d.ts
│ └── q/Q.d.ts
└─┬ status-bar/status-bar.d.ts
  ├─┬ space-pen/space-pen.d.ts
  │ └── jquery/jquery.d.ts
  └─┬ text-buffer/text-buffer.d.ts
    ├─┬ emissary/emissary.d.ts
    │ └── mixto/mixto.d.ts
    └── q/Q.d.ts

Advanced usage

reference other repository

# search for another repository
$ dtsm --remote https://github.com/vvakame/gapidts.git search bigquery
Search results.

	test/valid/bigquery-v2-browser.d.ts
	test/valid/bigquery-v2-nodejs.d.ts

example

reference mixed repository

$ cat dtsm.json
{
  "repos": [
    {
      "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
      "ref": "master"
    },
    {
      "url": "https://github.com/vvakame/gapidts.git",
      "ref": "master"
    }
  ],
  "path": "typings",
  "bundle": "typings/bundle.d.ts",
  "dependencies": {
    "jquery/jquery.d.ts": {
      "ref": "0605ebbdbdd8183c70b4a14e1e34ecb3f2b446bf"
    },
    "gapidts/bigquery-v2-browser.d.ts": {
      "repo": "https://github.com/vvakame/gapidts.git",
      "ref": "4edbcca555936a931407d667f8687f175ecbd5ed",
      "path": "test/valid/bigquery-v2-browser.d.ts"
    }
  }
}

$ dtsm install
jquery/jquery.d.ts DefinitelyTyped/DefinitelyTyped#0605eb

gapidts/bigquery-v2-browser.d.ts vvakame/gapidts#4edbcc
└── gapidts/googleapis-browser-common.d.ts

example

Install with interactive filtering

If you use peco, you can install .d.ts file interactive.

$ dtsm search -i
$ dtsm install -i

dtsm install -i

Link to npm or bower bundled definitions

If other package manager's dependencies have a TypeScript definition files, dtsm can find it and add to bundle.d.ts.

$ cat package.json
{
  "name": "dtsm-sample",
  "version": "0.0.1",
  "dependencies": {
    "commandpost": "0.1.1"
  }
}
$ dtsm link --save
from npm dependencies
└─┬ commandpost
  └── node_modules/commandpost/commandpost.d.ts

If dtsm.json has link property, dtsm install exec link sub command implicitly.

$ cat package.json
{
  "name": "dtsm-sample",
  "version": "0.0.1",
  "dependencies": {
    "commandpost": "0.1.1"
  }
}
$ cat dtsm.json
{
  "repos": [
    {
      "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
      "ref": "master"
    }
  ],
  "path": "typings",
  "bundle": "typings/bundle.d.ts",
  "link": {
    "npm": {
      "include": true
    },
    "bower": {
      "include": true
    }
  },
  "dependencies": {}
}
$ dtsm install
install
from npm dependencies
└─┬ commandpost
  └── node_modules/commandpost/commandpost.d.ts

Change log

See CHANGELOG

Contributing

This package's author vvakame is not native english speaker. My first language is Japanese. If you are native english speaker. I wish received a pull request for document and anything.

TODO

  • write document
  • create pull request
    • generate self check todo list