{"id":13428222,"url":"https://github.com/ajalt/clikt","last_synced_at":"2025-04-09T19:04:26.972Z","repository":{"id":38290913,"uuid":"128975548","full_name":"ajalt/clikt","owner":"ajalt","description":"Multiplatform command line interface parsing for Kotlin","archived":false,"fork":false,"pushed_at":"2024-10-05T21:52:11.000Z","size":22751,"stargazers_count":2529,"open_issues_count":9,"forks_count":120,"subscribers_count":18,"default_branch":"master","last_synced_at":"2024-10-29T15:08:03.153Z","etag":null,"topics":["argument-parser","argument-parsing","cli","command-line","command-line-parser","kotlin","kotlin-library","option-parser"],"latest_commit_sha":null,"homepage":"https://ajalt.github.io/clikt/","language":"Kotlin","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/ajalt.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","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":"2018-04-10T18:04:56.000Z","updated_at":"2024-10-29T13:20:14.000Z","dependencies_parsed_at":"2023-02-07T21:31:27.211Z","dependency_job_id":"8a6a1930-e816-4a60-97b1-1f18802c9063","html_url":"https://github.com/ajalt/clikt","commit_stats":null,"previous_names":[],"tags_count":43,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajalt%2Fclikt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajalt%2Fclikt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajalt%2Fclikt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajalt%2Fclikt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ajalt","download_url":"https://codeload.github.com/ajalt/clikt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248095017,"owners_count":21046770,"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-parser","argument-parsing","cli","command-line","command-line-parser","kotlin","kotlin-library","option-parser"],"created_at":"2024-07-31T01:00:49.594Z","updated_at":"2025-04-09T19:04:26.947Z","avatar_url":"https://github.com/ajalt.png","language":"Kotlin","funding_links":[],"categories":["Libraries","Kotlin","cli","[Kotlin](https://kotlinlang.org/)","Additional Languages"],"sub_categories":["Command Line Interface","Useful awesome list for Go cli","Kotlin 🎯"],"readme":"\u003ch1 align=\"center\"\u003e\n    \u003cimg src=\"docs/img/wordmark.svg\"\u003e\n    \u003cp\u003e\u003cimg src=\"docs/img/animation.png\"\u003e\u003c/p\u003e\n\u003c/h1\u003e\n\nClikt *(pronounced \"clicked\")* is a multiplatform Kotlin library that makes writing command line\ninterfaces simple and intuitive. It's the \"Command Line Interface for Kotlin\".\n\nIt is designed to make the process of writing command line tools effortless\nwhile supporting a wide variety of use cases and allowing advanced\ncustomization when needed.\n\nClikt has:\n\n * arbitrary nesting of commands\n * composable, type safe parameter values\n * generation of help output and shell autocomplete scripts\n * multiplatform packages for JVM, Node.js, and native Linux, Windows and macOS \n\nWhat does it look like? Here's a complete example of a simple Clikt program:\n\n```kotlin\nclass Hello : CliktCommand() {\n    val count: Int by option().int().default(1).help(\"Number of greetings\")\n    val name: String by option().prompt(\"Your name\").help(\"The person to greet\")\n\n    override fun run() {\n        repeat(count) {\n            echo(\"Hello $name!\")\n        }\n    }\n}\n\nfun main(args: Array\u003cString\u003e) = Hello().main(args)\n```\n\nAnd here's what it looks like when run:\n\n\u003cp align=\"center\"\u003e\u003cimg src=\"docs/img/readme_screenshot1.png\"\u003e\u003c/p\u003e\n\nThe help page is generated for you:\n\n\u003cp align=\"center\"\u003e\u003cimg src=\"docs/img/readme_screenshot2.png\"\u003e\u003c/p\u003e\n\nErrors are also taken care of:\n\n\u003cp align=\"center\"\u003e\u003cimg src=\"docs/img/readme_screenshot3.png\"\u003e\u003c/p\u003e\n\n\n## Documentation\n\nThe full documentation can be found on [the website](https://ajalt.github.io/clikt).\n\nThere are also a number of [sample applications](samples). You can run\nthem with the included [`runsample` script](runsample).\n\n## Installation\n\nClikt is distributed through [Maven Central](https://search.maven.org/artifact/com.github.ajalt.clikt/clikt).\n\n```kotlin\ndependencies {\n   implementation(\"com.github.ajalt.clikt:clikt:5.0.3\")\n\n   // optional support for rendering markdown in help messages\n   implementation(\"com.github.ajalt.clikt:clikt-markdown:5.0.3\")\n}\n```\n\nThere is also a smaller core module available. [See the docs for details](https://ajalt.github.io/clikt/advanced/#core-module).\n\n\n###### If you're using Maven instead of Gradle, use `\u003cartifactId\u003eclikt-jvm\u003c/artifactId\u003e`\n\n#### Multiplatform\n\nClikt supports most multiplatform targets.\n[See the docs](https://ajalt.github.io/clikt/advanced/#multiplatform-support) \nfor more information about functionality supported on each target. You'll need to use Gradle 6 or\nnewer.\n\n#### Snapshots\n\n\u003cdetails\u003e\n\u003csummary\u003eSnapshot builds are also available\u003c/summary\u003e\n   \n\u003ca href=\"https://oss.sonatype.org/content/repositories/snapshots/com/github/ajalt/clikt/clikt/\"\u003e\u003cimg src=\"https://img.shields.io/nexus/s/com.github.ajalt.clikt/clikt?color=blue\u0026label=latest%20shapshot\u0026server=https%3A%2F%2Foss.sonatype.org\"/\u003e\u003c/a\u003e\n   \n\u003cp\u003e\nYou'll need to add the Sonatype snapshots repository: \n      \n```kotlin\nrepositories {\n    maven {\n        url = uri(\"https://oss.sonatype.org/content/repositories/snapshots/\")\n    }\n}\n```\n\u003c/p\u003e\n\u003c/details\u003e\n\n## License\n\n    Copyright 2018 AJ Alt\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fajalt%2Fclikt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fajalt%2Fclikt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fajalt%2Fclikt/lists"}