1. Docs
  2. Customise and extend

Plugins

How plugins extend Scaffold, the permission model that keeps them contained, and what is and is not available.

On this page

Plugins add commands, views and editor tools to Scaffold. They are the way to get behaviour that is too specific to belong in the core app. The design goal is simple: a plugin can only do what you have explicitly allowed.

What a plugin can add

Through the plugin SDK a plugin can contribute:

  • Commands that appear in the command palette and can be bound to a keyboard shortcut.
  • Views, for example a new panel in a sidebar.
  • Editor extensions that change how notes are edited or displayed.
  • Ribbon and toolbar actions.
  • Settings pages, and themes.
  • Listeners for events such as a note opening or the theme changing.

Permissions

Everything a plugin can reach is gated behind a named permission, and every permission starts switched off:

Permission Allows
vault:read Reading notes and metadata in your vault.
vault:write Creating and changing files in your vault.
network Making requests to the internet.
ui Adding interface elements.
commands Registering commands.

You see exactly which permissions a plugin asks for and grant them one by one. You can revoke a permission or turn a plugin off at any time.

Safe by default

  • The plugin system itself is off until you turn on the master switch in Settings.
  • Plugins are never installed, downloaded or run automatically.
  • A plugin that has not been granted a permission cannot use the capability behind it.

Treat plugins like any program you install: only enable ones from sources you trust, and read what they ask for.

What is not there

  • There is no plugin store or directory and no in-app browsing of community plugins. Plugins are files you obtain and install yourself.
  • Plugins are not reviewed or signed by Scaffold.

Writing a plugin

Plugins are written in TypeScript against the @scaffold/plugin-api package. The SDK documentation describes the manifest, the folder layout and the full API, and includes a sample plugin. Because Scaffold does not have a plugin registry, you share a plugin by sharing its folder.

For visual changes you often do not need a plugin at all: see Themes and CSS.