Jakub Gwóźdź
07/27/2026, 6:45 AMsdk install kotlin to have the kotlin scripting support. Now with kotlin being replaced with kotlin-toolchain, what is the correct way of launching .main.kts scripts? (and how the shebang should look like)?joffrey
07/27/2026, 7:43 AMsdk install kotlin and then use the kotlinr executable instead of kotlin (since 2.4.10).
We're also working on an experimental support for scripts with the Kotlin Toolchain, but I wouldn't count on this just yet. The command is kotlin run --script foo.main.kts (or just kotlin run foo.main.kts if you're not in a project)Jakub Gwóźdź
07/27/2026, 7:45 AMkotlinr or kotlinc?Rey (Kingg22)
07/27/2026, 4:01 PMkotlinr or kotlinc? @Jakub Gwóźdź
kotlinlang.org/docs/command-line.html#…
You can also use the kotlinr script to run binaries produced by the Kotlin compilerjoffrey
07/27/2026, 4:27 PMkotlinr, it's the new name of the old kotlin executable ("kotlin runner") that you can use to run scripts (and in your shebang) when you also install the Kotlin Toolchain, so there is no conflict with the new kotlin executable from the toolchain.