Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

tree-noter

joisun20ISC1.0.1

A command-line tool that formats tree command output with aligned or decorated comments, making directory structure documentation more readable

tree, formatter, cli, comments, notation, documentation, directory-structure

readme

tree-noter

A command-line tool to format tree command output with aligned comments.

Installation

npm install -g tree-noter

Basic Usage (Aligned Style)

tree-noter [file] [options]

input.txt:

.
├── bin # Executable scripts
│   └── www # App entry point and server setup
├── public # Static assets
│   ├── images # Image files
│   ├── javascripts # Frontend JS
│   └── stylesheets # CSS files
│       └── style.css # Default stylesheet
├── routes # Route definitions
│   ├── index.js # Root path handler
│   └── users.js # /users route handler
├── views # Pug templates
│   ├── error.pug # Error page template
│   ├── index.pug # Home page template
│   └── layout.pug # Base layout template
├── app.js # App config and route setup
└── package.json # Project metadata and dependencies
$ tree-noter input.txt
.
├── bin                       Executable scripts
│   └── www                   App entry point and server setup
├── public                    Static assets
│   ├── images                Image files
│   ├── javascripts           Frontend JS
│   └── stylesheets           CSS files
│       └── style.css         Default stylesheet
├── routes                    Route definitions
│   ├── index.js              Root path handler
│   └── users.js              /users route handler
├── views                     Pug templates
│   ├── error.pug             Error page template
│   ├── index.pug             Home page template
│   └── layout.pug            Base layout template
├── app.js                    App config and route setup
└── package.json              Project metadata and dependencies


$ tree-noter -d input.txt
.
├── bin ---------------------------------------------- Executable scripts
│   └── www ---------------------------- App entry point and server setup
├── public ------------------------------------------------ Static assets
│   ├── images ---------------------------------------------- Image files
│   ├── javascripts ----------------------------------------- Frontend JS
│   └── stylesheets ------------------------------------------- CSS files
│       └── style.css -------------------------------- Default stylesheet
├── routes -------------------------------------------- Route definitions
│   ├── index.js -------------------------------------- Root path handler
│   └── users.js ----------------------------------- /users route handler
├── views ------------------------------------------------- Pug templates
│   ├── error.pug ----------------------------------- Error page template
│   ├── index.pug ------------------------------------ Home page template
│   └── layout.pug --------------------------------- Base layout template
├── app.js ----------------------------------- App config and route setup
└── package.json ---------------------- Project metadata and dependencies


$ tree-noter -d -s '👻'
.
├── bin 👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻 Executable scripts
│   └── www 👻👻👻👻👻👻👻👻👻👻👻👻👻👻 App entry point and server setup
├── public 👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻 Static assets
│   ├── images 👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻 Image files
│   ├── javascripts 👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻� Frontend JS
│   └── stylesheets 👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻� CSS files
│       └── style.css 👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻 Default stylesheet
├── routes 👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻 Route definitions
│   ├── index.js 👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻 Root path handler
│   └── users.js 👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻� /users route handler
├── views 👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻� Pug templates
│   ├── error.pug 👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻� Error page template
│   ├── index.pug 👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻 Home page template
│   └── layout.pug 👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻� Base layout template
├── app.js 👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻👻� App config and route setup
└── package.json 👻👻👻👻👻👻👻👻👻👻👻 Project metadata and dependencies

More Options

  • -o, --output <file>: Output file (uses stdout if not specified)
  • -d, --decorator [separator]: Use decorator style with optional separator (default: -----)
  • -g, --gap <width>: Gap between tree and comments (default: 30)
  • -c, --comment-marker <marker>: Comment marker to look for (default: #)
  • -w, --wrap: Enable comment wrapping for long comments
  • -m, --max-width <width>: Maximum width for output (auto-detects terminal width if not specified)
  • -i, --indent <spaces>: Spaces to indent wrapped comment lines (default: 2)