Module returning empty table after registering items

This is my code, I register it and when i use “GetRegisteredCommands” it returns {}

local Main = {}
local CommandsModule = script

local Commands = {}
Main.cmds = Commands

function Main:Register(name: string)
	self.UID = UID
	Commands[UID] = self
	return self
end

(Long part of the code was hidden after the responde bc of privacy things)

Either UID is coming back nil, or you’re registering and reading commands from different environments. ModuleScripts are not shared between the client, server, and CLI (Command Line Interface)

ohhh, so if i register the command in a local script and then get registered commands on the studio cmd its separated?

Yes, that’s right. You’ve got it exactly