{"id":13663524,"url":"https://github.com/peeweek/net.peeweek.console","last_synced_at":"2025-09-12T03:47:42.808Z","repository":{"id":49600249,"uuid":"130914966","full_name":"peeweek/net.peeweek.console","owner":"peeweek","description":"An interactive runtime console for unity available as package","archived":false,"fork":false,"pushed_at":"2021-06-13T07:03:16.000Z","size":1209,"stargazers_count":79,"open_issues_count":7,"forks_count":22,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-08-20T17:54:11.412Z","etag":null,"topics":[],"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/peeweek.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-04-24T21:18:59.000Z","updated_at":"2025-08-18T13:06:08.000Z","dependencies_parsed_at":"2022-09-09T20:11:45.347Z","dependency_job_id":null,"html_url":"https://github.com/peeweek/net.peeweek.console","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/peeweek/net.peeweek.console","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peeweek%2Fnet.peeweek.console","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peeweek%2Fnet.peeweek.console/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peeweek%2Fnet.peeweek.console/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peeweek%2Fnet.peeweek.console/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/peeweek","download_url":"https://codeload.github.com/peeweek/net.peeweek.console/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peeweek%2Fnet.peeweek.console/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274749883,"owners_count":25342225,"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-09-12T02:00:09.324Z","response_time":60,"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":[],"created_at":"2024-08-02T05:02:29.632Z","updated_at":"2025-09-12T03:47:42.764Z","avatar_url":"https://github.com/peeweek.png","language":"C#","funding_links":[],"categories":["C\\#","Game Development"],"sub_categories":["Unity Engine: Resources"],"readme":"# Console\n\n[![openupm](https://img.shields.io/npm/v/net.peeweek.console?label=openupm\u0026registry_uri=https://package.openupm.com)](https://openupm.com/packages/net.peeweek.console/)\n\nA (Idtech-like) console for use at runtime in your Unity Projects. The goal is to keep it as simple as possible. The console can register console commands to extend its possibilities. Console commands are easy to write and implement. There are some examples shipped with the base package.\n\nOh, and the console catches unity Logs.\n\n![Console Screenshot](https://github.com/peeweek/net.peeweek.console/raw/master/Documentation%7E/Screenshot.png)\n\n## Install\n\n### OpenUPM Scoped Registry (2020.1 and newer)\n\nOpen Project Preferences and go to Package manager Window.\n\nIf not present, add this scoped registry:\n\n* Name: **OpenUPM**\n* URL : `https://package.openupm.com`\n* Scopes : `net.peeweek`\n\nOnce added, you can close the project settings window.\n\nOpen Package manager (Window/Package Manager), select the Console package, and click the install button.\n\n### Local Package Install\n\nEither Clone the repository and reference the `package.json` in the Package Manager UI, or add directly this line to the `Packages/manifest.json` under `dependencies` : \n\n`\"net.peeweek.console\": \"https://github.com/peeweek/net.peeweek.console.git#1.4.0\",`\n\n## How to use\n\n* By default, a default console is spawned from the prefab when playing.\n* Press the Backslash `\\` key at runtime to toggle the Console (Can be customized if you use the package as local package)\n* Use the input field to input commands and execute button or return key to execute.\n\n## Customizing the Console Prefab\n\nIf you want to customize the console prefab, you can create a copy of the default prefabs into your `Assets/Resources` directory from your Project View's `Packages/Console/Resources` directory. There are two diffent prefabs, based on the input system you are currently using:\n * `Default_Console_LegacyInput.prefab` : Legacy Input System\n * `Default_Console_NewInputSystem.prefab` : New Input System Package\n\nAfter creating the copy, just rename the newly created asset, and remove the `Default_` prefix.\n\n### Navigation (Defaults)\n\n* Backslash to Open/Close console\n* Up/Down arrows to access type command history\n* PageUp/PageDown to scroll console log history\n\n### Built-in Commands\n\n* `help` : displays a list of all registered commands with summary\n* `help [command]` displays the `GetHelp()` string of given command.\n* `clear` clears the console output.\n\n### API Summary\n* `using ConsoleUtility;`\n* `Console.Log(\"Module\", \"Message\", LogType.Warning);`for a detailed log and coloration.\n* `Console.Log(\"Module\", \"Message\");`shortcut with `LogType.Log`.\n* `Console.Log(\"Message\");`Simplest one, without module.\n* `Console.AddCommand(command)`Registers one new command.\n\n## Writing Console Commands\n\nWriting console commands requires writing a Class that implements `IConsoleCommand` interface.\n\n* To manually register a console command use `Console.AddCommand(IConsoleCommand command)`\n* To set a console command to register itself automatically use the `    [AutoRegisterConsoleCommand]` class attribute\n\n### Console Command structure\n\n```c#\nusing System.Collections;\nusing System.Collections.Generic;\nusing UnityEngine;\n\nnamespace ConsoleUtility\n{\n    [AutoRegisterConsoleCommand]\n    public class MyConsoleCommand : IConsoleCommand\n    {\n        public void Execute(string[] args)\n        {\n\t     //use args array to parse command. args[] do not include the base command so in\n             // command 'mycommand foo bar' args[0] is foo and args[1] is bar\n        }\n\n        public string name =\u003e \"mycommand\"; \t\t// the actual command key\n        public string summary =\u003e \"Does soemthing\";\t// summary displayed when typing 'help'\n        public string help =\u003e \"usage: mycommand\"; \t// help displayed when typing 'help mycommand'\n\n        public IEnumerable\u003cConsole.Alias\u003e aliases\n        {\n\t    get\n\t    {\n                yield return Console.Alias.Get(\"myalias\", \"mycommand foo bar\");\n                // yield return any console alias you need, for ease of use purposes\n\t    }\n        }\n    }\n\n}\n\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeeweek%2Fnet.peeweek.console","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpeeweek%2Fnet.peeweek.console","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeeweek%2Fnet.peeweek.console/lists"}