Plugins
...

installPlugin
...

Example:

app.plugins.installPlugin('TfTHacker/obsidian42-brat', '0.8.0', {id: "obsidian42-brat",
  name: "BRAT"});

To install & enable it,

await app.plugins.installPlugin('TfTHacker/obsidian42-brat', '0.8.0', {id: "obsidian42-brat",
  name: "BRAT"});
await app.plugins.enablePlugin("obsidian42-brat");
Note
  • This way you can even install a beta plugin that hasn't been accepted yet without BRAT!
  • This function also allows us to update or downdate the version of an already installed plugin.

uninstallPlugin
...

Example:

app.plugins.uninstallPlugin("obsidian42-brat");