1.1.5 • Published 6 months ago
diryzer v1.1.5
🔍 Diryzer
A sleek command-line tool for analyzing directory contents with visual file type distribution.
✨ 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:
💻 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
🔧 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
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - 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