updated 2026-11-26·6 min read
Starter Templates & Boilerplates
Copyable boilerplate starters for minimal extensions, MCP tool providers, SQLite relational storage extensions, and custom theme packages.
Copyable starter templates for a minimal UI extension, an MCP tool provider, a SQLite-backed extension, and a custom theme. Each one wires up TypeScript types, bundling, and SDK lifecycle cleanup.
1. Official Extension Starter Template Repository
The quickest way to build a Noether extension is using the official standalone starter template repository at yvliet/noether-extension-starter:
# Option 1: Create directly from GitHub's template engine
gh repo create my-noether-extension --template yvliet/noether-extension-starter --public --clone
cd my-noether-extension
# Option 2: Clone directly via Git
git clone https://github.com/yvliet/noether-extension-starter.git my-noether-extension
cd my-noether-extension
# Install dependencies and build
npm install
npm run build
The template comes pre-configured with:
- TypeScript & React JSX: Strict types using the host React runtime.
- esbuild Bundler: Fast, single-file compilation targeting
dist/main.js. - Sandbox Configuration: Automatically externalizes host packages (
noether,@noether/sdk,react,react-dom,zod). - GitHub Actions Publishing: Automated CI/CD workflow in
.github/workflows/publish.ymlthat builds and publishes releases to the Noether Turso Registry whenever a version tag (v*) is pushed.
2. Minimal Extension Starter
A minimal extension template registering an Action Rail icon, a Command Palette action, and a bottom Status Bar item.
manifest.json
{
"id": "minimal-extension",
"name": "Minimal Extension Starter",
"version": "1.0.0",
"minAppVersion": "0.2.0",
"description": "Clean foundation for building custom Noether UI and command extensions.",
"author": "Your Name",
"authorUrl": "https://github.com/yourname",
"tags": ["utility", "starter"]
}
package.json
{
"name": "noether-minimal-extension",
"version": "1.0.0",
"private": true,
"scripts": {
"build": "node build.js",
"watch": "node build.js --watch"
},
"devDependencies": {
"@types/node": "^22.0.0",
"@types/react": "^19.0.0",
"esbuild": "^0.25.0",
"typescript": "^5.7.0"
},
"peerDependencies": {
"noether": "^0.2.0"
}
}
tsconfig.json
{
"compilerOptions": {
"target": "ES2022",
"module": "CommonJS",
"moduleResolution": "node",
"jsx": "react-jsx",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"outDir": "./dist"
},
"include": ["src/**/*"]
}
src/main.ts
import React from 'react';
import { Extension, NoetherApp } from 'noether';
export default class MinimalStarterExtension extends Extension {
async onload(): Promise<void> {
console.log(`[${this.manifest.name}] Initialized.`);
// 1. Register Action Rail Icon (Left Toolbar)
this.addActionRailIcon(
'starter-action-btn',
'⚡',
'Trigger Starter Action',
(app: NoetherApp) => {
const title = app.vault.activeDocument?.title || 'No active note';
app.workspace.showToast(`Active document: "${title}"`, 'info');
}
);
// 2. Register Command in Command Palette (Ctrl+K / Cmd+K)
this.addCommand({
id: 'quick-action',
title: 'Minimal Starter: Run Quick Action',
hotkey: 'Ctrl+Shift+P',
action: (app: NoetherApp) => {
app.workspace.showToast('Starter command executed successfully!', 'success');
},
});
// 3. Register Status Bar Indicator (Bottom Bar)
this.addStatusBarItem({
id: 'starter-status',
alignment: 'right',
render: (app: NoetherApp) =>
React.createElement(
'button',
{
type: 'button',
onClick: () => app.workspace.showToast('Status bar clicked', 'info'),
},
'⚡ Ready'
),
});
}
async onunload(): Promise<void> {
console.log(`[${this.manifest.name}] Cleaned up.`);
}
}
build.js (esbuild bundler)
const esbuild = require('esbuild');
const isWatch = process.argv.includes('--watch');
const buildOptions = {
entryPoints: ['src/main.ts'],
bundle: true,
outfile: 'main.js',
format: 'cjs',
target: 'es2022',
external: ['noether', 'react', 'react-dom'],
sourcemap: 'inline',
};
if (isWatch) {
esbuild.context(buildOptions).then((ctx) => {
ctx.watch();
console.log('Watching for changes...');
});
} else {
esbuild.build(buildOptions).then(() => {
console.log('Build complete: main.js');
});
}
3. Model Context Protocol (MCP) Tool Provider Starter
A specialized extension template that exposes structured AI Agent tools to LLM copilots via Noether’s Model Context Protocol bridge.
manifest.json
{
"id": "mcp-tool-provider",
"name": "MCP Tool Provider Starter",
"version": "1.0.0",
"minAppVersion": "0.2.0",
"description": "Exposes structured query and note inspection tools to AI agent copilots.",
"author": "Your Name",
"authorUrl": "https://github.com/yourname",
"tags": ["ai", "mcp", "copilot"]
}
src/main.ts
import { Extension, McpToolResult, z } from 'noether';
export default class McpStarterExtension extends Extension {
async onload(): Promise<void> {
console.log(`[${this.manifest.name}] Registering MCP Copilot Tools...`);
// Register Structured Tool: search_notes_by_title
this.registerTool({
name: 'search_notes_by_title',
description: 'Search for markdown notes matching a title query in the active Vault.',
schema: z.object({
query: z.string().describe('Case-insensitive substring to match against note titles.'),
maxResults: z.number().optional().describe('Maximum number of notes to return (default: 10).'),
}),
handler: async ({ query, maxResults = 10 }, app): Promise<McpToolResult> => {
const needle = query.toLowerCase();
const notes = app.vault.documents
.filter((doc) => !doc.is_folder && doc.title.toLowerCase().includes(needle))
.slice(0, maxResults)
.map(({ id, title, updated_at }) => ({ id, title, updated_at }));
return {
content: [
{
type: 'text',
text: JSON.stringify(notes, null, 2),
},
],
};
},
});
}
async onunload(): Promise<void> {
console.log(`[${this.manifest.name}] MCP Tools unregistered.`);
}
}
4. SQLite Relational Storage Starter
Template demonstrating how to declare extension-scoped SQLite tables with this.defineTable(), execute typed CRUD calls, and subscribe to EventBus updates.
manifest.json
{
"id": "relational-storage-extension",
"name": "Relational Storage Starter",
"version": "1.0.0",
"minAppVersion": "0.2.0",
"description": "Dynamic SQLite schema management, index creation, and reactive event listeners.",
"author": "Your Name",
"authorUrl": "https://github.com/yourname",
"tags": ["database", "sqlite", "storage"]
}
src/main.ts
import { Extension, ExtensionTable } from 'noether';
interface ReadingProgressRecord {
documentId: string;
scrollPercentage: number;
completed: number;
lastReadAt: number;
}
export default class RelationalStorageExtension extends Extension {
private progressTable!: ExtensionTable<ReadingProgressRecord>;
async onload(): Promise<void> {
// 1. Declare extension-scoped SQLite table (physical table: ext_relational_storage_extension_reading_progress)
this.progressTable = await this.defineTable<ReadingProgressRecord>({
tableName: 'reading_progress',
version: 1,
columns: {
documentId: {
type: 'text',
primaryKey: true,
references: { table: 'documents', column: 'id', onDelete: 'cascade' },
},
scrollPercentage: { type: 'real', default: 0 },
completed: { type: 'integer', default: 0 },
lastReadAt: { type: 'integer', nullable: false },
},
indexes: [
{ name: 'idx_reading_progress_date', columns: ['lastReadAt'] },
],
});
// 2. Listen to document deletions to keep table clean
this.registerEvent(
this.app.events.on('document:deleted', async (event) => {
await this.progressTable.delete({ documentId: event.id });
})
);
// 3. Register Command to Mark Active Note Completed
this.addCommand({
id: 'mark-completed',
title: 'Mark Document Completed (Reading Progress)',
action: async (app) => {
const doc = app.vault.activeDocument;
if (!doc) return;
const existing = await this.progressTable.selectOne({
where: { documentId: doc.id },
});
if (existing) {
await this.progressTable.update(
{ documentId: doc.id },
{ completed: 1, scrollPercentage: 1.0, lastReadAt: Date.now() }
);
} else {
await this.progressTable.insert({
documentId: doc.id,
scrollPercentage: 1.0,
completed: 1,
lastReadAt: Date.now(),
});
}
app.workspace.showToast(`Marked "${doc.title}" as completed!`, 'success');
},
});
}
async onunload(): Promise<void> {
// Event listeners registered via this.registerEvent() are cleaned up automatically
console.log(`[${this.manifest.name}] Unloaded.`);
}
}
5. Custom Theme Starter
A ThemeDefinition JSON template customizing Noether surface, border, typography, and accent tokens. Import it under Settings -> Appearance -> Import JSON.
nordic-frost.json
{
"id": "nordic-frost",
"name": "Nordic Frost",
"author": "Your Name",
"mode": "dark",
"colors": {
"bgApp": "#242933",
"bgTopBar": "#242933",
"bgRibbon": "#282e39",
"bgSidebar": "#2e3440",
"bgSidebarHover": "rgba(255, 255, 255, 0.05)",
"bgSidebarActive": "rgba(136, 192, 208, 0.14)",
"bgMain": "#3b4252",
"bgCard": "#434c5e",
"bgCardHover": "#4c566a",
"bgPopover": "#2e3440",
"bgInput": "#2e3440",
"bgInputFocus": "#3b4252",
"bgTabActive": "#3b4252",
"bgTabHover": "#2e3440",
"bgStatusBar": "#2e3440",
"borderSubtle": "#3b4252",
"borderBase": "#4c566a",
"borderStrong": "#81a1c1",
"textPrimary": "#eceff4",
"textSecondary": "#d8dee9",
"textMuted": "#a5b1c2",
"textFaint": "#616e88",
"accent": "#88c0d0",
"accentHover": "#8fbcbb",
"accentActive": "#5e81ac",
"accentSubtle": "rgba(136, 192, 208, 0.16)",
"codeBg": "#2e3440",
"codeText": "#eceff4"
},
"customCss": ".ProseMirror h1 { color: var(--noether-accent); }"
}
6. Next Steps
- Explore the UI Extension Points to discover all action ribbons, command palette slots, and modal dialogs.
- Browse the Noether UI Components to preview live interactive buttons, text inputs, toggles, and setting cards.
- Learn about tool registration in Model Context Protocol (MCP) Tools.
- Review distribution rules in Developer Policies & Guidelines.