
skel
Scaffold a project by typing a tree.
A small bash utility. Type the file structure you want the way you'd sketch it on paper — indentation and all — and skel builds it.
brew install mark-mcdermott/skel/skelMIT · macOS & Linux · source
The idea
You type the tree. You get the tree.
You type
skel
$ skel > src > main > index.ts > renderer > App.tsx > styles > global.css > package.json > vite.config.ts > ▊
You get
tree
├── package.json ├── src │ ├── main │ │ └── index.ts │ └── renderer │ ├── App.tsx │ └── styles │ └── global.css └── vite.config.ts
Press enter on a blank line to finish. Directories are inferred from indentation, so you only mark the empty ones. It reads piped input and heredocs too — skel < structure.txt.
In motion
A minute of it working.
Install
Three ways in.
Homebrew
Recommended.
brew tap mark-mcdermott/skelbrew install skelInstall script
Installs to /usr/local/bin.
git clone https://github.com/mark-mcdermott/skel.gitcd skel && ./install.shMake
Same, via the Makefile.
git clone https://github.com/mark-mcdermott/skel.gitcd skel && make installSyntax
The whole ruleset.
- Two spaces per indent levelor set your own with -i N
- Directories end with / or are inferred from indentation
- Empty directories must end with /
- Paths stay relative/, ~ and .. are rejected
- No tabs, no blank lines, no duplicate paths
- Files are created relative to the current directory