{"id":13532290,"url":"https://github.com/cbeust/jcommander","last_synced_at":"2025-04-01T20:31:47.510Z","repository":{"id":973885,"uuid":"771886","full_name":"cbeust/jcommander","owner":"cbeust","description":"Command line parsing framework for Java","archived":false,"fork":false,"pushed_at":"2024-10-27T15:45:27.000Z","size":33690,"stargazers_count":1960,"open_issues_count":105,"forks_count":334,"subscribers_count":60,"default_branch":"master","last_synced_at":"2024-10-29T18:08:33.027Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cbeust.png","metadata":{"files":{"readme":"README.markdown","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"license.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2010-07-13T05:40:31.000Z","updated_at":"2024-10-28T23:06:02.000Z","dependencies_parsed_at":"2023-09-30T14:31:49.527Z","dependency_job_id":"721a5c12-fe04-4944-9f03-4a6592952b8e","html_url":"https://github.com/cbeust/jcommander","commit_stats":{"total_commits":956,"total_committers":102,"mean_commits":9.372549019607844,"dds":"0.38807531380753135","last_synced_commit":"039eda114c5708ae6651849b70f928836598c6e6"},"previous_names":[],"tags_count":60,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbeust%2Fjcommander","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbeust%2Fjcommander/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbeust%2Fjcommander/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbeust%2Fjcommander/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cbeust","download_url":"https://codeload.github.com/cbeust/jcommander/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246510089,"owners_count":20789287,"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-08-01T07:01:09.793Z","updated_at":"2025-04-01T20:31:42.496Z","avatar_url":"https://github.com/cbeust.png","language":"Java","readme":"JCommander\n==========\n\nThis is an annotation based parameter parsing framework for Java 8 (JCommander 1.x), 11 (JCommander 2.x) and 17 (JCommander 3.x).\n\nHere is a quick example:\n\n```java\npublic class JCommanderTest {\n    @Parameter\n    public List\u003cString\u003e parameters = Lists.newArrayList();\n \n    @Parameter(names = { \"-log\", \"-verbose\" }, description = \"Level of verbosity\")\n    public Integer verbose = 1;\n \n    @Parameter(names = \"-groups\", description = \"Comma-separated list of group names to be run\")\n    public String groups;\n \n    @Parameter(names = \"-debug\", description = \"Debug mode\")\n    public boolean debug = false;\n\n    @DynamicParameter(names = \"-D\", description = \"Dynamic parameters go here\")\n    public Map\u003cString, String\u003e dynamicParams = new HashMap\u003cString, String\u003e();\n\n}\n```\n\nand how you use it:\n\n```java\nJCommanderTest jct = new JCommanderTest();\nString[] argv = { \"-log\", \"2\", \"-groups\", \"unit1,unit2,unit3\",\n                    \"-debug\", \"-Doption=value\", \"a\", \"b\", \"c\" };\nJCommander.newBuilder()\n  .addObject(jct)\n  .build()\n  .parse(argv);\n\nAssert.assertEquals(2, jct.verbose.intValue());\nAssert.assertEquals(\"unit1,unit2,unit3\", jct.groups);\nAssert.assertEquals(true, jct.debug);\nAssert.assertEquals(\"value\", jct.dynamicParams.get(\"option\"));\nAssert.assertEquals(Arrays.asList(\"a\", \"b\", \"c\"), jct.parameters);\n```\n\nThe full doc is available at [https://jcommander.org](https://jcommander.org).\n\n## Building JCommander\n\n```\n./gradlew assemble\n```\n\n","funding_links":[],"categories":["[Java](https://dev.java/)","Java ☕","I. Development"],"sub_categories":["Useful awesome list for Go cli","6. Useful libraries"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcbeust%2Fjcommander","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcbeust%2Fjcommander","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcbeust%2Fjcommander/lists"}