Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/iseki0/cmdpipe
Utils for command line call
https://github.com/iseki0/cmdpipe
cmdline java kotlin utils
Last synced: 20 days ago
JSON representation
Utils for command line call
- Host: GitHub
- URL: https://github.com/iseki0/cmdpipe
- Owner: iseki0
- License: apache-2.0
- Created: 2023-06-10T08:28:11.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-06-20T10:14:36.000Z (7 months ago)
- Last Synced: 2024-06-21T00:41:35.191Z (7 months ago)
- Topics: cmdline, java, kotlin, utils
- Language: Kotlin
- Homepage:
- Size: 245 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cmdpipe(Deprecated)
### Deprecated, don't use
[![Maven Central](https://img.shields.io/maven-central/v/space.iseki.cmdpipe/cmdpipe)](https://mvnrepository.com/artifact/space.iseki.cmdpipe/cmdpipe)
Utils for command line call
## Example
```kotlin
val r = cmdline("git", "clone", "https://github.com/iseki0/cmdpipe")
.withWorkingDirectory(File("/dit/to/clone"))
.handleStdout { input -> input.reader().readText() }
.withTimeout(30_000)
.execute()
check(r.exitCode == 0) { "Clone failed" }
println("stdout: ${r.stdoutValue}") // because we `readText`, so here's the text
println("stderr: ${r.stderrSnapshot}")
```