mess is your fast, friendly command-line helper for whipping up directories and files. It keeps your project neat-ish without arcane syntax or ceremony.
Compared to older tools like mk, mess is more intuitive, flexible, and built for actual humans (also fixed a ton of old bugs mk had).
mess [-flags] <..|dir/|dir/file|file>[@<user>|%<perms>]...dir/→ Creates a directory and adds it to the stack. Everything created afterward goes inside it.file→ Creates a file in the current stack location.dir/file→ Creates the specified directory and file, but does not push the directory to the stack...→ Pops the last directory off the stack. Back up one level like a well-behaved script.@<user>→ Defines the user of the directory or file. Example:sudo mess dir@root/file@pato%<perms>→ Defines the octal permission of the directory or file. Example:sudo mess dir%0555/file
Tip: You can mash everything together:
mess dir@pato%555/ file1@root file2@testuser projects%0/
-hor--help: The "what does this flag do?" menu.-b <dir>or--base <dir>: Set the base working directory (default: your current pwd).-dor--dry: Dry run mode. No files harmed, just simulated structure.-eor--echo: Print out shell commands instead of creating anything. Similar to dry run, but less pretty.--loglevel <0-4>: How chatty should it be?0: 😶 Error only1:⚠️ Warnings2: ℹ️ Info3: 🐛 Debug4: 🧵 Trace everything. Yes, everything. Almost.
mess hello.txtDrops hello.txt in the base directory. Easy.
mess src/lib/components/Button.svelteCreates src/lib/components/ if it doesn't exist and create the file Button.svelte.
mess project/ docs/ README.md .. src/ index.jsCreates project/docs/README.md, goes up one level, and project/src/index.js.
Alternatively, you could simply do:
mess project/ docs/README.md src/index.jsNote: dir/file creates the file but does not push the directory to the stack.
~ $ mess -d notes/ day-1.md day-2.md day-3.mdSends you:
/home/<user>/notes/
├── day-1.md
├── day-2.md
└── day-3.md
~ $ mess -e cli/ cmd/goon/main.go internal/ modules/download.go testing/framework.go .. pkg/utils/commands.goShould spit out:
mkdir -p /home/<user>/cli/cmd/goon
mkdir -p /home/<user>/cli/internal/modules
mkdir -p /home/<user>/cli/internal/testing
mkdir -p /home/<user>/cli/pkg/utils
touch /home/<user>/cli/cmd/goon/main.go
touch /home/<user>/cli/internal/modules/download.go
touch /home/<user>/cli/internal/testing/framework.go
touch /home/<user>/cli/pkg/utils/commands.goBecause file and folder creation should be fast, flexible, and slightly entertaining. mess helps you build structure without building a headache.
The Unlicense: use it, break it, improve it. No strings attached.