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 🙏

© 2025 – Pkg Stats / Ryan Hefner

flow-codemind

v1.0.0

Published

Flow-Codemind is a CLI tool to generate Mermaid flowcharts (.mmd) of your project's folder and file structure. Supports filtering, highlighting, sorting, and image export (PNG, JPG, SVG) using mermaid-cli.

Readme

Flow-Codemind - Auto Flowchart Generator Project Structure (🇺🇸)

Flow-Codemind is a tool to automatically scan the folder and file structure inside your project directory and generate a Mermaid (.mmd) flowchart depicting the folder and file hierarchy. The flowchart can also be exported to PNG, JPG, or SVG images using mmdc.

Main Features

  • Recursively scan folders up to a certain depth.
  • Filter files based on extension, minimum size, and excluded folder/file names.
  • Highlight files or folders containing specific keywords.
  • Sort by name, file size, or modification date.
  • Option to show files, folders, or both.
  • Display file sizes in human-readable formats (KB, MB).
  • Save the flowchart to a .mmd file.
  • Automatically export to image formats (PNG, JPG, SVG) using mermaid-cli (mmdc).
  • Custom colors for folders, regular files, and large files.
  • Option to automatically collapse folders in the visualization.

Usage Example

const flowchartGen = require('flow-codemind');

(async () => {
  const result = await flowchartGen.init('./', {
    baseName: 'MyProject',
    outputDir: './output',
    outputFile: 'project-structure.mmd',
  });

  console.log('Stats:', result.stats);
})();

Advanced Configuration:

const flowchartGen = require('./flow-codemind');
(async () => {
  const result = await flowchartGen.init('./', {
    baseName: 'MyProject',
    outputDir: './output',
    outputFile: 'project-structure.mmd',
    fileExtFilter: ['.js', '.json'],
    excludeNames: ['node_modules', '.git'],
    highlightKeywords: ['views'],
    exportImageFormat: 'png',
    sortBy: 'name',
    nodeType: 'both',
    minFileSize: 0,
    maxDepth: 5,
    showHidden: false,
    humanReadableSize: true,
    collapseFolders: false,
    folderColor: '#aaf',
    fileColor: '#faa',
    largeFileColor: '#f55',
  });
  console.log('Stats:', result.stats);
})();

Configuration Options

| Option | Type | Default | Description | | ------------------- | ---------- | -------------------------- | -------------------------------------------------------------------------------- | | baseName | string | Root folder name | The root node name in the flowchart. | | outputDir | string | . | Folder to save the generated flowchart file. | | outputFile | string | MyProject.mmd | Name of the Mermaid flowchart file. | | fileExtFilter | string[] | [] | Filter file extensions (e.g., ['.js', '.json']), empty means include all files. | | excludeNames | string[] | ['node_modules', '.git'] | Folders/files to exclude during scanning. | | highlightKeywords | string[] | [] | Keywords to highlight in file/folder names. | | exportImageFormat | string | undefined | Image export format: png, jpg, or svg. If unset, no export. | | sortBy | string | 'name' | Sort items by 'name', 'size', or 'date'. | | nodeType | string | 'both' | Show 'file', 'folder', or 'both'. | | minFileSize | number | 0 | Minimum file size in bytes to include. | | maxDepth | number | Infinity | Maximum folder scan depth. | | showHidden | boolean | false | Show hidden files/folders (starting with .) or not. | | humanReadableSize | boolean | true | Display file sizes in human-readable format (KB, MB) or bytes only. | | collapseFolders | boolean | false | Automatically collapse folders in the flowchart. | | folderColor | string | #f9f | Color for folder nodes. | | fileColor | string | #bbf | Color for regular file nodes. | | largeFileColor | string | #f99 | Color for large file nodes (>1MB). |


Output

  • Mermaid .mmd file viewable in Mermaid editors or tools like Mermaid Live Editor.
  • Exported .png, .jpg, or .svg images visually displaying folder and file diagrams.