Start typing to search packages!
cmdr
By @myriadone
Roblox
MirroredCmdr - Enhanced Roblox Terminal System
A powerful and stable terminal interface for Roblox games, forked from evaera/Cmdr with significant improvements to UI stability, autocomplete functionality, and overall user experience.
Key Improvements
This fork includes extensive enhancements over the original Cmdr:
Autocomplete Enhancements
- Cursor-Following Autocomplete: Autocomplete menu now accurately follows the text cursor position
- Multiple Input Methods:
- Tab key for selection (original)
- Arrow keys (Up/Down) for navigation
- Mouse click support for direct selection
- Smart Positioning: Autocomplete repositions when terminal is dragged, staying aligned with input
- Improved Width Handling: Dynamic width calculation for long commands (up to 600px)
- Anti-Flicker: Position-only updates prevent scrollbar flickering during typing
- Screen Edge Detection: Smart repositioning when near screen boundaries
UI/UX Improvements
- Modern Header Design: Rounded top corners with proper visual hierarchy
- Proper Text Alignment: Fixed text cutoff issues in terminal output
- Responsive Sizing: Removed UIAspectRatioConstraint for better adaptability
- Sibling ZIndex Behavior: Changed from Global to Sibling for better GUI layering
- Clean Autocomplete Items: Removed number labels for cleaner appearance
Stability Enhancements
- Connection Management: Proper cleanup of all event connections to prevent memory leaks
- Defensive Programming: Extensive nil checks and error handling throughout
- TextService Caching: Optimized text measurements for better performance
- Debounced Toggle: Fixed toggle key spam issues with 100ms debounce
- GUI Duplication Prevention: Robust checks to prevent multiple Cmdr instances
Bug Fixes
- Fixed
GetCommandsMatchingmethod not found error - Fixed
PATHvariable hoisting issue (moved to proper scope) - Fixed
SetEnabledserver/client separation - Fixed
Consumedproperty error on InputObject - Fixed focus loss when clicking autocomplete items
- Fixed terminal output partial hiding on click
- Fixed CreateGui path resolution issues
Installation
Method 1: Model File (Recommended)
- Download the latest
.rbxmfile from the Releases page - Insert it into your game's
ServerScriptService
Method 2: Manual Setup
- Clone this repository
- Copy the
Cmdrfolder toReplicatedStorage - Create setup scripts:
Server Setup (in ServerScriptService):
-- CmdrServerSetup.server.lua
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Cmdr = require(ReplicatedStorage:WaitForChild("Cmdr"))
-- Register commands and initialize server-side components
Cmdr:RegisterDefaultCommands()
-- Add your custom commands here
Client Setup (in StarterPlayer/StarterPlayerScripts):
-- CmdrClientSetup.client.lua
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Cmdr = require(ReplicatedStorage:WaitForChild("CmdrClient"))
-- Configure client settings
Cmdr:SetActivationKeys({ Enum.KeyCode.Semicolon })
Cmdr:SetActivationUnlocksMouse(true)
Cmdr:SetHideOnLostFocus(true)
Cmdr:SetEnabled(true)
Configuration
Client Settings
-- Set activation key(s)
Cmdr:SetActivationKeys({ Enum.KeyCode.Semicolon }) -- Default: Semicolon
-- Mouse behavior when terminal opens
Cmdr:SetActivationUnlocksMouse(true) -- Default: false
-- Hide terminal when it loses focus
Cmdr:SetHideOnLostFocus(true) -- Default: false
-- Enable/disable the terminal
Cmdr:SetEnabled(true) -- Default: false
Creating Custom Commands
Commands are defined in ModuleScripts. Here's a simple example:
-- Commands/teleport.lua
return {
Name = "teleport";
Aliases = {"tp"};
Description = "Teleport to a player";
Args = {
{
Type = "player";
Name = "target";
Description = "Player to teleport to";
}
};
ClientRun = function(context, targetPlayer)
local character = context.Executor.Character
if character and targetPlayer.Character then
character:PivotTo(targetPlayer.Character:GetPivot())
end
end;
}
Features
Autocomplete System
- Smart Matching: Fuzzy search through available commands and arguments
- Type-Aware: Different autocomplete behavior based on argument types
- Visual Feedback: Hover effects and selection highlighting
- Keyboard Shortcuts: Quick selection without mouse
Command System
- Flexible Arguments: Support for various types (players, strings, numbers, etc.)
- Validation: Built-in argument validation and error messages
- Aliases: Multiple ways to invoke the same command
- Permissions: Built-in permission system for command access
Terminal Interface
- Command History: Navigate previous commands with arrow keys
- Rich Output: Colored text support for better readability
- Draggable Window: Reposition the terminal anywhere on screen
- Responsive Design: Adapts to different screen sizes
Architecture Changes
GUI Creation
- Moved to client-only initialization (no server-side GUI creation)
- Simplified parent assignment directly to PlayerGui
- Added comprehensive nil checks throughout
Event Handling
- Implemented
safeConnectwrapper for all connections - Proper cleanup methods in all modules
- Prevented event propagation issues
State Management
- Added
_initializedflag to prevent duplicate initialization - Proper state tracking for autocomplete visibility
- Debounced input handling for stability
Migration from Original Cmdr
If you're migrating from the original Cmdr:
- Update Setup Scripts: The initialization process has changed slightly
- Review Custom Commands: Ensure they don't rely on removed features
- Test Autocomplete: The behavior has changed significantly
- Check GUI Customizations: The GUI structure has been modified
Known Differences from Original
- Removed
PlaceNamefunctionality (was causing issues) - Changed default activation key behavior (more stable)
- Modified autocomplete selection behavior (more intuitive)
- Updated GUI styling (more modern appearance)
Performance Considerations
- TextService measurements are cached for efficiency
- Autocomplete updates use position-only updates when possible
- Event connections are properly managed to prevent leaks
- Defensive programming prevents unnecessary operations
Troubleshooting
Common Issues
Terminal won't open
- Ensure
Cmdr:SetEnabled(true)is called on the client - Check that activation keys are properly set
- Verify Cmdr is properly required on the client
Autocomplete not showing
- Check for errors in command definitions
- Ensure commands are properly registered
- Verify argument types are correctly defined
Multiple terminals appearing
- This should be fixed, but if it occurs, check for duplicate setup scripts
- Ensure initialization only happens once per client
Contributing
Contributions are welcome! Please ensure:
- Code follows existing patterns
- Proper error handling is implemented
- Changes are tested thoroughly
- Documentation is updated
License
This project inherits the MIT license from the original Cmdr project.
Acknowledgments
- Original Cmdr system by evaera
- Community contributors to the original project
For more detailed documentation on command creation and advanced features, refer to the original Cmdr documentation, keeping in mind the changes listed above.
Package Details
Install command (Click to copy)
Version
1.0.5
License
MIT
Safe for commercial use
Automated license review — not legal advice.
