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

docomet

v0.3.0

Published

Documentation updates at comet speed.

Readme

☄️ docomet - Documentation updates at comet speed.

npm version npm downloads types included ESM License: Apache-2.0 API Docs

| Feature Name | Development Motivation | Solution | | :--- | :--- | :--- | | Inspectable | I want to check static properties and method names by specifying a class in console.log() in the REPL. | Provides a dedicated class that organizes and outputs the internal structure just by inheriting it. | | MtimeCheck | I want to prevent "Update omissions" where the translation source file is updated but the translation destination remains old. | Provides a dedicated method/class/command to determine if an update is necessary by comparing the modification dates of two files. | | Replace | I want to easily update the execution results of commands in a file to the latest state. | Provides a dedicated method/class/command to replace content with the execution results of commands within comment tags. | | ClassMap | I want to easily visualize class relationships using mermaid. | Provides a dedicated method/class/command to generate mermaid format text from TSDoc. |

🚀 Installation

pnpm install docomet

💖 Quick Start

docomet focuses on "ease of use" and "implementation comfort" for developers.

Import

// REPL support (dynamic import)
const {docomet} = await import('docomet');

Inspectable

const {DocometInspectableObjectClass} = await import('docomet/docomet-inspectable');

class Sample extends DocometInspectableObjectClass {
  static staticPublicProperty = '';
  static #staticPrivateProperty = '';
  static get staticPrivateProperty() {return Sample.#staticPrivateProperty;}
  static set staticPrivateProperty(value) {Sample.#staticPrivateProperty = value;}
  static staticMethod() {}

  toJSON() {
    return {
      name: this.constructor.name,
    };
  }
}

| Class Output Result (Default) | Class Output Result (DocometInspectableObjectClass) | | :--- | :--- | | $ console.log(Sample);[class Sample] { staticPublicProperty: '' } | $ console.log(Sample);[class Sample] { propertyNames: [ 'staticPublicProperty' ], accessorNames: [ 'staticPrivateProperty' ], methodNames: [ 'staticMethod' ]} |

| Instance Output Result (Default) | Instance Output Result (DocometInspectableObjectClass) | | :--- | :--- | | $ console.log(new Sample());Sample {} | $ console.log(new Sample());{ name: 'Sample'} |

Mixin Based on Classes Other Than Object (Such as Array or Map)
const {DocometInspectable} = await import('docomet/docomet-inspectable');
const InspectableArrayClass = DocometInspectable(Array);
const InspectableMapClass = DocometInspectable(Map);

class SampleArray extends InspectableArrayClass {
  ...
}

class SampleMap extends InspectableMapClass {
  ...
}

MtimeCheck

Example command to check if xyz.log is newer than abc.log.

npx docomet-mtime-check -o abc.log -n xyz.log

| Output Type | Output Content | Description | | :--- | :--- | :--- | | Error | Outdated: {path} | The file is outdated. | | Error | NotFoundOlderPath: {path} | The source older file path does not exist. | | Error | NotFoundNewerPath: {path} | The destination newer file path does not exist. |

Replace

<!-- docomet:bash node -v -->
<!-- docomet:/bash -->

Example command to replace by executing the node version display command.

npx docomet-replace < <(cat replace_node_version.md)
<!-- docomet:bash node -v -->
vX.Y.Z
<!-- docomet:/bash -->

| Output Type | Output Content | Description | | :--- | :--- | :--- | | Log | Skipped: {path} | Skipped because there are no changes in the file content. | | Log | Replaced: {path} | Replaced with new content because there is a difference in the file content. | | Error | Unexpected: {tag} | The tag does not match. | | Error | Unclosed: {tag} | There is no closing tag. |

Basic Syntax

Analyzes and executes custom HTML comment tags.

It also recognizes tags within comments such as # or //.

<!-- docomet:TYPE[(LANGUAGE)] [ARGS...] -->
<!-- docomet:/TYPE -->

# <!-- docomet:TYPE[(LANGUAGE)] [ARGS...] -->
# <!-- docomet:/TYPE -->

// <!-- docomet:TYPE[(LANGUAGE)] [ARGS...] -->
// <!-- docomet:/TYPE -->

| Keyword | Description | | :--- | :--- | | TYPE | The type of operation to execute. | | (LANGUAGE) | The language identifier for the code block. | | ARGS... | Arguments required for TYPE.Specifiable values are described along with TYPE. |

If LANGUAGE is omitted, the execution result of TYPE is output as is.

<!-- docomet:bash node -v -->
<!-- docomet:/bash -->

<!-- docomet:bash node -v -->
vX.Y.Z
<!-- docomet:/bash -->

If LANGUAGE is specified, the specified string is output as the language identifier for the code block.

<!-- docomet:bash(text) node -v -->
<!-- docomet:/bash -->

<!-- docomet:bash(text) node -v -->
```text
vX.Y.Z
```
<!-- docomet:/bash -->

However, if none is specified, nothing is output.

Use this when you want to execute only the command without outputting the result.

<!-- docomet:bash(none) node -v -->
<!-- docomet:/bash -->

<!-- docomet:bash(none) node -v -->
<!-- docomet:/bash -->

TYPE List

bash

Outputs the execution result of the command specified in ARGS.

<!-- docomet:bash node -v -->
<!-- docomet:/bash -->

<!-- docomet:bash node -v -->
vX.Y.Z
<!-- docomet:/bash -->
file

Outputs the content of the file specified in ARGS.

<!-- docomet:file(javascript) sample.js -->
<!-- docomet:/file -->

<!-- docomet:file(javascript) sample.js -->
```javascript
const {DocometInspectableObjectClass} = await import('docomet/docomet-inspectable');

class Sample extends DocometInspectableObjectClass {
  static staticPublicProperty = '';
  static #staticPrivateProperty = '';
  static get staticPrivateProperty() {return Sample.#staticPrivateProperty;}
  static set staticPrivateProperty(value) {Sample.#staticPrivateProperty = value;}
  static staticMethod() {}

  toJSON() {
    return {
      name: this.constructor.name,
    };
  }
}
```
<!-- docomet:/file -->
ignore

ARGS is not required, and tags enclosed in ignore are ignored.

<!-- docomet:ignore -->
  <!-- docomet:bash node -v -->
  <!-- docomet:/bash -->

  <!-- docomet:file(javascript) sample.js -->
  <!-- docomet:/file -->
<!-- docomet:/ignore -->

ClassMap

Example command to generate a class map of the src directory.

npx docomet-class-map src

| Output Type | Output Content | Description | | :--- | :--- | :--- | | Error | NotFoundProject: {"entryPoints":[""],"rootPath":""} | The specified project does not exist. |

🗺️ Class Map

classDiagram
  namespace base {
    class DocometBuffer {
    }
    class DocometCount {
      static * down(count:number,start?:number) Generator&lt;number&gt;$
      static * up(count:number,start:number) Generator&lt;number&gt;$
    }
    class DocometEncoding {
      static readonly utf8 : string$
      static decode(buffer:DocometBuffer) string$
      static detectEncoding(buffer:DocometBuffer) string$
    }
    class DocometError {
      DocometError(...args:[message?:string,options?:ErrorOptions]) DocometError
      toJSON() string
      static new(...args:[message?:string,options?:ErrorOptions]) DocometError$
      static normalize(error:unknown) Error$
      static stringify(error:unknown) string$
    }
    class DocometStream {
      static async readAsync(stream:Readable) Promise&lt;string&gt;$
      static readLineAsync(stream:Readable,encoding:string) AsyncGenerator&lt;string&gt;$
      static async readLinesAsync(stream:Readable,encoding:string) Promise&lt;string[]&gt;$
      static async toBufferAsync(stream:Readable) Promise&lt;DocometBuffer&gt;$
    }
    class DocometString {
      static async detectEncodingAsync(string:string) Promise&lt;string&gt;$
      static escapeHtml(html:string) string$
      static joinLines(lines:string[],separator:string) string$
      static replace(string:string,map:DocometStringReplaceMap) string$
      static async splitLinesAsync(string:string,encoding:string) Promise&lt;string[]&gt;$
    }
  }
  namespace cli {
    class DocometCommander {
      baseCommandName() string &lt;&lt;getter&gt;&gt;
      command() Command &lt;&lt;getter&gt;&gt;
      static packageJson() DocometCommanderPackageJson &lt;&lt;getter&gt;&gt;$
      DocometCommander(baseCommandName:string) DocometCommander
      addHelpText(text:string) DocometCommander
      addOption(flags:string,description:string,required:boolean,defaultValue?:string,choices:string[]) DocometCommander
      toJSON() object
      toString() string
      static new(...args:[baseCommandName:string]) DocometCommander$
      static async runAsync(callback:DocometCommanderRunAsyncCallback) Promise&lt;void&gt;$
    }
  }
  namespace system {
    class DocometColor {
      static coloring(colorName:string,message:string) string$
      static names() string[]$
      static set(colorName:string,newFormatter:DocometColorFormatter) DocometColorFormatter$
    }
    class DocometDir {
      static async changeAsync(path:string,callback:DocometDirChangeCallback) Promise&lt;void&gt;$
    }
    class DocometFile {
      absolutePath() string &lt;&lt;getter&gt;&gt;
      path() DocometPath &lt;&lt;getter&gt;&gt;
      DocometFile(path:string) DocometFile
      read() string
      async readAsync() Promise&lt;string&gt;
      readLineAsync(size?:number) AsyncGenerator&lt;string&gt;
      async readLinesAsync(size?:number) Promise&lt;string[]&gt;
      toJSON() string
      toString() string
      async writeAsync(data:string|Uint8Array&lt;ArrayBufferLike&gt;|Readable) Promise&lt;void&gt;
      static async detectEncodingAsync(path:string) Promise&lt;string&gt;$
      static new(...args:[path:string]) DocometFile$
    }
    class DocometPath {
      base() string &lt;&lt;getter&gt;&gt;
      dir() string &lt;&lt;getter&gt;&gt;
      ext() string &lt;&lt;getter&gt;&gt;
      name() string &lt;&lt;getter&gt;&gt;
      static rootPath() string &lt;&lt;getter&gt;&gt;$
      DocometPath(dir:string,name?:string,ext?:string) DocometPath
      toJSON() string
      toPosixString() string
      toString() string
      with(updates:Partial&lt;#123;dir:string,ext:string,name:string#125;&gt;) DocometPath
      static absolute(path:string) string$
      static cwd() string$
      static doesNotExist(path:string) boolean$
      static exists(path:string) boolean$
      static findUp(name:string,startPath:string) string|undefined$
      static glob(patterns:string|string[],options?:Options) string[]|Entry[]$
      static async globAsync(patterns:string|string[],options?:Options) Promise&lt;string[]|Entry[]&gt;$
      static join(...paths:string[]) string$
      static joinPosix(...paths:string[]) string$
      static new(...args:[dir:string,name?:string,ext?:string]) DocometPath$
      static normalize(path:string) string$
      static parse(path:string) DocometPath$
      static rebuild(path:string,split:DocometPathSplit,join:DocometPathJoin) string$
      static relative(toPath:string,fromPath:string) string$
      static split(path:string) string[]$
      static splitPosix(path:string) string[]$
    }
    class DocometProcess {
      static logging : DocometLogging$
      static abort(message:string) void$
      static exit(code:number,message?:string) void$
      static getStdin(isTTY:boolean) Readable|undefined$
      static setupErrorHandlers() void$
    }
    class DocometStat {
      static checkMtime(olderPath:string,newerPath:string) void$
      static getMtime(path:string) Date|undefined$
      static needsUpdate(olderPath:string,newerPath:string) boolean$
    }
  }
  DocometBuffer -- DocometCount
  DocometStream --> DocometBuffer
  DocometStream --> DocometEncoding
  DocometString --> DocometEncoding
  DocometString --> DocometStream
  DocometCommander --> DocometError
  DocometCommander --> DocometFile
  DocometCommander --> DocometPath
  DocometCommander --> DocometProcess
  DocometDir --> DocometError
  DocometDir --> DocometPath
  DocometFile --> DocometEncoding
  DocometFile --> DocometPath
  DocometFile --> DocometStream
  DocometProcess --> DocometColor
  DocometProcess --> DocometError
  DocometProcess --> DocometStream
  DocometStat --> DocometError
  DocometStat --> DocometPath

📋 Class Summary

{
  base: {
    buffer: [class DocometBuffer] {
      propertyNames: [],
      accessorNames: [],
      methodNames: []
    },
    count: [class DocometCount] {
      propertyNames: [],
      accessorNames: [],
      methodNames: [
        'up',
        'down'
      ]
    },
    encoding: [class DocometEncoding] {
      propertyNames: [
        'utf8'
      ],
      accessorNames: [],
      methodNames: [
        'detectEncoding',
        'decode'
      ]
    },
    error: [class DocometError] {
      propertyNames: [],
      accessorNames: [],
      methodNames: [
        'stringify',
        'normalize',
        'new'
      ]
    },
    stream: [class DocometStream] {
      propertyNames: [],
      accessorNames: [],
      methodNames: [
        'toBufferAsync',
        'readLineAsync',
        'readLinesAsync',
        'readAsync'
      ]
    },
    string: [class DocometString] {
      propertyNames: [],
      accessorNames: [],
      methodNames: [
        'detectEncodingAsync',
        'replace',
        'escapeHtml',
        'splitLinesAsync',
        'joinLines'
      ]
    }
  },
  cli: {
    commander: [class DocometCommander] {
      propertyNames: [],
      accessorNames: [
        'packageJson'
      ],
      methodNames: [
        'runAsync',
        'new'
      ]
    }
  },
  system: {
    color: [class DocometColor] {
      propertyNames: [],
      accessorNames: [],
      methodNames: [
        'names',
        'set',
        'coloring'
      ]
    },
    dir: [class DocometDir] {
      propertyNames: [],
      accessorNames: [],
      methodNames: [
        'changeAsync'
      ]
    },
    file: [class DocometFile] {
      propertyNames: [],
      accessorNames: [],
      methodNames: [
        'detectEncodingAsync',
        'new'
      ]
    },
    path: [class DocometPath] {
      propertyNames: [],
      accessorNames: [
        'rootPath'
      ],
      methodNames: [
        'cwd',
        'findUp',
        'exists',
        'doesNotExist',
        'absolute',
        'relative',
        'normalize',
        'split',
        'splitPosix',
        'join',
        'joinPosix',
        'rebuild',
        'globAsync',
        'glob',
        'parse',
        'new'
      ]
    },
    process: [class DocometProcess] {
      propertyNames: [
        'logging'
      ],
      accessorNames: [],
      methodNames: [
        'setupErrorHandlers',
        'exit',
        'abort',
        'getStdin'
      ]
    },
    stat: [class DocometStat] {
      propertyNames: [],
      accessorNames: [],
      methodNames: [
        'getMtime',
        'needsUpdate',
        'checkMtime'
      ]
    }
  }
}

🤝 Contributing

Feel free to ask questions or consult on SNS.

Discord X

📜 License

Apache-2.0

❤️ Acknowledgments

Developed with the support of Google AI Studio and Gemini CLI.

Also supported by the power of wonderful open-source projects.

I sincerely thank all maintainers and contributors.

Other Tools

| Tool Name | Overview | | :--- | :--- | | vhs | A tool for describing terminal operation procedures in code (scripts) and generating high-quality GIF animations or videos. |