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 🙏

© 2024 – Pkg Stats / Ryan Hefner

fsvz

v1.0.7

Published

A CLI utility to generate a console visualization, CSV or JSON output of a specified directory structure and the files therein.

Downloads

10

Readme

fsvz - Directory Structure CLI Tool

fsvz is a lightweight, dependency-free command-line tool built with Node.js for generating and displaying directory structures. It's designed to be simple and easy to use.

TODOs

  • add screenshot or a gif of it working in the README

Features

  • No External Dependencies: Built purely with Node.js built-in modules.
  • Customizable Output: Choose between simple and fancy tree-like console outputs, or export to JSON or CSV.
  • Pattern Ignoring: Ability to ignore files and directories based on a provided glob pattern.

Installation

You can install fsvz globally using npm by running the following command:

npm install -g fsvz

This allows you to use the fsvz command from anywhere on your system.

Usage

After installation, you can use the fsvz command in your terminal. Here are some ways to use this tool:

Basic Usage

To display the directory structure of the current directory, simply type:

fsvz

NOTE: For deeply nested hierarchies, it will take a while to display the entire structure. Although I've tested it with a few thousand files and directories, I have not tested it with extremely large directories. If you run into any issues, please let me know by opening an issue.

Fancy and Simple Outputs to the CLI

For an output that uses dashes instead of an ASCII tree-like structure, use the --simple or -s option:

fsvz --simple

Output to JSON or CSV, or to a File in "raw" format

To output the directory structure as JSON or CSV, use the --json or --csv options:

fsvz --json mytree.json # outputs the tree structure to a JSON file. You can also use the -j shorthand.
fsvz --csv mytree.csv # file extension is optional and automatically added if not provided

To output the raw tree structure to a file, use the --raw option:

fszv --raw mytree.txt # outputs the raw tree structure to a file, just as it would be displayed in the terminal

Ignoring Patterns

To ignore files or directories that match glob patterns, use the --ignore or -i options. For example, to ignore all node_modules directories, you can run:

fsvz --ignore="node_modules"

Or to ignore all files with the .js extension, you can run:

fsvz -i "*.js"

Or to ignore multiple patterns, you can separate them with commas or standard glob pattern syntax:

fsvz --ignore="node_modules,*.js"
fsvz -i "{node_modules|*.js}"

Help

For more information on all available options, use the help command:

fsvz --help

Example Output

Here is an example of what the default output might look like:

fsvz-project
├── node_modules
│   └── (contents ignored)
├── src
│   ├── index.js
│   └── utils.js
├── package.json
└── README.md

Contributing

Contributions are welcome! Please feel free to submit a pull request or open an issue if you have feedback, requests, or bugs to report.

License

fsvz is MIT licensed.