Creating a callback function that automatically updates Plugin files

I’m creating an Obsidian plugin for personal use (and for some colleagues), and I have not published it to the community plugin list. That said, every time I make an update to the plugin, I need to tell my colleagues to delete and reinstall the entire plugin, which has been somewhat frustrating.

Currently, I have the (updated) plugin stored in a fixed folder in my Obsidian vault. I’m wondering if there is a way so that, say I click on a ribbon icon, the old plugin files in

Obsidian Vault/.obsidian/plugins/myPlugin

get automatically replaced by the new plugin files in my Obsidian vault?

I understand that it may sound counter-intuitive for the plugin file to delete itself upon executing, I’m wondering if maybe I can write a separate plugin to control the file replacement? So far (as in my previous posts), I was able to move files in between folders in the vault, but how can I access the plugin folder (which is not in the vault)?

Have you looked at the BRAT plugin for managing beta plugins?