{"id":17968767,"url":"https://github.com/cortinico/kscript-template","last_synced_at":"2025-03-25T10:32:38.688Z","repository":{"id":40440001,"uuid":"254222775","full_name":"cortinico/kscript-template","owner":"cortinico","description":"📜 Get started with kscript in a few seconds... with colored logs, github actions and more!","archived":false,"fork":false,"pushed_at":"2023-12-15T14:33:11.000Z","size":15,"stargazers_count":35,"open_issues_count":1,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-20T01:11:18.491Z","etag":null,"topics":["github-actions","github-templates","hacktoberfest","kotlin-scr","kotlin-script","kotlin-scripting","kotlin-scripts","kotlin-template","kscript","kts"],"latest_commit_sha":null,"homepage":"","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/cortinico.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}},"created_at":"2020-04-08T23:23:13.000Z","updated_at":"2025-01-13T08:02:57.000Z","dependencies_parsed_at":"2024-10-29T15:13:53.587Z","dependency_job_id":null,"html_url":"https://github.com/cortinico/kscript-template","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cortinico%2Fkscript-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cortinico%2Fkscript-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cortinico%2Fkscript-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cortinico%2Fkscript-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cortinico","download_url":"https://codeload.github.com/cortinico/kscript-template/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245444468,"owners_count":20616384,"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":["github-actions","github-templates","hacktoberfest","kotlin-scr","kotlin-script","kotlin-scripting","kotlin-scripts","kotlin-template","kscript","kts"],"created_at":"2024-10-29T14:41:31.606Z","updated_at":"2025-03-25T10:32:37.961Z","avatar_url":"https://github.com/cortinico.png","language":"Kotlin","readme":"# kscript-template 📜\n\n[![Use this template](https://img.shields.io/badge/from-kscript--template-brightgreen?logo=dropbox)](https://github.com/cortinico/kscript-template/generate) ![Run Script](https://github.com/cortinico/kscript-template/workflows/Run%20Script/badge.svg) ![License](https://img.shields.io/github/license/cortinico/kscript-template.svg) ![Language](https://img.shields.io/github/languages/top/cortinico/kotlin-android-template?color=blue\u0026logo=kotlin)\n\nA simple Github template that lets you create a [**kscript**](https://github.com/holgerbrandl/kscript) repository ready to run and share in a **few seconds**. \n\n## How to use  👣\n\nJust click on [![Use this template](https://img.shields.io/badge/-Use%20this%20template-brightgreen)](https://github.com/cortinico/kscript-template/generate) button to create a new repo starting from this template.\n\nOnce created don't forget to update the:\n- [Script name](scaffolded-script.kts) both the filename and the occurrencies inside the script.\n- The script name inside the Github Actions [workflow file](.github/workflows/run-script.yaml).\n\nThe templated script is just printing the list of files from a input directory. You can use this as a starting point to create your script around it:\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://imgur.com/zi5CjIs.png\" width=\"80%\"\u003e\n\u003c/p\u003e\n\n## Features 🎨\n\n- Cli Args parsing with [picocli](https://github.com/remkop/picocli/).\n- Logging functions `info`, `warn`, `error`, `success` with emoji support ✅⚠️❌.\n- Support for ASCII colored output 🎨.\n- CI Setup with GitHub Actions.\n- Publishing of bundled artifact out of the box.\n- Issues Template (bug report + feature request).\n- Pull Request Template.\n\n## CLI Args ⌨️\n\nThis project is using [picocli](https://github.com/remkop/picocli/) to easily parse the CLI Options and Parameters. You can find more example on how to set up the flags on the [official documentation page](https://picocli.info/#_introduction).\n\nYou can use the `--help` flag to get a nice report for the available flags:\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://imgur.com/KS6KtoV.png\" width=\"80%\"\u003e\n\u003c/p\u003e\n\nIf you want to see how a failure looks like, invoke with `--fail` or `-f`:\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://imgur.com/BYn1OxI.png\" width=\"80%\"\u003e\n\u003c/p\u003e\n\n## Logging 📣\n\nA couple of util functions are available for logging:\n* ℹ️ `info` to report a info message. You can optionally provide an emoji to enrich the log.\n* ✅ `succ` to report a green success message.\n* ⚠️ `warn` to report a yellow warning message.\n* ❌ `error` to report an error. Optionally you can provide also:\n    - A `Throwable` that will be logged on the screen\n    - An exit code `Int`. If not provided the default is `1`\n\nCalling `error` will also stop the script.\n\n## CI ⚙️\n\nThis template is using [**GitHub Actions**](https://github.com/cortinico/kscript-template/actions) as CI. You don't need to setup any external service and you should have a running CI once you start using this template.\n\nThe workflow [Run Script](https://github.com/cortinico/kscript-template/actions?query=workflow%3A%22Run+Script%22) will take care of running the script and publishing the bundled version of it as an artifact (users can easily download it).\n\n## Contributing 🤝\n\nFeel free to open a issue or submit a pull request for any bugs/improvements.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcortinico%2Fkscript-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcortinico%2Fkscript-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcortinico%2Fkscript-template/lists"}