Your first template

The quickest way to understand Prefab is to build a small template and deploy it. This takes about five minutes and covers the whole loop: a structure, a placeholder, and a real folder on disk.

Build the template

Make a new template

Press ⌘NCtrl+N, or click the + beside Templates at the top of the sidebar. It arrives called "New Template", at the top of the list and already open. Click the pencil beside that name to rename it - "Client Project" will do.

Look at the folder you were given

A new template is not quite empty: the canvas holds one folder named {{project_name}}. Anything written between double braces is a placeholder, a question the template leaves for you to answer as it deploys. This one is already defined for you on the Placeholders tab, with the label "Project Name".

Add the folders you always make

Select the {{project_name}} folder so the new items go inside it, then add folders with the Folder button in the toolbar at the bottom of the canvas, or with the Quick Add shortcuts in the panel on the right. Three is plenty: Documents, Assets, Delivered.

Add a file with something in it

Add a file called Brief.md, select it, and switch its panel from Info to Content. Placeholders work inside file contents too:

# {{project_name}}

Started {{date}} by {{author}}

Click Save. {{date}} and {{author}} are built in, so Prefab fills those two without asking and without your having to define them.

A template with a top folder named with a placeholder and three subfolders inside it
A template with a top folder named with a placeholder and three subfolders inside it
The top folder's name is a placeholder, so every deployment gets a different one.
A placeholder has to be defined before Prefab will ask about it

Invent a new one - {{client_name}}, say - and Prefab lists it under Suggestions at the foot of the Placeholders tab, marked "Used in template but not defined". Press Create there. Skip that and the prompt never mentions it, and the folder is created with the literal text {{client_name}} in its name.

Deploy it to a real folder

Click Create… in the top right, or press ⌘DCtrl+D, and choose where the folder should go. Prefab asks for the values it needs - here, only the project name - then builds everything at once.

Why Prefab asks for permission

macOS keeps sandboxed apps out of your folders until you point at one yourself. Prefab asks where to put things rather than guessing. The first time you deploy somewhere, Prefab asks for access to that folder and remembers it afterwards.

Open the result in FinderFile Explorer. The top folder carries the name you typed, and Brief.md already has today's date and your name in it.

Where to go from here

That is the whole loop. The rest of Prefab makes it shorter:

  • Ways to deploy - drag a folder onto the app, use the menu barnotification area, or right-click in FinderFile Explorer. You need not open the window at all.
  • Value presets - save the values you type over and over, and apply them in one click.
  • Actions - have the template run git init, or open the folder in your editor, as it is created.
  • Watched folders - have a folder keep tidying itself after it is made.