This commit is contained in:
2026-02-15 14:06:35 +01:00
parent c961342462
commit 2679f688d5
8 changed files with 53 additions and 67 deletions

View File

@@ -2,15 +2,6 @@
`shell-kt` is a Kotlin Multiplatform library that enables the execution of shell commands.
## Targets
| Target | Status |
|------------------|---------------|
| JVM | Supported |
| JavaScript | Supported |
| Native (Linux) | Supported |
| Native (Windows) | Not Supported |
## Installation
Add the following to your `build.gradle.kts`.
@@ -21,21 +12,15 @@ repositories {
}
dependencies {
implementation("com.infendro:shell:1.0.0")
implementation("com.infendro:shell:1.1.0")
}
```
## Usage
```kotlin
import com.infendro.shell.Shell
suspend fun main() {
// the command to execute
val command = arrayOf("echo", "Hello World!")
// execute the command
val result = Shell.run(command)
val result = execute("echo", "Hello World!")
println(result.code) // 0
println(result.value) // Hello World!