{"id":19383218,"url":"https://github.com/rebus-org/gocommando","last_synced_at":"2025-04-23T21:31:36.300Z","repository":{"id":1019385,"uuid":"847031","full_name":"rebus-org/GoCommando","owner":"rebus-org","description":":bowtie: Console application helper library","archived":false,"fork":false,"pushed_at":"2020-08-07T07:56:00.000Z","size":3626,"stargazers_count":56,"open_issues_count":4,"forks_count":11,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-12T19:50:16.678Z","etag":null,"topics":["c-sharp","cli","console-application"],"latest_commit_sha":null,"homepage":"http://mookid.dk/gocommando","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rebus-org.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2010-08-18T19:36:13.000Z","updated_at":"2023-09-26T12:43:57.000Z","dependencies_parsed_at":"2022-08-16T11:50:23.151Z","dependency_job_id":null,"html_url":"https://github.com/rebus-org/GoCommando","commit_stats":null,"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rebus-org%2FGoCommando","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rebus-org%2FGoCommando/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rebus-org%2FGoCommando/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rebus-org%2FGoCommando/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rebus-org","download_url":"https://codeload.github.com/rebus-org/GoCommando/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250517737,"owners_count":21443832,"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":["c-sharp","cli","console-application"],"created_at":"2024-11-10T09:24:59.334Z","updated_at":"2025-04-23T21:31:35.129Z","avatar_url":"https://github.com/rebus-org.png","language":"C#","readme":"What?\n====\n\nGoCommando is a small command line utility helper that does the boring work when creating command line utilities in .NET.\n\nMore info coming soon at http://mookid.dk/gocommando\n\nOne day, maybe I'll tweet something as well... [@mookid8000][2]\n\nHow?\n====\n\nCreate a new console application. `Install-Package GoCommando` to get the DLL, and then `Go.Run()` in the `Main` method.\n\nAnd then you add some classes that implement `ICommand` and you decorate them with `[Command]` and\nthen you add properties to those classes, and then you decorate those with `[Parameter]`.\n\nAnd then you decorate the command class and the parameter properties with `[Description]`.\n\nAnd then you add a couple of `[Example]` to some of the parameter properties, just to be nice.\n\nExample!\n====\n\nThis is the `white-russian` command in a fictive Beverage utility:\n\n\n    [Command(\"white-russian\")]\n    [Description(\"Mixes a White Russian, pouring in milk till full\")]\n    public class WhiteRussian : ICommand\n    {\n        [Parameter(\"vodka\")]\n        [Description(\"How many cl of vodka?\")]\n        public double Vodka { get; set; }\n\n        [Parameter(\"kahlua\")]\n        [Description(\"How many cl of Kahlua?\")]\n        public double Kahlua { get; set; }\n\n        [Parameter(\"lukewarm\", optional: true)]\n        [Description(\"Avoid refrigerated ingredients?\")]\n        public bool LukeWarm { get; set; }\n\n        public void Run()\n        {\n            Console.WriteLine($\"Making a {(LukeWarm ? \"luke-warm\" : \"\")} beverage\" +\n                                $\" with {Vodka:0.#} cl of vodka\" +\n                                $\" and {Kahlua:0.#} cl of Kahlua\");\n        }\n    }\n\nIf you invoke it without its command, it will print out the available commands:\n\n    C:\\\u003e beverage.exe\n\n    ------------------------------\n    Beverage Utility\n\n    Copyright (c) 2015 El Duderino\n    ------------------------------\n    Please invoke with a command - the following commands are available:\n\n        white-russian - Mixes a White Russian, pouring in milk till full\n\n    Invoke with -help \u003ccommand\u003e to get help for each command.\n\n    Exit code: -1\n\nand then, if you add `-help white-russian` as an argument, you'll get detailed help for that command:\n\n    C:\\\u003e beverage.exe -help white-russian\n\n    ------------------------------\n    Beverage Utility\n\n    Copyright (c) 2015 El Duderino\n    ------------------------------\n    Mixes a White Russian, pouring in milk till full\n\n    Type\n\n        Beverage.exe white-russian \u003cargs\u003e\n\n    where \u003cargs\u003e can consist of the following parameters:\n\n        -vodka\n            How many cl of vodka?\n\n        -kahlua\n            How many cl of Kahlua?\n\n        -lukewarm (flag/optional)\n            Avoid refrigerated ingredients?\n\nIf you try to invoke a command, and one or more of the arguments are missing, you'll know:\n\n    C:\\\u003e beverage white-russian -vodka 1\n\n    ------------------------------\n    Beverage Utility\n\n    Copyright (c) 2015 El Duderino\n    ------------------------------\n    The following required parameters are missing:\n\n        -kahlua - How many cl of Kahlua?\n\n    Invoke with -help \u003ccommand\u003e to get help for each command.\n\n    Exit code: -1\n\nand then, when you finally invoke the command with the right arguments, it'll run as you would probably expect:\n\n    C:\\\u003e beverage white-russian -vodka 2 -kahlua 2\n\n    ------------------------------\n    Beverage Utility\n\n    Copyright (c) 2015 El Duderino\n    ------------------------------\n    Making a  beverage with 2 cl of vodka and 2 cl of Kahlua\n\nNeat.\n\nLicense\n====\n\nGoCommando is [Beer-ware][1].\n\n[1]: http://en.wikipedia.org/wiki/Beerware\n[2]: http://twitter.com/mookid8000\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frebus-org%2Fgocommando","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frebus-org%2Fgocommando","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frebus-org%2Fgocommando/lists"}