Note Template Snippets · Obsidian plugin documentation

Note Template Snippets documentation

Note Template Snippets Obsidian plugin preview

Note Template Snippets lets you insert declarative Markdown templates and snippets from a vault folder with built-in tokens, interactive prompt fields, choice dropdowns, and optional Pro folder rules. It runs in pure TypeScript with zero JavaScript execution, so templates stay predictable and safe on both desktop and mobile.

Version 1.0.0. Requires Obsidian 1.13.4 or later. Works on desktop and mobile.

1 Installation

  1. Open Settings, then Community plugins, and turn off Restricted mode if needed.
  2. Select Browse, search for Note Template Snippets, and select Install.
  3. Turn on Note Template Snippets in your installed plugins list.
  4. Create a Templates folder in your vault (or point "Templates folder" in Settings to an existing folder) and add one or more .md files.

To install manually from a release, download main.js, manifest.json, and styles.css into <vault>/.obsidian/plugins/note-template-snippets/, then reload community plugins in Obsidian.

2 Getting started

Insert a template at the cursor

  1. Place the cursor in any Markdown note.
  2. Run "Note Template Snippets: Insert template snippet" from the Command palette.
  3. Filter by title or relative path and press Enter.
  4. Fill any {{prompt:...}} or {{choice:...}} fields, check the live preview, and select "Insert snippet".

Create a new note from a template

  1. Run "Note Template Snippets: Create note from template snippet".
  2. Pick a template, enter a note title, fill any fields, and select "Create note". Existing notes are never overwritten; a numeric suffix is added on name conflicts.

Set up automatic folder rules (Pro)

  1. Open Settings -> Note Template Snippets -> "Pro automation & library".
  2. Enter a folder (for example Projects/ADR) and a template path, then select "Add or update rule".
  3. Turn on "Auto-apply folder template rules". New empty notes in that folder expand automatically.

Chains, starter library, and JSON packs (Pro)

3 Features

Fuzzy snippet picker and built-in tokens

Store ordinary .md files inside your configured templates folder (default Templates). Run "Insert template snippet" from the Command palette to open a fuzzy picker that lists every template with its relative path, a single-line preview (skipping YAML frontmatter), and a badge showing how many interactive fields the template contains.

The engine expands built-in tokens deterministically with zero eval or script execution:

Token Output
{{date}} or {{date:YYYY/MM/DD}} Current date using your configured format or an inline format (YYYY, MM, DD, HH, mm, ss).
{{time}} or {{time:HH:mm:ss}} Current time using your configured format or an inline format.
{{title}} Active note basename or new note title.
{{folder}} Parent folder path of the target note, or an empty string at the vault root.
{{uuid}} UUID v4 value. Repeated {{uuid}} tokens in the same expansion share one generated ID.
{{cursor}} Removes the marker and places the editor cursor at that exact offset after insertion.

To include literal braces in a template, prefix the opening braces with a backslash such as \{{date}} or \{{prompt:Owner|Alex}}. Escaped tokens are never parsed as fields and render literally as {{date}}. Line endings (\r\n or \n) are preserved across expansion and insertion.

Interactive prompt and choice form fields

Add interactive fields directly inside any Markdown template:

When a template uses the same field more than once (for example {{prompt:Owner|Alex}} in frontmatter and again in the note body), the plugin asks for the value once and fills every occurrence. A live preview pane inside the modal shows the expanded Markdown before you insert at the cursor or create a new note via "Create note from template snippet".

Folder rules, snippet chains, starter library, and JSON packs (Pro)

Pro adds four workflow tools on top of the free engine:

Run "What pro adds" at any time to try interactive demos of all four Pro features on sample data before sponsoring.

4 Commands

Open the command palette and type the plugin name to see these commands. You can give each one a hotkey in Settings, Hotkeys.

