A self-contained script manager that lives inside TriliumNext. Install, update, and remove scripts, widgets, and render notes with a single click β no external tools, no CLI, no wrappers.
Terminology note: TriliumNext uses the official Trilium terms scripts, custom widgets, launch bar widgets, render notes, backend scripts and themes β there is no official "plugin" concept. This tool was previously called "Plugin Manager"; the docs now use the official terms.
Render Note β Fetch registry β Show cards β Install / Update / Uninstall
The Script Manager is a JS Frontend Render Note. On load, it fetches a registry (a JSON file hosted anywhere public), renders a card-based UI, and lets you install, update, or remove scripts/widgets.
Two installation methods:
| Method | How it works | Token needed? |
|---|---|---|
sourceUrl (recommended) |
Downloads the .js/.jsx source directly and creates a code note |
β No |
zipUrl (fallback) |
Downloads a ZIP for manual import via Options β Import | β Yes |
For the sourceUrl method, no ETAPI token is required β the script is created as a code note in one atomic backend call. No HTTP, no ZIP, no deadlock.
- Install scripts/widgets from a remote or local registry with one click
- Update detection β cards turn yellow when a newer version is available
- Uninstall β removes the script note cleanly
- Remote registry with automatic fallback to local note content
- Source indicator β shows remote/local source and last fetch time
- Dual mode β
sourceUrl(zero-config) orzipUrl(legacy) per entry - Inherits the active TriliumNext theme via CSS variables
Plugin Manager β Code note, MIME: application/javascript;env=frontend (paste the JS code)
βββ plugin-registry β Code note, MIME: application/json (registry JSON + config labels)
βββ Installed β Text note (receives installed scripts as child notes)
On plugin-registry:
| Label | Value | Required |
|---|---|---|
#pluginRegistry |
(no value β marks the note) | β |
#registryUrl |
URL to your registry.json |
optional |
On Installed:
| Label | Value | Required |
|---|---|---|
#installedPlugins |
(no value β marks the note) | β |
βΉοΈ
#etapiTokenand#triliumPortare no longer required when your registry usessourceUrlentries (recommended). They are only needed if you plan to install legacyzipUrl-based scripts.
- Create a Code note with MIME
application/javascript;env=frontend - Paste the contents of
trilium-plugin-manager-v4.js - Add a
~renderNoterelation pointing to the note where you want the panel to appear - Open the target note
Create a public GitHub Gist with a registry.json file. Copy the Raw URL and add it as #registryUrl on the plugin-registry note.
{
"plugins": [
{
"id": "weekly-planner",
"name": "Weekly Planner",
"version": "1.0.0",
"author": "your-github-username",
"description": "Weekly planning board with columns.",
"tags": ["productivity", "planning"],
"sourceUrl": "https://raw.githubusercontent.com/user/repo/main/planner.jsx",
"labels": [ { "name": "widget" }, { "name": "readOnly" } ],
"zipUrl": "https://github.com/user/repo/raw/main/planner.zip"
}
]
}| Field | Required | Description |
|---|---|---|
id |
β | Unique identifier β used to track installation state |
name |
β | Display name shown in the UI |
version |
β | Semver string (1.0.0) |
author |
Author name | |
description |
Short card description | |
tags |
Array of tag strings | |
homepage |
URL to the script's docs or repository β shows a "How to" button on the card | |
sourceUrl |
Raw URL to the .js/.jsx source file |
|
labels |
Array of { "name", "value" } applied to the created note in the single-file flow β e.g. widget, readOnly |
|
manifestUrl |
Raw URL to a manifest.json for multi-note scripts (see below) |
|
zipUrl |
Legacy URL to a Trilium export ZIP |
At least one of sourceUrl, manifestUrl or zipUrl must be provided.
A single .js or .jsx file. The Script Manager downloads it and creates one code note.
sourceUrl β download β create code note β done
For scripts that need multiple notes (widget + handler + config + render note). The manifestUrl points to a JSON file describing the notes to create:
{
"notes": [
{
"title": "My Plugin",
"type": "text",
"content": "Open this note to use the script.",
"children": [
{
"title": "My Plugin Code",
"type": "code",
"mime": "application/javascript;env=frontend",
"sourceUrl": "code.js"
},
{
"title": "My Plugin Config",
"type": "text",
"content": "Configure the script here."
}
]
}
],
"relations": [
{ "type": "renderNote", "from": "My Plugin", "to": "My Plugin Code" }
],
"labels": [
{ "note": "My Plugin Code", "name": "readOnly", "value": "" },
{ "note": "My Plugin Config", "name": "myPluginConfig", "value": "" }
]
}Each note can have a recursive children array: the parent note (e.g. the render note) is created first and the children (code, config, related notes) are created inside it, building a real tree in Trilium instead of flat notes. Notes with sourceUrl fetch the source file (relative to the manifest URL). Labels and relations from the manifest are applied automatically (labels/relations reference notes by title).
manifestUrl β download manifest β for each note: create + create its children β apply labels β create relations β done
Downloads the ZIP to the user's browser for manual import via Options β Import. Requires an ETAPI token.
- Downloads the manifest JSON
- Creates all notes described in the manifest
- Applies labels and
~renderNoterelations - β No token, no ZIP, no deadlock
- Backend downloads the source file via HTTPS
- Creates a
codenote with MIMEapplication/javascript;env=frontend - Sets
#pluginId,#pluginVersion,#pluginNamelabels - Applies
labelsfrom the registry entry (e.g.widget,readOnly) - β Done
- Downloads the ZIP to the user's browser
- User imports manually via Options β Import
On every load, the manager compares the version field in the registry against the #pluginVersion label on each installed note:
- Same version β green card,
β v1.0.0 - Registry is newer β yellow card,
β v0.5.0 β v1.0.0 - Not installed β default card + Install button
| File | Description |
|---|---|
trilium-plugin-manager-v4.js |
Main file β paste into a JS Frontend note |
trilium-plugin-manager-v4.html |
Legacy HTML version (kept for reference) |
registry.json |
Example registry with official scripts |
PLUGIN_DEV_GUIDE.md |
Guide for creating and publishing scripts |
MANIFEST_GENERATOR.md |
Fill-in-the-blank prompt to generate manifest.json |
- Script changelog field
- Startup update badge
- One-click "Export as script" helper note
MIT
π§π· Pix: ricardograca@ricolandia.com
π³ PayPal: Donate
π§‘ GitHub Sponsors: github.com/sponsors/ricolandia

