Resolves, searches and manages community plugins through Obsidian’s public plugin registry and store-install path.
Obsidian’s community-plugins.json is the authoritative source that maps a plugin id to its owner/name GitHub repository — the plugin manifest itself carries no repository. This module uses it to search the registry, to locate a plugin’s GitHub releases (e.g. to download its shipped demo-vault archive), and to install/uninstall/enable/disable an arbitrary community plugin — selected by either its id or its display name — via Obsidian’s own store path (app.plugins.installPlugin + enablePluginAndSave), so any dev/deploy or tooling flow can reuse it.
| Function | Description |
|---|
| configureCommunityPlugin | Writes settings into a community plugin’s data.json, shallow-merging them over any existing settings (creating the file if absent). Writing settings BEFORE the plugin is enabled makes it load already configured, with no reload. A no-op write is skipped: when the merge changes nothing, the file is left untouched and false is returned, so a caller can avoid reloading an already-correctly-configured plugin. |
| disableCommunityPlugin | Disables a community plugin (persisting the change) if it is currently enabled. Idempotent — a no-op when the plugin is already disabled. |
| enableCommunityPlugin | Enables a community plugin (persisting the change) if it is not already enabled. Idempotent — a no-op when the plugin is already enabled. |
| getCommunityPluginRepo | Resolves the owner/name GitHub repository of a community plugin from Obsidian’s public community-plugins.json registry. The registry is fetched once and cached on the shared plugin state for subsequent calls; a failed fetch is not cached, so a later call retries. |
| getLatestReleaseVersion | Resolves the latest release version (the release tag_name, a bare version such as 1.2.3) of a GitHub repository. |
| installCommunityPlugin | Installs a community plugin from the official store if it is not already installed. Idempotent — a no-op when the plugin is already installed. Resolves the plugin’s repository from Obsidian’s community registry, reads the latest release version and its manifest, and installs it through Obsidian’s own installPlugin path. |
| installConfigureEnableCommunityPlugin | Installs a community plugin, writes its settings, THEN enables it — in that order — so the plugin loads already configured (a plugin enabled before it is configured runs its onload with default settings and does nothing useful). If the plugin is already enabled and the settings changed, it is disabled and re-enabled so the new settings take effect. settings is optional: omit it for a plugin that needs no configuration. Composes installCommunityPlugin, configureCommunityPlugin, enableCommunityPlugin and disableCommunityPlugin. |
| searchCommunityPlugins | Searches Obsidian’s public community plugins registry, returning the id and display name of every plugin whose id, name, author or description contains the query (case-insensitive). An empty query matches every plugin. |
| toggleEnableCommunityPlugin | Enables or disables a community plugin to match the desired state. Delegates to enableCommunityPlugin / disableCommunityPlugin, so it is idempotent. |
| toggleInstallCommunityPlugin | Installs or uninstalls a community plugin to match the desired state. Delegates to installCommunityPlugin / uninstallCommunityPlugin, so it is idempotent. |
| uninstallCommunityPlugin | Uninstalls a community plugin if it is currently installed. Idempotent — a no-op when the plugin is not installed. |