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