Start typing to search packages!
microterminal
By @spacedice9
Roblox
MirroredMicroTerminal
A simple library that allows for the creation of GUI-less, CLI-like plugins in Roblox. To start, simply install the library, create a plugin and write the following code.
local MicroTerminal = require(path.to.MicroTerminal)
function command(runContext: MicroTerminal.RunContext)
print("Running command")
end
MicroTerminal.RegisterCommandToRobloxOutput("example", command)
If you then type --example (two dashes followed by a command prefix is the start of all commands in MicroTerminal) in the Command Bar, it will print Running command in the output. How neat is that?
MicroTerminal exposes many methods to parse commands. Take for example the command example --mode=17 ;Players;Player1.Character;Humanoid. To handle this, the function should use the RunContext object.
The "
;Players;Player1.Character;Humanoid" is an instance path, a way of representing Instances using a string. It resembles file paths in many computers but with;replacing/. In this case, it points to Player1's Humanoid.
function command(runContext: MicroTerminal.RunContext)
-- It is casted into a number automatically!
local mode: number = runContext:ContainsFlags(1, "--mode={number}")
-- The second parameter is used because the first one is just the command prefix
local parent: Instance = runContext:Param(2, "instance")
print("Using mode " .. mode .. " in Instance " .. parent.Name)
end
When typed into the Command Bar, the command would look like this.
--example --mode=17 ;Players;Player1.Character;Humanoid
Yes, I know the double dash used to start the command is weird here. It's just so errors aren't thrown when this is put into the command bar. A workaround I used was to have a
!at the start of every command prefix.
Documentation
Documentation is currently being worked on and is not complete. For now, refer to docs.md that serves as temporary documentation. For a more practical example, read examples/imp.server.luau which implements a toolbox and catalog asset importing plugin using MicroTerminal.
Using Rojo
Generated by Rojo 7.4.1.
Getting Started
To build the place from scratch, use:
rojo build -o "MicroTerminal.rbxlx"
Next, open MicroTerminal.rbxlx in Roblox Studio and start the Rojo server:
rojo serve
For more help, check out the Rojo documentation.
Package Details
Install command (Click to copy)
Version
1.0.4
License
MIT
Safe for commercial use
License identified from the packaged LICENSE file; the manifest declared none.
Automated license review — not legal advice.
