{"id":17270799,"url":"https://github.com/lndbrg/java-async-process","last_synced_at":"2025-03-26T12:21:20.187Z","repository":{"id":57742993,"uuid":"79552871","full_name":"lndbrg/java-async-process","owner":"lndbrg","description":"A small library that wraps process execution in completable futures.","archived":false,"fork":false,"pushed_at":"2017-09-15T00:18:20.000Z","size":44,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-31T13:26:30.025Z","etag":null,"topics":["completablefuture","future","futures","java","java-8","java-library","java8","process"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lndbrg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-01-20T11:16:10.000Z","updated_at":"2022-10-12T14:33:45.000Z","dependencies_parsed_at":"2022-09-11T07:10:14.347Z","dependency_job_id":null,"html_url":"https://github.com/lndbrg/java-async-process","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lndbrg%2Fjava-async-process","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lndbrg%2Fjava-async-process/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lndbrg%2Fjava-async-process/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lndbrg%2Fjava-async-process/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lndbrg","download_url":"https://codeload.github.com/lndbrg/java-async-process/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245650459,"owners_count":20650105,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["completablefuture","future","futures","java","java-8","java-library","java8","process"],"created_at":"2024-10-15T08:21:16.694Z","updated_at":"2025-03-26T12:21:20.164Z","avatar_url":"https://github.com/lndbrg.png","language":"Java","readme":"Async Process\n=============\n[![Maven Central](https://img.shields.io/maven-central/v/sh.nerd/async-process.svg?style=flat-square)]()\n[![Travis](https://img.shields.io/travis/lndbrg/java-async-process.svg?style=flat-square)]()\n[![Codecov](https://img.shields.io/codecov/c/github/lndbrg/java-async-process.svg?style=flat-square)]()\n[![codebeat badge](https://codebeat.co/badges/5518c2ce-1c46-474d-94e6-8c5808258d4f)](https://codebeat.co/projects/github-com-lndbrg-java-async-process-master)\n\nSmall library for making it easier to spawn processes in java with a modern api.\n\nUsage\n-----\nAysncProcess comes with a few static methods, to either create a builder that can be launched by\ncalling `start()`.\n\nPrepare a command and then spawn it:\n```java\nAsyncProcess.cmd(\"echo\", \"foo\").start();\n```\n\nOr calling the `run()` method to directly spawn a command\n```java\nAsyncProcess.run(\"echo\", \"foo\");\n```\n\nThe run method is overloaded to make it possible to directly spawn commands with stdin/out/err set,\nit is recommended to use the builder created by the cmd builder in order to get clearer code though.\n\n### Advanced usage\n\nHere the cmd method is imported statically:\n```java\n    cmd(\"echo\", \"foo\")\n        .in(supplier)\n        .out(consumer)\n        .err(consumer)\n        .start();\n```\n\nIn sets the stdin supplier, expected to be of type `Supplier\u003cString\u003e` it expected to block when it\ndoesn't have data and the supplier will never be called again after supplying a null value.\n\n### In `pom.xml`\n\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003esh.nerd\u003c/groupId\u003e\n  \u003cartifactId\u003easync-process\u003c/artifactId\u003e\n  \u003cversion\u003e$VERSION\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n\nTodo\n----\n- [x] Give the user the possibility to specify environment through a hashmap\n- [ ] Go through handling of the communication threads and verify the paths\n- [ ] Better documentation\n- [x] Any other TODOs in the code.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flndbrg%2Fjava-async-process","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flndbrg%2Fjava-async-process","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flndbrg%2Fjava-async-process/lists"}