Skip to content

reloadPluginWithObsidianCli

Reloads a plugin in the running Obsidian through the Obsidian CLI, enabling it first when Obsidian does not know it yet.

The CLI exits with code 0 even when the command failed, and says so in its output (Vault not found., Error: ...), so the output is what is checked.

Import:

import { reloadPluginWithObsidianCli } from '@mnaoumov/obsidian-dev-toolkit/bundlers/obsidian-cli-reload';

Signature:

function reloadPluginWithObsidianCli(params: ReloadPluginWithObsidianCliParams): Promise<void>

Parameters:

Parameter Type Description
params ReloadPluginWithObsidianCliParams The ReloadPluginWithObsidianCliParams.

Returns: Promise<void> — A Promise that resolves once the plugin is reloaded.


Links to this page: