{"id":19408949,"url":"https://github.com/lexz-08/clihelper","last_synced_at":"2026-04-27T00:32:01.873Z","repository":{"id":249201192,"uuid":"830753520","full_name":"Lexz-08/CLIHelper","owner":"Lexz-08","description":"Provides simpler management and checking of command-line arguments in an application.","archived":false,"fork":false,"pushed_at":"2024-07-28T01:02:36.000Z","size":91,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-28T19:51:38.465Z","etag":null,"topics":["cli","cli-tool","command-line","command-line-tool","csharp","windows"],"latest_commit_sha":null,"homepage":"https://github.com/Lexz-08/CLIHelper","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/Lexz-08.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-18T23:29:54.000Z","updated_at":"2024-07-28T01:02:39.000Z","dependencies_parsed_at":"2024-07-28T01:44:41.009Z","dependency_job_id":null,"html_url":"https://github.com/Lexz-08/CLIHelper","commit_stats":null,"previous_names":["lexz-08/clihelper"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/Lexz-08/CLIHelper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lexz-08%2FCLIHelper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lexz-08%2FCLIHelper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lexz-08%2FCLIHelper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lexz-08%2FCLIHelper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Lexz-08","download_url":"https://codeload.github.com/Lexz-08/CLIHelper/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lexz-08%2FCLIHelper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32318417,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T23:26:28.701Z","status":"ssl_error","status_checked_at":"2026-04-26T23:26:25.802Z","response_time":129,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["cli","cli-tool","command-line","command-line-tool","csharp","windows"],"created_at":"2024-11-10T12:08:48.242Z","updated_at":"2026-04-27T00:32:01.848Z","avatar_url":"https://github.com/Lexz-08.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CLIHelper\n## Description\nProvides simpler management and checking of command-line arguments in an application.\n## How To Use\n```csharp\nusing CLIHelper;\n\ninternal class Program\n{\n    private enum MySwitch\n    {\n        // random switches for example\n        b,\n        v,\n        x,\n        \n        // as long as the argument matches the name, it will parse\n        debug\n    }\n\n    // attributes can be on any one method that is marked as just 'static'\n    [Argument(\"arg1\", CLIType.String, 1)]\n    [Switch(\"arg12\", typeof(MySwitch), SwitchIdentifier.Slash, 2)]\n    [OptionalArgument(\"arg3\", CLIType.String)]\n    [OptionalSwitch(\"arg4\", typeof(MySwitch), SwitchIdentifier.Hyphen)]\n    static void Main()\n    {\n        var args = CLI.GetArguments(); // will return null if any parsing errors occurred, which in turn will be printed to the console\n        \n        if (args != null)\n        {\n            // and now do what you need with your arguments\n            Console.WriteLine(args[\"arg1\"].ToString());\n            Console.WriteLine(args[\"arg2\"].GetEnumValue\u003cMySwitch\u003e());\n        }\n    }\n}\n```\n## To-Do\n- [ ] Check for entry method named `Main` to ensure clarity with attribute usage\n- [X] Print out available arguments if none are provided\n- [X] Make use of `Description` metadata in [`CLIAttribute`](https://github.com/Lexz-08/CLIHelper/blob/master/CLIHelper/Attributes.cs)\n- [ ] Replace `_` in enum value names with `-` for complex switch arguments\n## Example of Argument Layout (given insufficient arguments)\n![](image.png)\n## Download\n[CLIHelper.dll](https://github.com/Lexz-08/CLIHelper/releases/latest/download/CLIHelper.dll)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flexz-08%2Fclihelper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flexz-08%2Fclihelper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flexz-08%2Fclihelper/lists"}