Command Command id
Insert template snippet note-template-snippets:insert-snippet
Create note from template snippet note-template-snippets:create-note-from-snippet
Insert snippet chain note-template-snippets:insert-snippet-chain
Install starter template library note-template-snippets:install-starter-library
Snippet usage stats and JSON pack note-template-snippets:open-stats-and-pack
What pro adds note-template-snippets:what-pro-adds

5 Settings

Setting Default Description
Templates folder Templates Vault folder scanned recursively for .md template snippets.
Date format YYYY-MM-DD Default format for {{date}} tokens (YYYY, MM, DD, HH, mm, ss).
Time format HH:mm Default format for {{time}} tokens (HH, mm, ss).
Default new note folder (empty) Target folder for "Create note from template snippet". When empty, uses the active note folder.
Auto-apply folder template rules Off Pro. Automatically applies the longest matching enabled folder rule to newly created empty .md notes after workspace layout ready.
Folder template rules (empty) Pro. List of folder-to-template mappings.
Starter template library Action button Pro. One-click install of 8 practical Markdown templates into <templatesFolder>/Starter/.
Usage stats and JSON pack Action button Pro. Opens the local usage table and JSON pack export/import modal.
What pro adds Action button Opens interactive demos on sample data for all Pro features.

6 Privacy, payment and network

The core features are free. Pro features need a GitHub Sponsors sponsorship of theluckystrike: $5 a month or more, or $15 once. A total payment of $15 meets the payment requirement for Pro without further payment. Sign-in and the checks below still apply. Your notes stay readable and editable with or without Pro.

GitHub handles the payment. Sponsor at https://github.com/sponsors/theluckystrike. You need no account for the free features. Pro needs the GitHub account that sponsors.

Until you select "Sign in with GitHub" in the settings, Note Template Snippets makes no network requests. Sign in uses the GitHub device flow. Note Template Snippets sends its public client ID and the scope read:user to https://github.com/login/device/code and shows you a code. While you enter the code at https://github.com/login/device, it asks https://github.com/login/oauth/access_token every few seconds to check the sign-in status. The scope permits profile reads only. GitHub needs this access to show the sponsorship tier. It grants no repository scope and no write access.

After sign in, Note Template Snippets sends one query to https://api.github.com/graphql. It checks if the signed-in account sponsors theluckystrike. It asks for the tier and the total payment to theluckystrike. The plugin reuses a successful check for 7 days. Failed checks can retry after 6 hours. Select Refresh to request an earlier check. It sends no note content, file names or other vault data, and it has no telemetry.

After a successful check, Pro can work offline for up to 14 days. Sign out or a negative sponsorship answer turns Pro off. The plugin stores the GitHub token through the secret storage API of Obsidian. It does not put the token in its saved settings or its local sponsorship data. The local storage of this device keeps your GitHub login, the tier and the time of the last check. Sign out clears the token. You can also revoke the access in your GitHub settings, under Applications.

7 Questions and answers

Does Note Template Snippets execute JavaScript inside templates?

No. All token expansion and field parsing runs in a pure-TypeScript declarative parser with zero eval, Function, or shell execution.

Does it work on Obsidian mobile (iOS and Android)?

Yes. isDesktopOnly is false, all modals use native Obsidian controls, and no desktop-only Node APIs are used.

Will folder rules run during vault startup or sync?

No. The vault create listener is registered inside app.workspace.onLayoutReady(...), skips non-empty notes, skips files inside your templates folder, and uses an active-path recursion guard.

How do I include literal double braces in a template?

Prefix the opening braces with a backslash: \{{date}} renders as {{date}} without expanding.

Will importing a JSON pack or installing the starter library overwrite my existing templates?

No. Both skip existing files by default. JSON pack import also rejects absolute paths, .. traversal segments, control characters, and non-.md files.

8 Support

If you find a bug or have a feature request, open an issue on the Note Template Snippets GitHub repository. To see Pro options across NoteMods plugins, visit NoteMods Pro.

Note Template Snippets · Obsidian plugin documentation