{"id":30000408,"url":"https://github.com/maxfleetdev/command-tool","last_synced_at":"2025-08-05T05:08:52.944Z","repository":{"id":307653787,"uuid":"1030213151","full_name":"maxfleetdev/command-tool","owner":"maxfleetdev","description":"Command Tool for executing any method from an inputted string for Unity 2019+","archived":false,"fork":false,"pushed_at":"2025-08-04T16:32:04.000Z","size":1338,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-04T19:58:48.672Z","etag":null,"topics":["command-tool","csharp","unity-6","unity-asset","unity-debugging","unity-development","unity-free","unity-package","unity-scripts","unity-tool"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/maxfleetdev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-01T09:12:01.000Z","updated_at":"2025-08-04T16:32:07.000Z","dependencies_parsed_at":"2025-08-04T19:58:49.074Z","dependency_job_id":null,"html_url":"https://github.com/maxfleetdev/command-tool","commit_stats":null,"previous_names":["maxfleetdev/unity-command-tool","maxfleetdev/command-tool"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/maxfleetdev/command-tool","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxfleetdev%2Fcommand-tool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxfleetdev%2Fcommand-tool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxfleetdev%2Fcommand-tool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxfleetdev%2Fcommand-tool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maxfleetdev","download_url":"https://codeload.github.com/maxfleetdev/command-tool/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxfleetdev%2Fcommand-tool/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268837794,"owners_count":24314982,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-05T02:00:12.334Z","response_time":2576,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["command-tool","csharp","unity-6","unity-asset","unity-debugging","unity-development","unity-free","unity-package","unity-scripts","unity-tool"],"created_at":"2025-08-05T05:03:23.935Z","updated_at":"2025-08-05T05:08:52.922Z","avatar_url":"https://github.com/maxfleetdev.png","language":"C#","readme":"# Command Tool for Unity 2019+\n\n## Important Note\nThis is an ongoing project, so expect changes. All code is not final and is subject to change. I am currently working on restructuring the repo to contain less git fluff\n\n## Planned Features\n- Command Settings Scriptable Oject (show logs, custom roles etc)\n- Automatic Command Registering (source code generator?)\n- Async for Executing/Registering\n- Attribute Flags (eg Hidden, Roles etc)\n- Role assignment and command permissions\n- Command Line Example\n- Abstraction for user customisation\n\n\n## Installation\n### Option A (GIT Package):\n1) Open Unity Package Manager\n2) Click '+' icon and select 'Install from git URL'\n3) Paste ```https://github.com/maxfleetdev/unity-command-tool.git``` into prompt\n4) Hit Enter/Click done\n5) Package will begin installing\n\n### Option B (Package):\n1) Download commander.unitypackage from latest release page\n2) Double click on downloaded file\n3) Unity will automatically install inside the open project\n\n## How To Use\n### Command Attribute\nCommands are assigned by using the \u003ccode\u003eCommand[...]\u003c/code\u003e attribute:\n```c#\n[Command(\"give\", \"Gives player an item using ID and Quantity\")]\nprivate void GiveCommand(int id, int quantity)\n{\n  ...\n```\nAttributes have many overloads, so you can provide descriptions, hidden commands, certain role access etc (working on improving with extra attributes)\n\nCommands can be assigned in any class, static or instanced (MonoBehaviour)\n- Static Command methods are registered on startup automatically by CommandRegistry\n- Instanced Commands methods **must** be registered on creation (Awake/Start etc)\n\n### Static Command Example:\n```c#\n[Command(\"give\", \"Gives player an item using ID and Quantity\")]\nprivate static void GiveCommand(int id, int quantity)\n{\n  AddItem(id, quantity);\n}\n```\n\n### Instance Command Example:\n```c#\nprivate void Awake()\n{\n  // Called Only Once\n  CommandRegistry.RegisterInstanceCommands(this);\n}\n\n[Command(\"give\", \"Gives player an item using ID and Quantity\")]\nprivate static void GiveCommand(int id, int quantity)\n{\n  AddItem(id, quantity);\n}\n```\n\n### Executing Commands\nTo execute commands, you simply pass the raw inputted string (eg \"give 192 1\") to the CommandExecuter class.\nThe CommandExecuter class automatically converts the string into 2 parts: The command name, and the arguments\n- The command name is what we are looking to invoke (eg give)\n- The arguments are the method parameters the command method takes (eg int id, int quantity)\n\nIt achieves this by converting the split string into each parameter Data Type. You can take a look inside CommandParser.cs for how it works.\n```c#\n// userInput = \"give 192 1\"\nprivate void OnInputSubmitted(string userInput)\n{\n  CommandExecutor.ExecuteCommand(userInput);\n  // Returns success - player recieves 1x of item ID 192\n}\n```\nIf the command is successful, a log will be created. Otherwise, a warning will appear notifying the user that the command was incorrect.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxfleetdev%2Fcommand-tool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxfleetdev%2Fcommand-tool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxfleetdev%2Fcommand-tool/lists"}