I’ve been working really hard on a project called lua.console, it’s a console plugin for roblox studio. I’ve recently gotten the idea of a way for people to create their own custom commands. The way I set up lua.console, it’s very modular and easy to create new commands with the source files, but installing the commands are a bit tricky.
I might go for a system that requires people to submit a github repo of their command so I can verify and check the source files to make sure there isn’t anything malicious, but the real question is is it possible to “install” these module scripts from different games/comps?
I don’t want them already in the plugin, rather a person can run glass i [NAMEHERE] kind of like npm(glass being the name of my package manager)
Small note, the console system is already done I’m not looking for help doing that
I’ve looked into loadstring() but it seems dangerous and some games may have it disabled. This might be possible using HTTPService but as far as I know, you can’t.
I can’t use loadasset() because I believe you can only use that for things you have created yourself or ROBLOX has created.
I’m not looking for a full script, rather just a point to a service or system to achieve this.
Thanks but when testing it it seems to only work locally, if someone else wanted to install the inquered command, they’d have to copy the source code and run the dev installer.
You could take the node js approach and basically have a library of all these packages which just contain the source code of it. We can’t do it directly for (obvious) security reasons. (think of why exploiters use set function environment)
Hm yeah, but depending on amount of plugins that folder could be tremendously large, also I’d need to push out updates every time I wan’t to add a command for people to install, but I guess I have to if there is no other way…
Yes it would be possible. You would have to use HttpService to download the packages, and then store their content in a folder somewhere in server storage or replicated storage, depending on the use cases.
I’ve been working on this sort of idea. I have managed to have a require-able module with a child module containing current registered ‘libraries’, but that must be updated manually.
I came across a tutorial on making APIs, which would be the optimal solution, but if it could be accessed directly by GitHub API then I would go for that.
Existing package managers should be a testimony to the fact that yes you can. They aren’t exactly like npm but the principles are relatively the same. NevermoreEngine takes all packages in a GitHub repository and installs them, RoStrap is probably closer to npm (the plugin component at least).