1.1.5 • Published 6 months ago

diryzer v1.1.5

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

🔍 Diryzer

A sleek command-line tool for analyzing directory contents with visual file type distribution.

npm version License: MIT GitHub issues GitHub stars

✨ Features

  • 📊 Visual progress bar showing file type distribution
  • 🎨 Color-coded output for different file types
  • 🔄 Customizable directory depth scanning
  • 🚫 Pattern-based directory exclusion
  • 📈 Optional percentage display

🌟 Inspired By

GitHub's repository languages section - A visual representation of language distribution in repositories:

GitHub Languages

💻 Global Usage

npm install -g diryzer

Basic Command

diryzer <directory>

Options

Options:
  -V, --version              output the version number
  -e, --exclude <patterns>   patterns to exclude from analysis
  -d, --depth <number>       depth of subdirectories to analyze (default: "5")
  -h, --help                 display help for command

📝 Examples

Analyze current directory:

diryzer .

Exclude specific directories:

diryzer --exclude 'node_modules/**' '.git' .

Set scan depth:

diryzer --depth 3 .

🖥️ Example Output

Output

🔧 Programmatic Usage

To install diryzer as a development dependency in your project, run:

npm install diryzer --save-dev

You can then use it in your project scripts or directly in your code.

import { DirectoryAnalyzer } from 'diryzer';

const diryzer = new DirectoryAnalyzer({
  directoryPath: './my-project',
  depth: 5,
  excludePatterns: ['node_modules/**']
});

const result = diryzer.analyze();
/* result is Record<string, FileType>
  {
    ".js": {
      extension: ".js";
      count: 2; 
      percentage: 25; 
    }
    ... others
  }
*/

🤝 Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

  • Built with TypeScript and Node.js
  • Uses Commander.js for CLI interface
  • Chalk for colorful terminal output

🌐 Links


1.1.5

6 months ago

1.1.4

6 months ago

1.1.3

6 months ago

1.1.2

6 months ago

1.0.2

6 months ago

1.0.1

6 months ago

1.0.0

6 months ago