Skip to content
skelv0.3.2
GitHub
The skel mascot, a small smiling skeleton

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/skel

MIT · 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/skel
brew install skel

Install script

Installs to /usr/local/bin.

git clone https://github.com/mark-mcdermott/skel.git
cd skel && ./install.sh

Make

Same, via the Makefile.

git clone https://github.com/mark-mcdermott/skel.git
cd skel && make install

Syntax

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