Roblox Package Manager

Overview

RPM is a package manager built for ROBLOX. It aims to encourage developers to share their code and helps other developers find and learn about existing code.

It comes in the form of a plugin which can be found and installed from the following URL. Roblox Package Manager - Roblox

I would encourage everybody to install it because I am certain you’ll find it very useful eventually.

Current Features

  • Download & install packages from GitHub repositories.
  • Require and use packages with ease.
  • Create packages with dependencies and many other features.
  • License your code to other developers.
  • View installed packages.
  • View documentation for installed packages.

How it works

Packages are required by their name which makes it very quick and easy to reference them in your script. When you download or require a package RPM automatically initializes itself in the current place.

https://i.gyazo.com/02cd988e1103767160c1535df247c7ca.mp4

Packages can also rely on other packages. RPM handles this too, it will install the package and anything that it depends on when you download it. This means that code can be reused, speeding up development time and ensuring the wheel is continuously reinvented.

Planned features

  • Download & install packages from Roblox models.
  • Discover packages created by others with ease.
  • Tools to help create a package on Roblox.
  • Basic packages pre-installed eg. custom events.
  • Configuration system (with UI) for packages.

Existing Packages

I have created a few packages on GitHub as a quick showcase of the plugin.

Creating a package

It’s very easy to create a package, just upload your files to GitHub and create a package.lua file

return {
	Name = "",
	Version = "0.0",
	Description = "",
	Author = {
		Name = "",
		UserId = 0,
		GitHub = "",
	},
	License = "",
	Main = "",
	Dependencies = {
		["Name"] = "githubUrl"
	},
	Repository = "",
	Platform = {
		Client = true,
		Server = true,
	},
}

Once you’ve done this, share the URL and users will be able to install your package into their roblox games.

Footnote

I am actively working on some other features but haven’t mentioned them because I am not sure how they will be implemented. Packages could potentially have the same name which creates issues when handling dependencies, any suggestions on a solution are welcomed. Version control is another issue, looking into solving this as well.

I’ll provide better documentation at a later stage.

As per usual feedback is always welcomed.

12 Likes

This is like NPM, which is something I absolutely adore. If anyone has ever coded in node.js and used npm, they would absolutely want this.

I’ll try to add my own packages later to this. (Just need to get ideas.)

EDIT: If this gets popular, I could help make a site for it, just like the npm’s site: https://www.npmjs.com/

3 Likes

This seems interesting. Not really a fan of the way things get required though.

And while I love Github, the integration here seems a bit weird.

I’m probably going to add some settings to change these things overtime. As Ninja mentioned it is currently based on npm.

As for the integration, what do you mean by weird?

Neat! This could be really useful. Some thoughts on this:

  • There doesn’t seem to be a way to only download a specific folder (or set of folders) instead of grabbing everything in the path given. It’d be nice to specify this in a Package.lua file at the root of the repository so one could just give the repository URL as a base and only certain directories are grabbed, if I’ve got some development tools or tests that don’t need to be distributed with the module code itself.
  • For resolving conflicting names you could use the package author’s name to provide extra detail, so for an ambiguous path where two users have created package genericPackageName you can require author1/genericPackageName or author1.genericPackageName. Since GitHub repository / username pairs are unique, this should eliminate ambiguity.
  • If you’re willing to tie into GitHub more you could base versions off of releases, with the added bonus of being able to pull a description in from each release.

I made a post about this; one of the largest takeaways from it was package discovery is the largest barrier to third-party package use. I’ve put some thought into this (and actually considered making a package manager) before; shoot me a PM if you want to talk more on that.

I actually did include something for this. If you specify an ignore table in the package then any files/folders you list won’t be included when the user downloads the repo.

As for the other things I’ll have a think and get back to you on them, but that’s what I was thinking too (you’ll notice packages get listed under their GitHub username already)

I got bored and tossed together a (kinda messy) proof of concept package directory (links are intentionally broken). Thoughts / opinions?

This is very good. I’ve been thinking about moving Nevermore into something like this for a long time.

I may steal your loading system definition (package.lua), and move Nevermore into this same system.

3 Likes

04/22/2017

I’ve just released the next iteration which allows you to view packages you currently have installed and features a slightly newer interface design.

1 Like

04/23/2017

  • You can now view documentation. Click on an installed package and it’ll display the readme file.
  • Default packages are installed automatically
  • Default packages can be installed from the explore tab.
  • Please remove all references from the old install and delete .RPM scripts in ReplicatedFirst and ServerScriptService. I have changed the initialization to require a module. (This won’t happen again)
2 Likes