Skip to content

obsidian/command-handlers/open-demo-vault-command-handler

Handles the “Open demo vault” command.

ClassDescription
OpenDemoVaultCommandHandlerA command handler that downloads and opens the plugin’s shipped demo vault in a new window. Only available on desktop — canExecute returns false on mobile, so the command is hidden there (no mobile notice). This module stays cross-platform-loadable so a plugin can register it directly without a platform guard: the desktop-only opener (which statically imports Node builtins) is loaded via a dynamic import() inside execute, which only ever runs on desktop.
InterfaceDescription
OpenDemoVaultCommandHandlerConstructorParamsConstructor parameters for OpenDemoVaultCommandHandler.