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

fsmap-cli

v1.0.2

Published

πŸ“ CLI to visualize and export the file structure of any folder or GitHub repo

Readme

πŸ—‚οΈ fsmap β€” Visualize Folder Structures from Local or GitHub Repos

fsmap is a powerful CLI tool that scans any directory (local or remote GitHub repo) and visualizes its folder structure in a clean, tree-like format.

Supports output as text, markdown, JSON, and even integrates file size, modified dates, and Git status.


πŸ“¦ Features

  • πŸ“ Visualize any local folder structure
  • 🌍 Fetch and display GitHub repo structure via --repo
  • 🧹 Smart one-repo caching system (reuse if same repo, delete if not)
  • πŸ’Ύ Show file sizes (--show-size)
  • πŸ•’ Show last modified dates (--show-date)
  • πŸ§‘β€πŸ’» Show Git status (--show-git)
  • πŸ“ Output as: text (default), markdown, JSON, or HTML
  • πŸ“„ Save output to a file
  • πŸ” Works recursively with depth control

πŸ› οΈ Installation

(Global)

npm install -g fsmap-cli

(Local)

npm install -D fsmap-cli

πŸš€ Usage

(Global)

fsmap [path] [options]

(Local)

npx fsmap [path] [options]

By default, it scans the current directory (.).


πŸ“ Scan a local folder

fsmap . --depth 2 --show-size --show-date

🌐 Scan a remote GitHub repo

fsmap --repo user/repo

πŸ’Ύ Export as markdown

fsmap . -o markdown > structure.md

πŸ“ Save output to a file

fsmap . --output-format json --output-file structure.json

πŸ“‘ Example Output (Text)

fsmap . --depth 1 --show-size --show-date
fsmap
└── dist (4.2 KB) [2025-05-23]
└── package.json (894 B) [2025-05-23]
└── src (7 files)

πŸ”§ Available Options

| Option | Description | |---------------------------|-----------------------------------------------------------| | -d, --depth <n> | Limit recursion depth | | -e, --exclude <names> | Comma-separated list of folders/files to exclude | | --show-size | Display file sizes | | --show-date | Display last modified date | | --show-hidden | Include hidden files and folders | | --show-git | Display Git status (modified, untracked, ignored) | | -o, --output-format | Output format: text (default), markdown, json | | --output-file <path> | Save the output to a file instead of printing to console | | --repo <user/repo> | Clone and scan a GitHub repository | | --dry-run | Show scan result without writing anything | | -v, --version | Show version info | | -h, --help | Show help info |


🧠 Repo Caching Behavior

  • βœ… If you scan the same repo again β†’ uses cached clone
  • πŸ” If you scan a different repo β†’ deletes old repo, clones fresh
  • πŸ’‘ Only one repo is ever cached at a time for performance and clarity

βš™οΈ Config

Add a fsmap.config.json file in your project root to override the default options.

Example:

{
    "$schema": "https://raw.githubusercontent.com/SwasthK/fsmap/main/fsmap.schema.config.json",
    "exclude": [
        "node_modules",
        ".git",
        "dist"
    ]
}

_NOTE: Cli written options override the config rules.


πŸ›  Plugin Support

Add a fsmap.config.ts file in your project root to transform or extend the file tree output.

Example:

module.exports = {
Β  Β  transform(entry: FsMapEntry) {
Β  Β  Β  Β  if (entry.name.endsWith("git.ts")) {
Β  Β  Β  Β  Β  Β  entry.name = "πŸ§ͺ " + entry.name;
Β  Β  Β  Β  }
Β  Β  Β  Β  return entry;
Β  Β  }
}

🀝 Contributing

Found a bug? Have a feature idea? PRs are welcome β€” open an issue first!


πŸ“„ License

MIT


✨ Author

Made with ❀️ by Swasthik