[v1.4.0] Introducing StudioCLI - Terminal & Built-In Git + Package Manager

How do we use this?
I am quite confused.

If you are familiar with the Terminal on your OS (cmd.exe on Windows, Terminal on macOS, etc), then this will be easy to use.

Otherwise, let me explain.

You are greeted with a terminal window and a blank prompt. You can type a command from the list of commands in the post to execute a specific task (mkdir to make a folder in the current directory, cd to change directories).

Is there any Git Get Started tutorials? I’ve kinda got confused on what to put in and what to do, I use Github Desktop, so I am not familiar with the git commands.

Also, if I want to download an existing game with scripts, how would I go about that?

The documentation provided in the post should be enough to get you started. If you want a really basic understanding of how Git works, you can search git basics on Google. Please note that I have altered the commands a slight bit.

I’m interested in the file import feature, as I’d love to sandbox it and potentially utilize it in my own programs. I saw your post from some time ago regarding unzipping a .zip archive file in luau, but upon perusing the Github source for the plugin, I noticed that you only use file:GetBinaryContents(), a built-in Roblox function. Did you ever successfully import the code for unzipping an archive into Roblox Studio, and if so, may I see it? Ideally, I’d want to be unzipping the archive when the game was run, not via a plugin, so it couldn’t use any secure methods only permitted for use in the command line & plugins. If you have not managed to import this feature into Roblox Studio, that’s totally fine - I can try to figure it out myself, but I figured “Why do it myself if someone else has already done it?”

Looking forward to hearing from you regarding this topic!

If I remember correctly, I did successfully implement the code for unzipping the content returned from :GetBinaryContents() in a test version of StudioCLI. However, I had planned on using it for a different purpose that was eventually discarded in favor of other projects but I can give it a look and polish it over the weekend.

My only question is why you would need this at runtime. If you plan on importing files at runtime and unzipping them, this isn’t possible as the only way to import a file is locked to the plugin/command bar security level (and storing the result of :GetBinaryContents() for use at runtime is inconvenient, to say the least).

I’ve had an idea similar to this for a while and have worked on a plugin in the past which is a dockable IDE that allows for importing modules without using require, like Python “import blablabla” and you could for example do “import(ModuleName)”.

However, I think this is probably a lot more useful than that, and comes with more useful features besides that, a lot of roblox scripters dont understand Bash so I think it would be a good idea to include documentation or something.

But overall, this is a really good plugin.

Did you use a Lexer/Tokenizer to color the text or did you use RichText or some other method?

1 Like

Why I would need this at runtime: Due to Roblox pushing updates that progressively limit developer’s privacy regarding source code, taking scripts with require(number) off of the Creator Marketplace, and a couple of other factors that I won’t go into detail about, I was considering uploading a zip folder’s binary contents to an online endpoint (or maybe just like a BIN file or something like that). I could then grab that content via HTTP Service, unzip its contents, and use a custom interpreter to basically loadstring() the code.

You provided a wonderful explanation for this in your other post, which I have screenshotted and will attach below:
image
“dependent on a webserver to receive the zip, parse it, and send back Lua-readable data.” Only change I’d make is that Roblox would do the unzipping instead of the web server.

1 Like

Technically, both. The lexer is used to separate letters into tokens and then RichText is applied to color them.

Could you export your games file to a github repo? Like if I want to export my game to github, then it will export it to github, so I don’t have to add the files manually.

If you mean uploading an rbxlx/rblx, no. But it can grab all the LuaSourceContainers and upload them based on their hierarchy in the DataModel.

Can you do Theme plug-in support in your StudioCLI like this?


[StudioCLI.Theme] = {
	["BackgroundColor"] = Color.fromRGB(0, 0, 0),
	["TextColor"] = Color.fromRGB(255, 255, 255),
	["DirColor"] = Color.fromRGB(255, 153, 51),
	["CommandColor"] = Color.fromRGB(255, 255, 102),
	["ArgsColor"] = Color.fromRGB(255, 255, 204),
	["StringColor"] = Color.fromRGB(51, 102, 153),
	["NumberColor"] = Color.fromRGB(0, 153, 51)
}

Btw i can help with User Interface too!

Would be neat if there was git add . like in the real terminal :fire: