{"id":19703528,"url":"https://github.com/lukencode/netbash","last_synced_at":"2026-03-08T01:32:02.248Z","repository":{"id":2004871,"uuid":"2938587","full_name":"lukencode/NetBash","owner":"lukencode","description":"Drop in console interface for running commands in web applications","archived":false,"fork":false,"pushed_at":"2012-11-01T22:40:41.000Z","size":8267,"stargazers_count":91,"open_issues_count":8,"forks_count":16,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-04-12T19:16:09.421Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"caolan/async","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lukencode.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-12-08T07:47:22.000Z","updated_at":"2024-11-28T16:29:25.000Z","dependencies_parsed_at":"2022-08-20T11:00:57.110Z","dependency_job_id":null,"html_url":"https://github.com/lukencode/NetBash","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukencode%2FNetBash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukencode%2FNetBash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukencode%2FNetBash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukencode%2FNetBash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lukencode","download_url":"https://codeload.github.com/lukencode/NetBash/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251518824,"owners_count":21602216,"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","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-11-11T21:18:08.937Z","updated_at":"2026-03-08T01:32:02.193Z","avatar_url":"https://github.com/lukencode.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"NetBash is a drop in (think mvc mini profiler) command line for your web app.\n\nDownload from NuGet - **PM\u003e Install-Package NetBash**\n\n#### Set up\nOn application start call NetBash.Init() to initilize the routes. You can optionally set the Authorize action, this action is run to determine whether to show the console.\n\n```csharp\nprotected void Application_Start()\n{\n\tAreaRegistration.RegisterAllAreas();\n\n\tRegisterGlobalFilters(GlobalFilters.Filters);\n\tRegisterRoutes(RouteTable.Routes);\n\n\tNetBash.Init();\n\tNetBash.Settings.Authorize = (request) =\u003e\n\t\t{\n\t\t\treturn request.IsLocal;\n\t\t};\n}\n```\n\nYou also need to add the render includes code somewhere on your page (_Layout.cshtml is proabably easiest).\n\n```\n@NetBash.RenderIncludes()\n```\n\t\n#### Usage\nNetBash commands are sent using this format - \"[command name] [arg1] [arg2] etc\". You can see which commands are currently loaded by typing \"help\". There are also a few keyboard shortcuts (which can be viewed with \"shortcuts\" the most useful being \"`\" to open and focust the console.\n[todo link to blog post]\n\n#### Creating a Command\nNetBash will look for any implementation of the interface IWebCommand with a WebCommand attribute on first request. To create a command simply implement IWebCommand and add the WebCommand Attribtue.\n\n```csharp\n[WebCommand(\"length\", \"Returns number of characters in given arguments\")]\npublic class LengthCommand : IWebCommand\n{\n\tpublic bool ReturnHtml\n\t{\n\t\tget { return false; }\n\t}\n\n\tpublic string Process(string[] args)\n\t{\n\t\treturn string.Join(\" \", args).Length.ToString();\n\t}\n}\n```\n\nThis silly example just returns the number of chars in the arguments you pass. The first parameter of WebCommand is the name you use to invoke the command, the second is the description that shows up in help.\n\n#### Commands\n\nOver on the wiki is a list of commands people have made - https://github.com/lukencode/NetBash/wiki/Commands\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukencode%2Fnetbash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flukencode%2Fnetbash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukencode%2Fnetbash/lists"}