https://github.com/devkcud/mess
mk reborn
https://github.com/devkcud/mess
Last synced: 6 months ago
JSON representation
mk reborn
- Host: GitHub
- URL: https://github.com/devkcud/mess
- Owner: devkcud
- License: unlicense
- Created: 2025-04-29T20:08:57.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-07-25T17:10:57.000Z (8 months ago)
- Last Synced: 2025-09-03T17:51:24.929Z (7 months ago)
- Language: Go
- Size: 51.8 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ๐งน mess
**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).
## ๐ Usage
```sh
mess [-flags] <..|dir/|dir/file|file>[@|%]...
```
### ๐ Behavior Rules
- `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.
- `@` โ Defines the user of the directory or file. Example: `sudo mess dir@root/file@pato`
- `%` โ 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/`
### ๐งฉ Flags
- `-h` or `--help`: The "what does this flag do?" menu.
- `-b ` or `--base `: Set the base working directory (default: your current pwd).
- `-d` or `--dry`: Dry run mode. No files harmed, just simulated structure.
- `-e` or `--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 only
- `1`: โ ๏ธ Warnings
- `2`: โน๏ธ Info
- `3`: ๐ Debug
- `4`: ๐งต Trace everything. Yes, everything. Almost.
## ๐ ๏ธ Examples
### ๐ Create a file
```sh
mess hello.txt
```
Drops `hello.txt` in the base directory. Easy.
### ๐๏ธ Nested directory + file
```sh
mess src/lib/components/Button.svelte
```
Creates `src/lib/components/` if it doesn't exist and create the file `Button.svelte`.
### โฌ
๏ธ Back up with ..
```sh
mess project/ docs/ README.md .. src/ index.js
```
Creates `project/docs/README.md`, goes up one level, and `project/src/index.js`.
Alternatively, you could simply do:
```sh
mess project/ docs/README.md src/index.js
```
Note: `dir/file` creates the file but does not push the directory to the stack.
### ๐ซฅ Dry run
```sh
~ $ mess -d notes/ day-1.md day-2.md day-3.md
```
Sends you:
```
/home//notes/
โโโ day-1.md
โโโ day-2.md
โโโ day-3.md
```
### ๐ญ Echo mode
```sh
~ $ mess -e cli/ cmd/goon/main.go internal/ modules/download.go testing/framework.go .. pkg/utils/commands.go
```
Should spit out:
```sh
mkdir -p /home//cli/cmd/goon
mkdir -p /home//cli/internal/modules
mkdir -p /home//cli/internal/testing
mkdir -p /home//cli/pkg/utils
touch /home//cli/cmd/goon/main.go
touch /home//cli/internal/modules/download.go
touch /home//cli/internal/testing/framework.go
touch /home//cli/pkg/utils/commands.go
```
## โจ Why mess?
Because file and folder creation should be fast, flexible, and slightly entertaining. **mess** helps you build structure without building a headache.
## ๐ License
[The Unlicense](LICENSE): use it, break it, improve it. No strings attached.