{"id":38049386,"url":"https://github.com/levelrin/kotlin-stylerin","last_synced_at":"2026-01-16T20:03:14.457Z","repository":{"id":280069712,"uuid":"940063908","full_name":"levelrin/kotlin-stylerin","owner":"levelrin","description":"An alternative formatter for Kotlin code.","archived":false,"fork":false,"pushed_at":"2025-05-19T11:51:38.000Z","size":260,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-19T12:46:20.159Z","etag":null,"topics":["formatter","kotlin"],"latest_commit_sha":null,"homepage":"","language":"Java","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/levelrin.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}},"created_at":"2025-02-27T14:58:20.000Z","updated_at":"2025-05-19T11:51:42.000Z","dependencies_parsed_at":"2025-03-15T10:25:24.643Z","dependency_job_id":"d04d7be9-bbbb-4d4f-aa8a-01f3fe060a75","html_url":"https://github.com/levelrin/kotlin-stylerin","commit_stats":null,"previous_names":["levelrin/kotlin-stylerin"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/levelrin/kotlin-stylerin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levelrin%2Fkotlin-stylerin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levelrin%2Fkotlin-stylerin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levelrin%2Fkotlin-stylerin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levelrin%2Fkotlin-stylerin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/levelrin","download_url":"https://codeload.github.com/levelrin/kotlin-stylerin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levelrin%2Fkotlin-stylerin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28482242,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: 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":["formatter","kotlin"],"created_at":"2026-01-16T20:03:14.314Z","updated_at":"2026-01-16T20:03:14.435Z","avatar_url":"https://github.com/levelrin.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build](https://github.com/levelrin/kotlin-stylerin/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/levelrin/kotlin-stylerin/actions/workflows/build.yml?query=branch%3Amain)\n[![codecov](https://codecov.io/gh/levelrin/kotlin-stylerin/graph/badge.svg?token=noW3yHdtQq)](https://codecov.io/gh/levelrin/kotlin-stylerin)\n[![](https://tokei.rs/b1/github/levelrin/kotlin-stylerin?category=code)](https://github.com/levelrin/kotlin-stylerin)\n[![License](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/levelrin/kotlin-stylerin/blob/main/LICENSE)\n\n## About\n\nIt's a code formatter for [Kotlin](https://kotlinlang.org/).\n\nYes, we already have a formatter, such as [ktfmt](https://facebook.github.io/ktfmt/), but it's not good enough.\n\nFor example, we have the following code:\n```kt\nfun main() {\n  val doll = RussianDoll(\"Rin\",RussianDoll(\"Revomin\",RussianDoll(\"Ian\")))\n  doll.unwrap()\n}\nclass RussianDoll(private val name: String, private val child: RussianDoll? = null) {\n    fun child(): RussianDoll? {return child}\n    fun unwrap() {\n        println(name)\n        child?.unwrap()\n    }\n}\n```\n\n`ktfmt` formats the code like this by default:\n```kt\nfun main() {\n  val doll = RussianDoll(\"Rin\", RussianDoll(\"Revomin\", RussianDoll(\"Ian\")))\n  doll.unwrap()\n}\n```\n\nOur formatter formats the code like this:\n```kt\nfun main() {\n  val doll = RussianDoll(\n      \"Rin\",\n      RussianDoll(\n          \"Revomin\",\n          RussianDoll(\"Ian\")\n      )\n  )\n  doll.unwrap()\n}\n```\n\nOur format shows the composition better.\n\n## Quick Start\n\nPlease install Java 11+ if you haven't already.\n\n1. [Download](https://github.com/levelrin/kotlin-stylerin/releases) the zip file that matches with your Java version and unzip it to get the jar file.\n2. Run the command `java -jar kotlin-stylerin-{app-version}-{java-version}.jar path/to/target.kt`\n\n## Command Options\n\n```\nusage: java -jar kotlin-stylerin-{app-version}-{java-version}.jar [options]\n -h,--help              Show help messages.\n -q,--quiet             Do not print debug logs.\n -r,--recursive \u003carg\u003e   Format files in the directory recursively.\n -v,--version           Print the version.\n```\n\n## Disclaimer\n\nNot all [grammar rules](https://github.com/antlr/grammars-v4/blob/master/kotlin/kotlin/KotlinParser.g4) are supported yet.\n\nPlease always be ready to recover the file and use our formatter at your own risk.\n\nIf you find a bug or have a suggestion, please create a new [issue](https://github.com/levelrin/kotlin-stylerin/issues).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flevelrin%2Fkotlin-stylerin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flevelrin%2Fkotlin-stylerin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flevelrin%2Fkotlin-stylerin/lists"}