{"id":13804987,"url":"https://github.com/jasonwhite/darg","last_synced_at":"2025-12-15T04:35:13.302Z","repository":{"id":2289138,"uuid":"46165213","full_name":"jasonwhite/darg","owner":"jasonwhite","description":"Robust command line argument parsing for D.","archived":true,"fork":false,"pushed_at":"2021-11-24T08:46:01.000Z","size":41,"stargazers_count":38,"open_issues_count":4,"forks_count":8,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-11-18T21:46:50.120Z","etag":null,"topics":["argument-parsing","dlang"],"latest_commit_sha":null,"homepage":null,"language":"D","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/jasonwhite.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-11-14T07:02:16.000Z","updated_at":"2024-05-11T03:21:59.000Z","dependencies_parsed_at":"2022-08-06T12:01:33.063Z","dependency_job_id":null,"html_url":"https://github.com/jasonwhite/darg","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jasonwhite%2Fdarg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jasonwhite%2Fdarg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jasonwhite%2Fdarg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jasonwhite%2Fdarg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jasonwhite","download_url":"https://codeload.github.com/jasonwhite/darg/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254003475,"owners_count":21997892,"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":["argument-parsing","dlang"],"created_at":"2024-08-04T01:00:55.995Z","updated_at":"2025-12-15T04:35:13.240Z","avatar_url":"https://github.com/jasonwhite.png","language":"D","funding_links":[],"categories":["Command Line"],"sub_categories":["XML"],"readme":"[buildbadge]: https://travis-ci.org/jasonwhite/darg.svg?branch=master\n[buildstatus]: https://travis-ci.org/jasonwhite/darg\n\n# D Argument Parser [![Build Status][buildbadge]][buildstatus]\n\nBetter command line argument parsing using D's powerful compile-time code\ngeneration facilities.\n\n**Note**: This is a stable library, but it is no longer maintained. If you'd\nlike to help out with maintanence please make an issue letting me know!\n\n## Example\n\n```d\nimport std.stdio;\nimport darg;\n\nstruct Options\n{\n    @Option(\"help\", \"h\")\n    @Help(\"Prints this help.\")\n    OptionFlag help;\n\n    @Option(\"threads\", \"t\")\n    @Help(\"Number of threads to use.\")\n    size_t threads;\n\n    @Argument(\"file\", Multiplicity.zeroOrMore)\n    @Help(\"Input files\")\n    string[] files;\n}\n\n// Generate the usage and help string at compile time.\nimmutable usage = usageString!Options(\"example\");\nimmutable help = helpString!Options;\n\nint main(string[] args)\n{\n    Options options;\n\n    try\n    {\n        options = parseArgs!Options(args[1 .. $]);\n    }\n    catch (ArgParseError e)\n    {\n        writeln(e.msg);\n        writeln(usage);\n        return 1;\n    }\n    catch (ArgParseHelp e)\n    {\n        // Help was requested\n        writeln(usage);\n        write(help);\n        return 0;\n    }\n\n    foreach (f; options.files)\n    {\n        // Use files\n    }\n\n    return 0;\n}\n```\n\n    $ ./example --help\n    Usage: example [--help] [--threads=\u003culong\u003e] [file...]\n\n    Positional arguments:\n     file            Input files\n\n    Optional arguments:\n     --help, -h      Prints this help.\n     --threads, -t \u003culong\u003e\n                     Number of threads to use.\n    \n    $ ./example --foobar\n    Unknown option '--foobar'\n    Usage: program [--help] [--threads=\u003culong\u003e] [file...]\n\n\n## License\n\n[MIT License](/LICENSE.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjasonwhite%2Fdarg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjasonwhite%2Fdarg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjasonwhite%2Fdarg/lists"}