DEV Community

Shubham Pawade
Shubham Pawade

Posted on

๐—ฆ๐—˜๐—š๐—ฅ๐—˜ ๐—ถ๐˜€ ๐—ป๐—ผ๐˜„ ๐—Ÿ๐—œ๐—ฉ๐—˜ ๐—ผ๐—ป ๐—ป๐—ฝ๐—บ - ๐˜†๐—ผ๐˜‚๐—ฟ ๐—บ๐—ฒ๐˜€๐˜€๐˜† ๐——๐—ผ๐˜„๐—ป๐—น๐—ผ๐—ฎ๐—ฑ๐˜€ ๐—ณ๐—ผ๐—น๐—ฑ๐—ฒ๐—ฟ ๐˜„๐—ผ๐—ปโ€™๐˜ ๐—ฏ๐—ฒ ๐—บ๐—ฒ๐˜€๐˜€๐˜† ๐—ฎ๐—ป๐˜†๐—บ๐—ผ๐—ฟ๐—ฒ.

If your ๐——๐—ผ๐˜„๐—ป๐—น๐—ผ๐—ฎ๐—ฑ๐˜€ ๐—ณ๐—ผ๐—น๐—ฑ๐—ฒ๐—ฟ ๐—น๐—ผ๐—ผ๐—ธ๐˜€ ๐—น๐—ถ๐—ธ๐—ฒ ๐—ฎ ๐—ฑ๐˜‚๐—บ๐—ฝ ๐—ผ๐—ณ ๐—ฃ๐——๐—™๐˜€, ๐—ญ๐—œ๐—ฃ๐˜€, ๐—ถ๐—บ๐—ฎ๐—ด๐—ฒ๐˜€, ๐—ฐ๐—ผ๐—ฑ๐—ฒ ๐—ณ๐—ถ๐—น๐—ฒ๐˜€, ๐—ถ๐—ป๐˜€๐˜๐—ฎ๐—น๐—น๐—ฒ๐—ฟ๐˜€, ๐—ฎ๐—ป๐—ฑ ๐—ฟ๐—ฎ๐—ป๐—ฑ๐—ผ๐—บ ๐˜€๐˜๐˜‚๐—ณ๐—ณ, Segre is built exactly for that problem.

๐—ง๐—ต๐—ฒ ๐—ถ๐—ฑ๐—ฒ๐—ฎ ๐—ฏ๐—ฒ๐—ต๐—ถ๐—ป๐—ฑ ๐—ฆ๐—ฒ๐—ด๐—ฟ๐—ฒ ๐—ฐ๐—ฎ๐—บ๐—ฒ ๐—ณ๐—ฟ๐—ผ๐—บ ๐—บ๐˜† ๐—ผ๐˜„๐—ป ๐˜€๐˜†๐˜€๐˜๐—ฒ๐—บ -
my Downloads folder was completely unmaintained, chaotic, and painful to navigate.
Instead of manually cleaning it every few weeks, I decided to build a CLI tool that does it properly and safely.

๐Ÿ”— npm : Link

๐Ÿ‘‰ npm install -g segre
๐Ÿ‘‰ segre ./foldername

โ†’ ๐—ช๐—ต๐—ฎ๐˜ ๐—ฆ๐—ฒ๐—ด๐—ฟ๐—ฒ ๐—ฑ๐—ผ๐—ฒ๐˜€

  • Automatically organizes files by category (Images, Documents, Code, Videos, Archives, etc.)
  • Supports date-wise organization (Year / Month structure)
  • Dry-run mode to preview changes
  • Undo feature to revert the last operation
  • Interactive mode to confirm each file move
  • Custom categories via JSON config
  • Verbose logging, progress bars, safe file handling

Basically:
Your dirty, messy Downloads folder (or any folder) will not be dirty anymore.

โ†’ ๐—ช๐—ต๐˜† ๐—œ ๐—ฟ๐—ฒ๐˜ƒ๐—ถ๐˜€๐—ถ๐˜๐—ฒ๐—ฑ ๐—ฎ๐—ป๐—ฑ ๐˜‚๐—ฝ๐—ฑ๐—ฎ๐˜๐—ฒ๐—ฑ ๐˜๐—ต๐—ถ๐˜€ ๐—ฝ๐—ฟ๐—ผ๐—ท๐—ฒ๐—ฐ๐˜
While improving Segre, I learned a lot beyond just adding features:

  • How to write proper docstrings that explain intent, not just logic
  • How to write documentation that other users can actually understand
  • Designing CLIs with safe defaults and rollback support
  • Thinking from a userโ€™s perspective, not just as a developer
  • Structuring a project like a maintained open-source tool, not a script
  • Writing Jest tests changed how I design functions - testability now drives my architecture. This update helped me understand that good software is not just about working code - itโ€™s about usability, clarity, and trust.

Would love feedback, suggestions, or feature ideas.

Connect with Me : LinkedIn

Top comments (0)