{"id":16999078,"url":"https://github.com/maxandersen/fluent-process","last_synced_at":"2026-05-11T16:02:00.370Z","repository":{"id":66828867,"uuid":"373332869","full_name":"maxandersen/fluent-process","owner":"maxandersen","description":"fork of https://gitlab.com/ongresinc/fluent-process","archived":false,"fork":false,"pushed_at":"2021-06-03T00:19:43.000Z","size":52,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"shell","last_synced_at":"2025-01-27T08:11:07.744Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://gitlab.com/ongresinc/fluent-process","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/maxandersen.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-06-03T00:00:36.000Z","updated_at":"2024-04-07T15:56:29.000Z","dependencies_parsed_at":"2023-02-21T06:16:01.786Z","dependency_job_id":null,"html_url":"https://github.com/maxandersen/fluent-process","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxandersen%2Ffluent-process","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxandersen%2Ffluent-process/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxandersen%2Ffluent-process/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxandersen%2Ffluent-process/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maxandersen","download_url":"https://codeload.github.com/maxandersen/fluent-process/tar.gz/refs/heads/shell","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244924752,"owners_count":20532873,"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":[],"created_at":"2024-10-14T04:07:05.599Z","updated_at":"2026-05-11T16:02:00.286Z","avatar_url":"https://github.com/maxandersen.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fluent-process\n\n## Table of content\n\n* [What is it?](#what-is-it)\n* [How to use it](#how-to-use-it)\n* [How to build](#how-to-build)\n* [Maven Profiles](#maven-profiles)\n\n## What is it?\n\nA Java 8 library to provide a Process interface that is fluent and Java Streams oriented.\n\n## How to use it\n\nJust use one of `FluentProcess.start(String command, String...args)` or `FluentProcess.builder(String command, String args...args)` for a more fine grained configuration:\n\n* Will stream `Stream.of(\"hello\", \"world\")`:\n\n```java\nFluentProcess.start(\n    \"sh\",\n    \"-c\",\n    \"echo hello; echo world\")\n        .stream()\n```\n\n* Same result as above but pipelining with `cat`:\n\n```java\nFluentProcess.start(\n    \"sh\",\n    \"-c\",\n    \"echo hello; echo world\")\n        .pipe(\"cat\")\n        .stream()\n```\n\n* Same result as above but passing to `cat` a pure Java Stream:\n\n```java\nFluentProcess.start(\"cat\")\n        .inputStream(\n          Stream.of(\"hello\", \"world\"))\n        .stream()\n```\n\n* This will print \"hello\" followed by \"world\" but will fail when terminating the Java Stream:\n\n```java\nFluentProcess.start(\n    \"sh\",\n    \"-c\",\n    \"echo hello; echo world; exit 79\")\n        .stream()\n        .peek(System.out::println)\n        .count() // \u003c- exception will be thrown here\n```\n\n* Same output as the above but will fail when leaving the `try` block:\n\n```java\ntry (Stream\u003cString\u003e stream = FluentProcess.start(\n    \"sh\",\n    \"-c\",\n    \"echo hello; echo world; exit 79\")\n        .withoutCloseAfterLast()\n        .stream()) {\n    stream\n        .peek(System.out::println)\n        .count();\n} // \u003c- exception will be thrown here when Stream.close() will be called\n```\n\n* Same result as above but will not fail at all:\n\n```java\nFluentProcess.start(\n    \"sh\",\n    \"-c\",\n    \"echo hello; echo world; exit 79\")\n        .withAllowedExitCode(79)\n        .stream()\n        .peek(System.out::println)\n        .count();\n```\n\n* You can also specify a timeout that will result in a `ProcessTimeoutException` exception:\n\n```java\nFluentProcess.start(\n    \"sh\",\n    \"-c\",\n    \"sleep 3600\")\n        .withTimeout(Duration.of(1, ChronoUnit.SECONDS))\n        .stream()\n        .count(); // \u003c- will throw an ProcessTimeoutException exception\n```\n\n## How to build\n\nJava 8 JDK and Maven are required to build this project.\n\nRun following command:\n\n```\nmvn clean package\n```\n\n## Maven Profiles\n\n- Safer: Slower but safer profile used to look for errors before pushing to SCM \n\n```\nmvn verify -P safer\n```\n\n### Integration tests\n\nThe integration test suite requires a Unix compatible system is installed on the system and and\n some very common commands (sh, cat, env and sed). \nTo launch the integrations tests run the following command:\n\n```\nmvn verify -P integration\n```\n\nTo run integration tests with Java debugging enabled on port 8000:\n\n```\nmvn verify -P integration -Dmaven.failsafe.debug=\"-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxandersen%2Ffluent-process","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxandersen%2Ffluent-process","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxandersen%2Ffluent-process/lists"}