| Crates.io | mks |
| lib.rs | mks |
| version | 0.1.8 |
| created_at | 2025-12-09 10:59:48.069776+00 |
| updated_at | 2026-01-13 18:25:17.909549+00 |
| description | Paste tree from clipboard |
| homepage | https://github.com/cumulus13/mks |
| repository | https://github.com/cumulus13/mks |
| max_upload_size | |
| id | 1975302 |
| size | 31,912 |
mks β Create Directory Structures from Tree-like Textmks is a lightweight, cross-platform CLI tool that reads a directory structure in tree format (from clipboard or file) and automatically creates the corresponding folders and files.
Perfect for quickly scaffolding projects from shared diagrams, documentation, or terminal output.
tree output (with βββ, βββ, β)CON, NUL, invalid chars)cargo install mks
Use spaces or tabs for nesting (no special symbols needed):
my-app/
package.json
src/
index.js
utils/
helper.js
public/
style.css
tree Output (Unix-style)Copy directly from tree command in Git Bash, WSL, or Linux/macOS:
my-app/
βββ package.json
βββ src/
β βββ index.js
β βββ utils/
β βββ helper.js
βββ public/
βββ style.css
mksmks structure.txt
# Copy your tree text, then run:
mks
β Output:
Read from file (7 lines)
β
Creating structure...
β
Done!
Given this input:
blog/
posts/
first.md
config.yaml
mks will create:
blog/
βββ config.yaml
βββ posts/
βββ first.md
All files are empty (0 bytes) β ideal for scaffolding.
CON, PRN, AUX, NUL, COM1, LPT1, etc.) are blocked.< > : " / \ | ? *.)xclip or xsel is installed for clipboard support:
sudo apt install xclip # Debian/Ubuntu
mks never overwrites existing files.
If a file or folder already exists, it is skipped silently (no error).
To start fresh, run mks in an empty directory.
cargo build --release # As per your preference for executable name
cp target/release/mks /usr/local/bin
The tool uses the MIT License β free to use, modify, and distribute.
tree output:
tree my-project
βScaffold fast, code faster.β β
mks