How to create a file from a template on Mac
You can do this with Note My. It ships forty starters — READMEs, licences, config files — with the year, your name and the date already filled in. Here is where they live and how to make them yours.
There is a small set of files you write over and over. A README that always opens with the project name and the year. A .gitignore you half-remember. A Dockerfile you copy out of the last project because retyping it from memory is worse. A licence you paste from a browser tab and then have to correct the year in.
Every one of those is a starting point, not a decision. Note My ships forty of them, in four groups, and the ones that carry a year, an author or a project name arrive with those parts already filled in.
Our template library works entirely on your Mac. Nothing is uploaded, there is no account to make, and neither the template you choose nor the file you write ever leaves the machine.
Two ways to open the catalogue
The catalogue is reachable from two places.
The first is the menu bar: File ▸ New from Template. A template you saved five seconds ago is already in it, so there is nothing to refresh and no restart to sit through.
The second is the Templates pull-down in the toolbar — the document glyph with a small plus, third along, and one of the toolbar items that carries a chevron. Its tooltip reads, verbatim: "New file from a template, save the current file as one, or insert a smart token", which is an accurate summary of everything the menu does.
The two lists always match. Nothing appears in one place but not the other, and there is nothing for you to keep in step. Use whichever is closer to your hand.
A starter opens as a document in a tab, ready to type into. It becomes a file on disk the moment you press ⌘S and give it a name, so save it into the folder it belongs in before you move on to the next thing.
Create the file
-
Open the catalogue
Choose File ▸ New from Template, or click the Templates item in the toolbar. The items are grouped: Documents, Licenses, Config, Languages, and — once you have saved one of your own — My Templates.
-
Pick the starter you want
Each entry names the file it is meant to become. README produces
README.md; GitHub Actions CI producesci.yml; Rust producesmain.rs. The name in the menu is the description; the filename is the intent. -
Check what filled itself in
The file opens ready to work in. Where a starter carries a year, a date or an author line, our template library has already put the real value there, so a licence arrives stamped with this year and credited to you before you have typed a character. Your project's name is the part that is yours to choose: it sits near the top as a plain stand-in word you can type straight over. Read the first few lines once, put your own name for the project in, and check that the author line credits you the way you want to be credited.
-
Start typing where the caret already is
Nearly every starter puts the caret at the point it is meant to be continued from — inside the function body, under the heading, after the first bullet — rather than at the top of the file where you would have to go looking for the right line. Nothing visible marks the spot; you simply start typing.
-
Save it
⌘S on a new document opens the save panel. Our advanced language identifier suggests a sensible extension for you, so the file reopens looking the way you wrote it. Type the name the template was aiming at and save it where it belongs.
A document you have not saved yet is still protected. Our auto-recovery safety net covers every tab, including ones that have never been saved to disk, so a starter you have begun filling in is not lost if the Mac restarts under you.
What the four built-in groups contain
| Group | Count | What is in it |
|---|---|---|
| Documents | 8 | README.md, CHANGELOG.md, CONTRIBUTING.md, CODE_OF_CONDUCT.md, SECURITY.md, PULL_REQUEST_TEMPLATE.md, and two issue forms — bug_report.md and feature_request.md |
| Licenses | 4 | MIT, BSD 3-Clause, ISC and an Apache 2.0 notice. All four produce a file called LICENSE, with no extension |
| Config | 10 | .gitignore, .editorconfig, Dockerfile, Makefile, a GitHub Actions workflow as ci.yml, docker-compose.yml, .env.example, tsconfig.json, package.json, pyproject.toml |
| Languages | 18 | One starter each for Swift, Python, JavaScript, TypeScript, HTML5, CSS, JSON, YAML, Markdown, Shell, C, C++, Java, Go, Rust, Ruby, PHP and SQL |
The Config group is the one most people underestimate. A .editorconfig and a .gitignore are exactly the files nobody remembers the syntax of and everybody needs at the start of a repository.
Colour follows the filename rather than the starter you picked. Our syntax engine colours fifteen code languages — Swift, Python, JavaScript, TypeScript, Java, C, C++, Ruby, HTML, CSS, PHP, Rust, Go, Kotlin and Shell — so a starter in any of those comes up coloured as soon as you save it under the name it was aiming at. Every other starter gives you a correct, well-formed file to begin from.
The parts that fill themselves in
Fourteen smart tokens exist. A starter may use any of them, and by the time the document is in front of you the work is already done: what you read is a real year, name or date rather than the token that produced it. The table below is worth a skim even if you only ever use the built-in starters, because the same tokens are what you reach for when you come to save a template of your own.
| Token | Becomes |
|---|---|
{{YEAR}} | The current four-digit year — so a file that carries it is never stamped with last year's date |
{{AUTHOR}} | The name you set in Settings ▸ Editing — set one there if your macOS account's full name is not how you want to be credited |
{{USER}} | Your short macOS login name |
{{PROJECT}} | A project-name placeholder, used only inside templates |
{{DATE}} · {{DATE_ISO}} | Today, long form, or as YYYY-MM-DD |
{{TIME}} · {{DATETIME}} | The time in 24-hour form, or the date and time as ISO 8601 |
{{UUID}} | A freshly generated lowercase UUID |
{{FILENAME}} · {{FILEBASE}} | The file's name, with and without its extension |
{{CURSOR}} | Nothing visible — it puts the caret where you are meant to start typing |
The ones you meet most are the caret marker, the author, the project name and the year. Between them they cover the licence header, the README title and the changelog date — most of what you would otherwise retype. Two further tokens, {{COMMENT}} and {{COMMENT_BLOCK}}, are editor actions rather than values: they insert a comment in the current language, or wrap the selection in one.
You can also insert a token by hand into any document, from Templates ▸ Insert Smart Token. Each value token has two entries there: the plain one inserts the finished value, and holding ⌥ switches it to the alternate that inserts the literal {{TOKEN}} text instead. That second form is how you build a template rather than use one. Expand Smart Tokens in Document then fills in every token in the document at once.
That pairing is worth practising. Write the file you keep rewriting, put the literal {{DATE}} or {{AUTHOR}} where the changing parts go, and save it as your own template.
Starting a file from the Finder instead
You do not have to be in the app. With the Finder extension enabled, right-clicking gives you a Note My ▸ submenu.
- Right-click a file and choose New File Beside This… ▸ to create a sibling in the same folder — an empty file, or one from the extension's own grouped list.
- Right-click the folder background, or a folder in the sidebar, and choose New File Here… ▸. The same menu also offers New File from Clipboard, which is the quickest route from something you have just copied to a file on disk.
Turn the extension on from page 8 of onboarding, or in System Settings.
Use the Finder route when you already know where the file goes, and the in-app catalogue when you want the full forty.
Making the catalogue your own
The forty built-in starters are where the library begins rather than where it ends. The same menu that opens them will take a document you have already written and stand it in the list beside them, which is how most people end up with a catalogue shaped around the work they actually do.
- Save what you keep rewriting. Save Current Document as Template… adds the open document to a fifth group, My Templates. It appears in the menu and in the toolbar pull-down immediately, ready to use on the next file.
- Adapt a starter instead of starting over. Create the file from whichever built-in is closest, change the parts that were never going to suit you — your house licence wording, the sections your READMEs always carry, the rules your
.gitignorealways needs — then save that as your own. Your version sits in the list alongside the one it grew out of. - Put the changing parts on rails. Insert a token with ⌥ held, from Templates ▸ Insert Smart Token, and the file keeps the literal
{{DATE}}or{{AUTHOR}}rather than today's value. Every file you make from that template afterwards arrives current. - Mark where the typing starts. A literal
{{CURSOR}}puts the caret at the line you always continue from — under the heading, inside the function body, after the first bullet — exactly as the built-in starters do. - Name it for the file it becomes. The built-ins follow that convention, and yours will read better in the list for following it too: Client Brief for a
brief.md, Deploy for adeploy.sh. - Clear one out when it has served its purpose. Hold ⌥ over one of your own in the list to reveal Delete "<name>".
A good test of a template is whether you can open it and go straight to the first sentence that is genuinely yours. If you are still deleting last year's date or correcting an author line, there is a token for that part and it belongs in the file.
Everything under My Templates stays on your Mac, in Note My's own support folder. There is no account behind the library and nothing is uploaded, so a template carrying your employer's licence header, a client's name or the shape of a project you have not announced is safe to keep there.
Troubleshooting
Reaching the full catalogue from the Finder
The Finder submenu carries a short list of its own, kept brief on purpose so you can hit the starter you want on the way past, without reading a menu. When you want the full forty, or anything you have saved under My Templates, start from the app instead: File ▸ New from Template, or the Templates pull-down in the toolbar. Both routes write the same text into the same kind of document, so it is only a question of which list is quicker to walk at that moment.
A token came through as literal {{…}} text
Three causes. The token name is not one of the fourteen, in which case it is left exactly as you wrote it rather than blanked — nothing of yours is quietly deleted. Or the file contains the escape form \{{X}}, which gives you a literal {{X}} without the backslash. Or you inserted it with ⌥ held, which is the alternate that inserts the literal on purpose.
I want the caret somewhere else
The file is yours from the moment it opens, so click where you would rather begin and type. If it is a starter you use daily, it is worth spending a minute on your own version: create the file, put a literal {{CURSOR}} at the line you always continue from, and save it under My Templates. Every file you make from it afterwards opens with the caret exactly there.
Getting colour onto a file you have just created
Colour arrives with the filename. Save the document under the name the starter was aiming at — main.rs, main.swift, styles.css — and our advanced language identifier picks it up. To see what it settled on, or to choose for yourself, click the Identify pill in the status bar: the Language Inspector names the language and lets you set a different one by hand.
The file has not appeared in the Finder yet
Creating a file from a template inside the app hands you a document in a tab first, which is the useful order: you can rename the project, cut a section you never use and settle on the filename before anything is written to disk. Press ⌘S, choose the folder, and it lands exactly where you put it. When you would rather the file exist in the folder from the outset, start from the Finder instead — New File Here… writes it at that path immediately, with no save panel in between.
Frequently asked questions
What is the quickest way to open the template catalogue?
Whichever of the two routes is closer to your hand. The Templates pull-down sits in the toolbar, third along, so the full list is one click from the document in front of you; File ▸ New from Template reaches the same list from the menu bar. ⌘N stays reserved for a blank document, which is the one you want when you already know what you are writing.
Can I add templates of my own?
Yes. Save Current Document as Template… in the same menu adds the open document to a fifth group called My Templates, which then appears in both the menu and the toolbar list. Hold ⌥ over one of your own templates to reveal Delete "<name>".
Will a new file be stamped with the current year?
Wherever a starter carries {{YEAR}}, yes — you get the current four-digit year, never the year the template was written. That is the reason to take a licence from the catalogue rather than an old project. {{AUTHOR}} is filled in alongside it, from the name in Settings ▸ Editing.
How do I keep a literal {{TOKEN}} in a file?
Write it as \{{TOKEN}}. The backslash does not appear in the finished file; the braces and the name do. This matters when the file you are writing is itself a template for some other tool that uses the same brace syntax.
What does the SQL starter give me?
A correct query.sql to begin from, so the first thing you type is the query rather than the scaffolding around it. Save it under the name your project expects and it reopens exactly as you wrote it. The Markdown, JSON and YAML starters work the same way: a well-formed file, waiting for the part only you can supply.
Where are my saved templates kept?
On your Mac, in Note My's own support folder. They are never uploaded and there is no account behind them, so they stay on the machine that made them.