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

structure-dump

v1.0.0

Published

CLI tool to generate a readable file structure tree for your project.

Readme

Structure Dump

npm version License: MIT

A simple CLI tool to generate a clean, readable file tree of your project.

structure-dump creates a formatted directory structure and saves it to a text file. It automatically ignores common internal folders like node_modules and .git, supports project-specific ignore rules, and provides flexible CLI options.


Features

  • Generates a readable tree structure

  • Automatically ignores:

    • node_modules
    • .git
    • .structuredumpignore
  • Respects .gitignore (enabled by default)

  • Supports custom ignore file: .structuredumpignore

  • Allows manual ignore via CLI

  • Option to include internal folders

  • Automatically excludes the generated output file (unless --include-internals or --all is used)

  • Supports full raw dump mode via --all


Requirements

  • Node.js >=16

Installation

Recommended (Project Local)

npm install --save-dev structure-dump

Run with:

npx structure-dump

Global Installation

npm install -g structure-dump
structure-dump

Usage

Basic

structure-dump

Creates:

structure-dump.txt

Custom Output File

structure-dump --output project-tree.txt

Short version:

structure-dump -o project-tree.txt

Manual Ignore

Ignore specific files or folders:

structure-dump --ignore dist,coverage,logs

Multiple flags also supported:

structure-dump -i dist -i coverage

Include Internals

Include .git, node_modules, and the output file:

structure-dump --include-internals

Disable .gitignore Respect

By default, .gitignore is respected.

To disable:

structure-dump --no-gitignore

Show Everything

Include all files and disable all ignore rules:

structure-dump --all

Short version:

structure-dump -a

This overrides:

  • Default internal ignores
  • .gitignore
  • .structuredumpignore
  • Manual ignore rules

CLI Options

| Flag | Description | | ------------------------ | ----------------------------------------------------------------- | | -o, --output <file> | Specify output file name | | -i, --ignore <pattern> | Ignore specific files/folders (comma-separated or multiple flags) | | --include-internals | Include .git, node_modules, and output file | | --no-gitignore | Disable .gitignore rules | | -a, --all | Show everything (override all ignore rules) |


Ignore Behavior (Normal Mode)

When --all is NOT used, ignores are applied in this order:

  1. Default internal ignores:

    • node_modules
    • .git
    • .structuredumpignore
  2. .gitignore (unless disabled)

  3. .structuredumpignore

  4. CLI --ignore entries

  5. Output file (unless --include-internals is used)


Example Output

├── bin
│   └── cli.js
├── package.json
├── README.md
└── src
    └── generateTree.js

Creating a Custom Ignore File

Create a file named:

.structuredumpignore

Add patterns similar to .gitignore:

dist
coverage
*.log

Why Structure Dump?

  • Quick project overview
  • Documentation support
  • Sharing folder structure
  • Debugging directory organization
  • Lightweight alternative to system tree

Development

Clone repository:

git clone https://github.com/whoisBugsbunny/structure-dump.git
cd structure-dump
npm install
npm link

License

MIT