{"id":48952137,"url":"https://github.com/jiaqi/jcli","last_synced_at":"2026-04-17T21:06:14.013Z","repository":{"id":1545723,"uuid":"1878981","full_name":"jiaqi/jcli","owner":"jiaqi","description":"Annotation based Java command line processor","archived":false,"fork":false,"pushed_at":"2026-03-11T15:46:42.000Z","size":147,"stargazers_count":6,"open_issues_count":1,"forks_count":8,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-11T20:25:37.529Z","etag":null,"topics":["annotations","command-line","command-line-tool","commandlineparser","java"],"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/jiaqi.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2011-06-11T03:24:23.000Z","updated_at":"2026-03-11T15:46:45.000Z","dependencies_parsed_at":"2022-07-18T16:52:59.921Z","dependency_job_id":null,"html_url":"https://github.com/jiaqi/jcli","commit_stats":null,"previous_names":["jiaqi/jcli"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/jiaqi/jcli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jiaqi%2Fjcli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jiaqi%2Fjcli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jiaqi%2Fjcli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jiaqi%2Fjcli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jiaqi","download_url":"https://codeload.github.com/jiaqi/jcli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jiaqi%2Fjcli/sbom","scorecard":{"id":1244744,"data":{"date":"2026-03-09","repo":{"name":"github.com/jiaqi/jcli","commit":"bc05ddb42dbd3c70c11d4a043e02d46d907e24c3"},"scorecard":{"version":"v5.4.1-0.20260302234127-4dbf14294ff1","commit":"4dbf14294ff1c660e93a2c6b70159f8f9b7e1051"},"score":4.1,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/4dbf14294ff1c660e93a2c6b70159f8f9b7e1051/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":5,"reason":"7 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 5","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/4dbf14294ff1c660e93a2c6b70159f8f9b7e1051/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 1/21 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/4dbf14294ff1c660e93a2c6b70159f8f9b7e1051/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/4dbf14294ff1c660e93a2c6b70159f8f9b7e1051/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/4dbf14294ff1c660e93a2c6b70159f8f9b7e1051/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/build_and_release.yml:1","Warn: no topLevel permission defined: .github/workflows/verify.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/4dbf14294ff1c660e93a2c6b70159f8f9b7e1051/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: third-party GitHubAction not pinned by hash: .github/workflows/build_and_release.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/cyclopsgroup/jcli/build_and_release.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/verify.yml:6: update your workflow using https://app.stepsecurity.io/secureworkflow/cyclopsgroup/jcli/verify.yml/main?enable=pin","Info:   0 out of   2 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/4dbf14294ff1c660e93a2c6b70159f8f9b7e1051/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/4dbf14294ff1c660e93a2c6b70159f8f9b7e1051/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/4dbf14294ff1c660e93a2c6b70159f8f9b7e1051/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/4dbf14294ff1c660e93a2c6b70159f8f9b7e1051/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/4dbf14294ff1c660e93a2c6b70159f8f9b7e1051/docs/checks.md#license"}},{"name":"Signed-Releases","score":8,"reason":"3 out of the last 3 releases have a total of 3 signed artifacts.","details":["Info: signed release artifact: jcli-1.0.2-javadoc.jar.asc: https://github.com/cyclopsgroup/jcli/releases/tag/v1.0.2","Info: signed release artifact: jcli-1.0.1-javadoc.jar.asc: https://github.com/cyclopsgroup/jcli/releases/tag/v1.0.1","Info: signed release artifact: jcli-1.0.0-javadoc.jar.asc: https://github.com/cyclopsgroup/jcli/releases/tag/v1.0.0","Warn: release artifact v1.0.2 does not have provenance: https://api.github.com/repos/cyclopsgroup/jcli/releases/268043451","Warn: release artifact v1.0.1 does not have provenance: https://api.github.com/repos/cyclopsgroup/jcli/releases/15017562","Warn: release artifact v1.0.0 does not have provenance: https://api.github.com/repos/cyclopsgroup/jcli/releases/9596999"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/4dbf14294ff1c660e93a2c6b70159f8f9b7e1051/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: some github tokens can't read classic branch protection rules: https://github.com/ossf/scorecard-action/blob/main/docs/authentication/fine-grained-auth-token.md","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/4dbf14294ff1c660e93a2c6b70159f8f9b7e1051/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 12 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/4dbf14294ff1c660e93a2c6b70159f8f9b7e1051/docs/checks.md#sast"}}]},"last_synced_at":"2026-03-12T00:08:11.423Z","repository_id":1545723,"created_at":"2026-03-12T00:08:11.423Z","updated_at":"2026-03-12T00:08:11.423Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31946034,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-17T17:29:20.459Z","status":"ssl_error","status_checked_at":"2026-04-17T17:28:47.801Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["annotations","command-line","command-line-tool","commandlineparser","java"],"created_at":"2026-04-17T21:06:10.657Z","updated_at":"2026-04-17T21:06:14.007Z","avatar_url":"https://github.com/jiaqi.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"![jcli](https://github.com/jiaqi/jcli/actions/workflows/verify.yml/badge.svg)\n\n# Introduction\n\nJCli is a Java annotation driven command line manipulation library.\nToday, there are more than enough command line argument tools for Java in\nopen source world out there. JCli distincts from others for following\nreasons:\n\n* Parsing rules defined entirely by annotation.\n* Customized conversion rules defined by annotation using\n  [Caff](https://github.com/jiaqi/caff/wiki).\n* Multi-value option supported.\n\nInitially JCli was part of [Jmxterm](https://github.com/jiaqi/jmxterm)\nproject. The command line parsing logic has been gradually decoupled and\nnow becomes an separated library that can easily fit in other command line\nparsing scenarios.\n\n# Get started\n\n## Add to your project\n\nAdd the latest version to your `pom.xml` file.\n\n```xml\n  \u003cdependencies\u003e\n    \u003cdependency\u003e\n      \u003cgroupId\u003eorg.cyclopsgroup\u003c/groupId\u003e\n      \u003cartifactId\u003ejcli\u003c/artifactId\u003e\n      \u003cversion\u003e1.0.2\u003c/version\u003e\n    \u003c/dependency\u003e\n    ...\n```\n\n## Define a POJO\n\nThe POJO doesn't have to extend any class or implements any interface.\nMake sure the fields you want to set or get are correctly defined in POJO\nclass.\n\n```java\npublic class APojo {\n  private int level;\n  ...\n  public int getLevel() { return level; }\n  public void setLevel( int level ) { this.level = level; }\n  ...\n```\n\n## Annotate options\n\nAnnotation defines which command line option is mapped to where. Add\nannotation around the getter or setter of field, if there are any options.\n\n```java\n...\nimport org.cyclopsgroup.jcli.annotation.*;\n...\n@Cli(name=\"test\")\npublic class APojo {\n...\n@Option(name = \"l\", longName = \"level\", description = \"A integer value\")\npublic int getLevel() { return level; }\n...\n```\n\n## Annotate argument\n\nArgument is what's left after options are parsed from original command line\ninput. It's often a multi-value list.\n\n```java\n...\nprivate List\u003cString\u003e arguments = new ArrayList\u003cString\u003e();\n@MultiValue\n@Argument( description = \"Left over arguments\" )\npublic List\u003cString\u003e getArguments() { return arguments; }\n...\n```\n\n## Parse arguments with ArgumentProcessor\n\nWith POJO and parsing rules in annotation, ArgumentProcessor class parses\nstring array and set values against a POJO instance.\n\n```java\nimport org.cyclopsgroup.jcli.ArgumentProcessor;\n...\nAPojo pojo = new APojo();\nArgumentProcessor.newInstance( APojo.class ).process( args, pojo );\ndoSomethingWith( pojo.getLevel() );\n...\n```\n\n# FAQ\n\n## How to define option or argument that can take multiple values?\n\nAdd annotation @MultiValue to the setter method of option or arguments.\nDefault collection passed to setter method is ArrayList. For example:\n\n```java\n@MultiValue\n@Option(name=\"o\", longName=\"option\", description=\"Example option\")\npublic void setOption(List\u003cString\u003e values) ...\n```\n\nYou may customize the implementation of collection, or the type of element\nin collection, for example:\n\n```java\n@MultiValue(listType=LinkedList.class, valueType=Integer.class)\n@Arguments\nvoid setIntegerArguments(List\u003cInteger\u003e values)...\n```\n\nAt this moment, multi-value can't be passed as array yet.\n\n## How to define boolean option?\n\nWhen option type is boolean, JCli automatically consider it as an option\nthat doesn't take value. In following case option -f doesn't need value\nafter the option in command line\n\n```java\n@Option(name=\"f\", longName=\"flag\", description=\"A flag option\")\nvoid setFlag(boolean flag)...\n```\n\n## How to customize conversion rule?\n\nJCli internally use CAFF project for value conversion. Customized conversion\nrules can be defined with annotations, which can apply to the setter of\noption of argument. Take @DateField annotation as an example, following code\ntakes syntax such as 20100401 and call setDate with converted Date object.\n\n```java\n@DateField(format=\"yyyyMMdd\")\n@Option(name=\"d\", longName=\"date\", description=\"Customized date format\")\nvoid setDate(Date date) ...\n```\n\nThe conversion annotation can combine with @MultiValue annotation, which\ndefines the conversion rules for element in Collection. For example,\nfollowing code defines a bean that takes list of dates as arguments\n\n```java\n@DateField(format=\"yyyyMMdd\")\n@MultiValue(valueType=Date.class)\n@Arguments\nvoid setDates(List\u003cDate\u003e dates) ...\n```\n\n# Development guide\n\nPlease follow [Google style guide](https://github.com/google/styleguide) when\nmaking a code change.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjiaqi%2Fjcli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjiaqi%2Fjcli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjiaqi%2Fjcli/lists"}