Skip to the content.

Scripting with Kotlin

🔗 Docs -> Tools -> Compiler -> Run scripts

Use the .kts suffix for a script file.

Can be run directly in a shell using shebang (-> hello.kts)

#!/usr/bin/env kotlin

println("Hello, ${args[0]}")

🔗 Kotlin Scripting Examples

kscript - scripting enhancements for Kotlin

🔗 kscript