Skip to content

A developer-friendly NPM package that scans and exposes your project's folder structure as structured JSON. Comes with a built-in React frontend

License

Notifications You must be signed in to change notification settings

zyadamr-dev/Treefiy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Treefiy 🌳

MIT License CLI Version Fastify API

A lightweight, pluggable CLI and API tool for directory structure visualization and analysis.

📚 Table of Contents


🌟 Features

  • 📁 Multi-format Visualization: Generate trees in JSON
  • High Performance: Optimized directory traversal algorithms
  • 🟢 CLI Commands: Interactive commands
  • 📊 File Metadata: Display size, permissions, and modification dates
  • 🌐 Web UI: Browser-based visualization with React
  • 📡 REST API: Integration-ready HTTP endpoints

📥 Installation

Local Development (Contributors)

git clone https://github.com/zyadamr-dev/treefiy.git
cd treefiy
npm install
npm link  # Creates global symlink

Global install (Users)

npm install -g treefiy

🟢 Usage

treefiy <command> [options]

Example

treefiy gen-tree --pth=D:/projects --showSize=true --skipDirs=node_modules
  • For more info about how to use it you can excute command
treefiy help

🗂️ Project Structure

├── src/
│   ├── .config/               # App configuration & logging
│   │   ├── cached-config/     # Cached user configs
│   │   ├── cliStyleConfig.js  # CLI tree style formatting
│   │   ├── defaultConfig.js   # Default settings
│   │   └── logger.js          # Logger setup
│   ├── api/                   # Fastify API server
│   │   ├── functions.js       # Tree generation logic
│   │   └── server.js          # Fastify application
│   ├── cli/                   # CLI command dispatcher
│   │   ├── commands/          # Individual command modules
│   │   └── index.js           # Main CLI entry point
│   ├── constants/             # Shared constants (e.g., aliases)
│   │   └── cmdAlias.js
│   │   └── outFormat.js
│   ├── core/                  # Core functionality
│   │   ├── index.js           # Visualizer class & tree logic
│   │   └── ui/                # React frontend for visualization
│   └── utils/                 # Utility modules (spinner, config parser)
│       ├── spinner.js
│       ├── parseConfig.js
│       └── index.js
├── LICENSE
└── package.json

⛏️ Architecture

Component Diagram


✨ API Documentation

Endpoints

  • GET api/tree?pth=[dir]&showSize=true - Generate directory structure
  • GET api/config - View active configuration

🪪 License

MIT © 2025 — Zyad A.

About

A developer-friendly NPM package that scans and exposes your project's folder structure as structured JSON. Comes with a built-in React frontend

Resources

License

Stars

Watchers

Forks

Packages

No packages published