modly icon indicating copy to clipboard operation
modly copied to clipboard

Local Extension Installation

Open XPOL555 opened this issue 5 months ago • 6 comments

I think it would be a good idea to have a way to install extension being developed locally

XPOL555 avatar Jun 08 '26 00:06 XPOL555

But isn't it simpler to run setup.py if you install or modify it locally? Instead of doing a local installation from the UI? Which is exactly the same as running setup.py manually. If you modify other files besides setup.py, do you also do a local installation? Because that's a waste of time if you've modified other files besides setup.py. It's just a question, because from my point of view, it's not very useful.

DrHepa avatar Jun 08 '26 15:06 DrHepa

I think it can be useful for 2 scenarios:

  • local extension development without having to install the dev environment of entire modly
  • extension override (you grab and extension from GitHub but want to edit it a bit)

XPOL555 avatar Jun 08 '26 15:06 XPOL555

https://github.com/lightningpixel/modly/pull/172

Here you can see the implementation (just a simple synlink with reload option). Similar to the extension system in chrome

XPOL555 avatar Jun 08 '26 15:06 XPOL555

Thanks, I checked the PR code and I think I understand it better now. My confusion was around “install” vs “link + reload”.

From what I see, this is not the same as running setup.py. It links a local folder into Modly’s extensions directory using a symlink/junction, marks it as local, and reloads the extension registry.

So I can see the usefulness for extension development, especially if someone wants to work from a local extension repo without manually copying files into Documents/Modly/extensions.

In my own workflow, I usually work in repos/Tools/ and then copy only the specific modified files into Documents/Modly/extensions, running setup.py only when dependencies/setup changed. That is slower, but it avoids accidentally loading unfinished WIP changes into the Modly runtime.

With a linked local folder, every change in the local repo becomes part of the runtime immediately, which is great for fast iteration but can also expose experimental or unfinished changes if the repo is not kept clean.

So I think the feature is useful, but maybe the wording should be closer to “Link local folder” / “Reload local extension” rather than “Install locally”, because it does not replace setup/repair when dependencies change.

DrHepa avatar Jun 08 '26 16:06 DrHepa

Yes that was the idea because i was having the same workflow as yours, initially. I think we can improve this by mentioning in the next iteration/release in the documentation and maybe even move the button in a more "advanced" or "developer" settings section.

The scope was exactly what you said.

note: let's remember to close this once dev is merged (or new release)

XPOL555 avatar Jun 08 '26 16:06 XPOL555

Resolved by PR #172 (local extension installation via symlink + reload), merged into dev. Closing.

Lorchie avatar Jul 12 '26 23:07 Lorchie