🔍 FMQL - File Management for People Who Talk to Databases
Because talking to your files like they're a database is totally normal.
What is this madness?
FMQL (File Manager Query Language) lets you use SQL (sort of) to manage your files.
Yes it was mostly vibe-coded, I've been meaning to write this for months and this way I finally got round to it.
SELECT * FROM ~/Documents WHERE size > 1000000 AND modified > '2025-01-01'
-- Translation: "Show me all those chonky files I created this year"
✨ Features That Will Make Your Files Feel Special
- SQL-like Querying:
SELECT * FROM ~/memes WHERE extension = 'jpg' AND name LIKE '%cat%'because who needs GUI file search when you can type a novel? - Slightly Fast: Traverses your filesystem faster than you can say "where did I put that file again?" ten times.
- Detailed File Info: Size, permissions, timestamps, and more. Like
ls -labut dysfunctional and with a bad attitude. - Sophisticated Sorting: By name, size, modified date, or type.
- Grouping Options: Group by extension, permissions, or name patterns.
- Recursive Listing: Who needs
fdwhen you can use fmql? (Everybody, actually.) - Multiple Output Formats: Text, table, or JSON. Text and table are basically the same so "two output formats" is more accurate.
🔧 Installation (No Magic Required)
# The easy way
# The less way
📚 Usage: How to Pretend Your File System is a SQL Server DB from 1989?
Basic File Listing (which will probably be deleted because ls, exa and eza are infinitely better)
# List files in current directory (boring, but effective)
# Show hidden files (where the real secrets hide)
# Detailed listing (for people who need to know EVERYTHING)
# Sort by size (big files first, because size matters)
# Recursively list directories (for brave souls)
SQL Mode (Because Why Not?)
# Find all text files in your Documents
# Find large images modified recently
# Find executable scripts (your personal army of automation)
# Update file permissions (because chmod is so 1970s)
🎮 Command Options
LS Mode Options
-a, --all: Show hidden files (the ones wearing invisibility cloaks)-l, --long: Use detailed view (for file stalkers)-s, --sort <OPTION>: Sort by:name,size,modified,type(the Sorting Hat for files)-r, --recursive: Recursively list directories (it's directories all the way down!)-t, --total: Show total size (how much disk space you're wasting)-g, --group-by <OPTION>: Group by:folder,extension,permissions, etc. (file segregation, but the ethical kind)-f, --format <FORMAT>: Output as:text,table,json(dress your output fancy)
SQL Query Stuff
FMQL understands these SQL-ish commands:
SELECT: Find files matching specific conditionsUPDATE: Modify file attributes (permissions, etc.)WHERE: Filter with conditions (=,>,<,LIKE,REGEXP)WITH RECURSIVE: Recursively search directories (prepare for deep dives)
Examples
# Find all your unfinished projects
# List all memes sorted by size
# Find screenshots from 3am
# Look for suspicious executables
🤝 Contributing
- Question your life choices
- Fork the repo
- Create your feature branch (
git checkout -b feature/amazing-idea) - Write code that doesn't make kittens cry
- Commit your changes (
git commit -m 'Added that thing everyone wanted') - Push to the branch (
git push origin feature/amazing-idea) - Open a Pull Request
- Wait anxiously for feedback while refreshing GitHub every 30 seconds
📜 License
MIT License - Feel free to use this for whatever you like