🔍 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.
It puts the "Q" into "FML".
Yes it was mostly vibe-coded, I've been meaning to write this for months and this way I finally got round to it.
⚠️ WARNING: This code is buggy as hell. Use at your own risk. Don't blame me when it deletes your homework or accidentally formats your hard drive. I'm still working on it, and by "working on it," I mean "not working on it very much at all because I don't have time right now".
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?
# 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)
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