ktfmt
v0.59.0
Published
Format Kotlin code with ktfmt through the npm registry
Maintainers
Readme
npx-ktfmt
Format Kotlin code with ktfmt through the npm registry
Usage is the same as the ktfmt CLI
npx ktfmt@latestRequirements
- Java (JRE) 11 or newer must be installed and available on your PATH (or set
JAVA_HOME).
Examples
# Format files
npx ktfmt@latest -kotlinlang-style -r src/**/*.kt
# Read from stdin / write to stdout
cat MyFile.kt | npx ktfmt@latest -