{"id":13625019,"url":"https://github.com/jmfayard/kotlin-cli-starter","last_synced_at":"2025-10-14T23:19:37.576Z","repository":{"id":44348670,"uuid":"364354805","full_name":"jmfayard/kotlin-cli-starter","owner":"jmfayard","description":"Life is too short for Bash programming","archived":false,"fork":false,"pushed_at":"2024-02-02T13:36:33.000Z","size":1473,"stargazers_count":261,"open_issues_count":7,"forks_count":6,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-04-02T05:08:38.666Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Kotlin","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/jmfayard.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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}},"created_at":"2021-05-04T18:47:51.000Z","updated_at":"2025-03-13T20:59:12.000Z","dependencies_parsed_at":"2024-02-04T08:53:53.588Z","dependency_job_id":"df701efd-911c-440c-92f1-ea2bcc29851f","html_url":"https://github.com/jmfayard/kotlin-cli-starter","commit_stats":null,"previous_names":[],"tags_count":3,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmfayard%2Fkotlin-cli-starter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmfayard%2Fkotlin-cli-starter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmfayard%2Fkotlin-cli-starter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmfayard%2Fkotlin-cli-starter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jmfayard","download_url":"https://codeload.github.com/jmfayard/kotlin-cli-starter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247999861,"owners_count":21031046,"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-01T21:01:49.845Z","updated_at":"2025-10-14T23:19:32.521Z","avatar_url":"https://github.com/jmfayard.png","language":"Kotlin","funding_links":[],"categories":["Kotlin"],"sub_categories":[],"readme":"\u003c!-- \nCUSTOMIZE ME : delete alll the README except the paragraph \"Installation\"\nIn the paragraph installation, make sure to customize the URL of installer.sh\n--\u003e\n\nA starter project to build command-line tools in Kotlin Multiplatform\n\nContains a re-implementation of a real world CLI tool: [git-standup](https://github.com/kamranahmedse/git-standup)\n\n\u003cimg width=\"1214\" alt=\"jmfayard_kotlin-cli-starter__Life_is_too_short_for_Bash_programming_and_Telegram_and_GitHub_Desktop\" src=\"https://user-images.githubusercontent.com/459464/117193054-b40e9200-ade2-11eb-86a8-ad65a45a82da.png\"\u003e\n\n## Installation\n\nYou can install using one of the options listed below\n\n| Source | Command |\n| --- | --- |\n| Node | npm install -g kotlin-cli-starter \n| Installer | `curl -L https://raw.githubusercontent.com/jmfayard/kotlin-cli-starter/main/installer.sh \\| sudo sh` |\n| Tests | `./gradlew allTests` |\n| Kotlin All Platforms | Run `./gradlew allRun` |\n| Kotlin JVM | Run `./gradlew run` |\n| Kotlin Native | Run `./gradlew install` then `$ git standup` |\n| Kotlin Node.JS | Run `./gradlew jsNodeRun` |\n\n## Why?\n\nBeing able to write your own command-line tools is a great skill to have. Automate all the things!\n\nYou can write the CLI tools in Kotlin and reap the benefits of using\n- a modern programming language\n- modern IDE support\n- modern practices such as unit testing and continuous integration\n- leverage Kotlin multiplatform libraries\n- run your code on the JVM and benefit from a wealth of Java libraries\n- or build a native executable, which starts very fast and can be deployed on a computer without the JVM\n\nMy strong opinion - weakly held - is that there are only two good kind of Bash scripts:\n\n- the ones that are five lines long or less\n- the ones that are written and maintained by others\n\n## Work in progress\n\nWe want to support Windows, publish on Homebrew and simplify support of shell completion. \n\nLook at the issues https://github.com/jmfayard/kotlin-cli-starter/issues\n\n\n## What the template contains\n\nThe template\n\n- can be run\n  - with Kotlin/Native via `$ ./gradlew install` and then `git-standup`\n  - on the JVM with `$ ./gradlew run`\n  - on Node.JS with `$ ./gradlew jsNodeRun`. The package is published on https://www.npmjs.com/package/kotlin-cli-starter\n- has tests that can also be run both\n  - natively `$ ./gradlew nativeTest`\n  - on the JVM `$ ./gradlew desktopTest`\n  - on Node.js `$ ./gradlew jsTest`\n- has continuous integration powered by GitHub actions. The code and the tests are run both on native and on the JVM, both on Ubuntu and macOS. See [.github/workflows/runOnGitHub.yml](https://github.com/jmfayard/kotlin-cli-starter/blob/main/.github/workflows/runOnGitHub.yml)  \n- includes those libraries\n  - [ktor-client](https://ktor.io/docs/getting-started-ktor-client.html) to make HTTP calls - _Note: only in the branch ktor-client_ See https://github.com/jmfayard/kotlin-cli-starter/issues/15\n  - [Okio multiplatform](https://square.github.io/okio/multiplatform/) allows reading and writing files  \n  - [kotlin.test](https://kotlinlang.org/api/latest/kotlin.test/) for multi-platform testing\n  - [CliKt](https://github.com/ajalt/clikt) which parses the command-line arguments in a typesafe way and automatically generates the help and Bash/Zsh/Fish auto-completion\n  - [mordant](https://github.com/ajalt/mordant) to have colors and styles in the terminal\n  - [kotlinx.serialization](https://github.com/Kotlin/kotlinx.serialization) which provides Kotlin multiplatform / multi-format serialization\n  - [kotlinx.coroutines](https://github.com/Kotlin/kotlinx.coroutines)\n  - [gradle refreshVersions](https://jmfayard.github.io/refreshVersions/) to simplify dependency management\n- contains a work-around of the [missing `runBlocking { ... }` in commonTests](https://github.com/jmfayard/kotlin-cli-starter/issues/9)\n- contains an API to work with Files and execute shell subcommands.\n\n\u003cimg width=\"1631\" alt=\"kotlin-cli-starter_–_nativeMain_…_Files_kt__kotlin-cli-starter_nativeMain__and_GitHub_Desktop_and_kamranahmedse_git-standup__Recall_what_you_did_on_the_last_working_day__Psst__or_be_nosy_and_find_what_someone_else_in_your_team_did__-_\" src=\"https://user-images.githubusercontent.com/459464/117189924-0baafe80-addf-11eb-84d9-c1e52f3f704d.png\"\u003e\n  \n## The template reimplements `git-standup`\n\nThe template reimplements [`git-standup`](https://github.com/kamranahmedse/git-standup) so that you can learn and find inspiration from a real world example.\n\nSimply run it in and it will give you the output from the last working day\n\nOpen a directory having multiple repositories and run\n\n```shell\n$ ./gradlew install\n$ git standup\n```\n\n![git standup](http://i.imgur.com/4xmkA49.gif)\n\nThis will show you all your commits since the last working day in all the repositories inside.\n\nThere is auto-completion to see the options\n\n\u003cimg width=\"1033\" alt=\"jmfayard_jmfayard____Downloads_and_kotlin-cli-starter_–_README_md__kotlin-cli-starter__and_README_·_Issue__7_·_jmfayard_kotlin-cli-starter\" src=\"https://user-images.githubusercontent.com/459464/117405520-11eac900-af0c-11eb-85e9-8c6292d3b246.png\"\u003e\n\n\n```shell\ngit standup --help\nUsage: git-standup [OPTIONS]\n\n  Recall what you did on the last working day ..or be nosy and find what\n  someone else did.\n\nOptions:\n  --generate-completion [bash|zsh|fish]\n  -a, --author TEXT                Specify author to restrict search to\n  -b, --branch TEXT                Specify branch to restrict search to\n                                   (unset: all branches, \"$remote/$branch\" to\n                                   include fetches)\n  [... and much more options....]\n\nExamples: git-standup -a \"John Doe\" -w \"MON-FRI\" -m 3\n```\n\n## CUSTOMIZE_ME\n\nSo are you ready to write your own command-line tool?\n\nHave you an idea of what you want to write yet?\n\nYou can find some inspiration in [15 Command Line Tools which Spark Joy in Your Terminal ](https://dev.to/jmfayard/15-command-line-tools-which-spark-joy-in-your-terminal-45ln)\n\nThen click on [Use this GitHub template](https://github.com/jmfayard/kotlin-cli-starter/generate)\n\n\u003cimg width=\"1214\"  src=\"https://user-images.githubusercontent.com/459464/117193054-b40e9200-ade2-11eb-86a8-ad65a45a82da.png\"\u003e\n\nThere are comments starting with [**CUSTOMIZE_ME**](https://github.com/jmfayard/kotlin-cli-starter/search?q=CUSTOMIZE_ME) in all places you need to customize\n\nFind them with `Edit \u003e File \u003e Find in Files`\n\n\u003cimg width=\"998\" src=\"https://user-images.githubusercontent.com/459464/117405450-f253a080-af0b-11eb-882c-7bae969bc7e2.png\"\u003e\n\n## Built with kotlin-cli-starter\n\n- [git-standup](https://github.com/jmfayard/kotlin-cli-starter)\n- [httpie.kt](https://github.com/raychenon/httpie.kt)\n- ...\n\n_Have you used the template to build something? Please advertise it here_ 🙏🏻 ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjmfayard%2Fkotlin-cli-starter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjmfayard%2Fkotlin-cli-starter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjmfayard%2Fkotlin-cli-starter/lists"}