A powerful CLI tool to find and analyze files by size, type, and lines of code
npm install perscrutari> A powerful CLI tool to find and analyze files by size, type, and lines of code.
Perscrutari (Latin for "to search" or "to investigate") is a command-line utility designed to help you discover large files, analyze code metrics, and manage your file system efficiently.
- Find files by size (minimum/maximum)
- Filter files by type (images, documents, code files, etc.)
- Count lines of code (excluding comments and blank lines)
- Detect duplicate files based on content
- Interactive mode for file management
- Export results to various formats
``bash`
npm install -g perscrutari
`bash`
npm install perscrutari
`bashShow help
pers --help
$3
| Option | Description | Example |
|--------|-------------|---------|
|
-w, --workdir | Directory to search | --workdir /home/user/projects |
| --min-size | Minimum file size | --min-size 10MB |
| --max-size | Maximum file size | --max-size 1GB |
| -c, --count | Limit results to top N files | --count 50 |
| -t, --types | Filter by file types | --types img,doc,code |
| --min-loc | Minimum lines of code | --min-loc 500 |
| --max-loc | Maximum lines of code | --max-loc 5000 |
| -d, --duplicates | Show duplicate files | --duplicates |
| -i, --interactive | Enter interactive mode | --interactive |
| -s, --sort | Sort by: size, loc, name | --sort loc |
| -o, --output | Export results to file | --output results.json |$3
- img:
.jpg, .jpeg, .png, .gif, .svg, .webp, .bmp, .ico
- doc: .pdf, .doc, .docx, .txt, .md, .odt, .rtf
- code: .js, .ts, .py, .java, .cpp, .c, .go, .rs, .php
- video: .mp4, .avi, .mov, .mkv, .flv, .wmv
- audio: .mp3, .wav, .flac, .aac, .ogg, .m4a💡 Examples
$3
`bash
pers --types img --min-size 5MB
`$3
`bash
pers --workdir ~/Downloads --duplicates
`$3
`bash
pers --types code --min-loc 1000 --min-size 100KB --count 20
`$3
`bash
pers --min-size 500MB --interactive
``Contributions are welcome! Please feel free to submit a Pull Request.
MIT License - see LICENSE file for details
Built with Node.js and Commander.js
---
✨ Created with AI