juststeveking/os-process
A lightweight Laravel package for detecting the operating system your app runs on. Check for macOS, Windows, Linux and more through a simple, expressive API, then branch your code accordingly—useful for CLI tools, environment checks, and platform-specific logic.
Process::run() and symfony/process already arrives transitively — it is whether we standardise on one reviewable invocation contract or keep tolerating scattered exec() and shell_exec() calls with no shared handling of exit codes, timeouts, working directory, or stderr. os-process is a thin fluent façade over symfony/process; the "buy" is cheap, but so is the "build" (a ~50-line internal ProcessRunner). Frame this as a style and governance decision, not a capability decision, and price it accordingly.npm run build, external report generators. When a roadmap item's critical path depends on a CLI binary, this package can own the invocation layer: the fluent chain plus a result object (successful(), output(), errorOutput(), exit code) is the concrete value.rsync, docker, or a deploy script are the strongest fit, because the call site is already deliberate rather than ad hoc.proc_open is permitted. Confirm that before committing to a feature, not after — it rules out managed/serverless hosting and locked-down containers, and no wrapper fixes a disabled function.1.0.0 (Aug 2022) is the only release, the changelog is a bare commit-range link, there are 0 dependents and 76 stars, and one solo maintainer. Read that as a stable, finished, small utility — not as active maintenance. Plan no roadmap work against expected future features, and assume no security-response process exists.Consider adoption when:
$timeout set above the process timeout.ProcessRunner) so application code never depends on the facade directly and the package stays a swappable implementation detail.composer require.Look elsewhere when:
proc_open.Artisan::call(), a queued job, or Laravel's built-in process utilities already cover the need — adding a dependency for shell access you don't require is pure attack surface.For executives — one paragraph: This is a small, MIT-licensed utility that lets our application run approved system commands — asset builds, image conversion, backups — in a controlled, testable way instead of scattering raw shell calls through the codebase. It reached 1.0.0 in 2022 with a stable public interface, so we should not expect churn; equally, we should not expect ongoing investment. It is a narrow tool, not a platform or a strategic bet, and it is replaceable in a contained change if we wrap it properly. Approve it only alongside the specific feature that needs it, and treat the security review — argument escaping, timeouts, permission scope, permitted-command list — as the cost of entry rather than a formality.
For engineering — the honest summary: This is a thin, fluent wrapper over symfony/process, which we already have transitively. Adopting it buys expressiveness and consistency, not new capability — so the bar is "do we want one sanctioned call site for shell execution?", not "can we run commands?". The last release was August 2022, the changelog is a commit-range link with no enumerated features or breaking changes, there are zero dependents, and there is one maintainer. Treat the source as the spec. Before merge we want: the binary pinned and invoked with an argument array (no shell interpolation), working directory and timeout explicit, exit codes and stderr surfaced to the caller, output capture bounded, anything above a second or two dispatched through a queue with the job timeout above the process timeout, and contract tests covering success, non-zero exit, timeout, and missing binary that do not require the binary to exist in CI. If those hold — behind an internal ProcessRunner interface with the version pinned — this is a reasonable dependency. If the call sites can be satisfied by Artisan::call() or a queued job, we should not adopt it at all.
Recommendation: Conditional approval. Adopt as the implementation detail of a named feature, behind a project-owned interface, gated on a source review and a documented list of permitted commands. Do not add it to the platform baseline as a general-purpose utility. Because release activity stopped in 2022, assign an explicit owner for upgrades and for the decision to replace it with a trivial in-house wrapper if the maintainer goes inactive — and revisit the dependency rather than assuming it will maintain itself.
How can I help you explore Laravel packages today?