RoadRunner CLI
A Composer-installed command-line tool for downloading, configuring, and managing the RoadRunner binary
Repository Health
Technical Analysis
RoadRunner CLI is a Symfony Console-based command-line tool, installed via Composer and exposed as bin/rr, that automates fetching the correct RoadRunner Go binary for a project’s OS/architecture, generating a starter .rr.yaml configuration, listing available RoadRunner release versions, and downloading the protoc binary used for gRPC code generation.
It exists so PHP developers do not have to manually download platform-specific RoadRunner binaries or hand-write configuration files: the tool detects the host operating system and architecture, resolves the requested version/stability constraint against GitHub releases, and unpacks the archive into the project. It is a companion package to the core roadrunner-server/roadrunner server and spiral/roadrunner-worker runtime library, not a replacement for either.
What You Get
- A
bin/rrexecutable installed via Composer that wraps binary download and configuration commands GetBinaryCommandto fetch the correct RoadRunner release for the host OS/architecture and version constraintMakeConfigCommandto scaffold a starter.rr.yamlconfiguration fileVersionsCommandto list available RoadRunner release versions and their stabilityDownloadProtocBinaryCommandto fetch theprotoccompiler for gRPC plugin development
Common Use Cases
- Bootstrapping a new RoadRunner-based PHP project without manually locating and downloading the right binary
- Pinning and upgrading the RoadRunner binary version as part of a Composer post-install script
- Generating a baseline
.rr.yamlconfiguration for teams new to RoadRunner - Setting up
protocfor projects that use RoadRunner’s gRPC plugin
Under The Hood
Architecture — The tool is a set of Symfony Console commands (src/GetBinaryCommand.php, src/MakeConfigCommand.php, src/VersionsCommand.php, src/DownloadProtocBinaryCommand.php) built on a shared Command base class, with option resolution split into small value objects under src/Command/ (OperatingSystemOption, ArchitectureOption, StabilityOption, VersionFilterOption, InstallationLocationOption) and release-fetching/unpacking logic isolated in src/Repository/ and src/Archive/. Tech Stack — PHP 8.1+, built on symfony/console for the CLI framework, symfony/http-client for GitHub release API calls, symfony/yaml for config generation, composer/semver for version-constraint resolution, and spiral/roadrunner-worker/spiral/tokenizer as runtime dependencies. Code Quality — The project uses Psalm (with a checked-in psalm-baseline.xml) and php-cs-fixer for static analysis and style enforcement; option parsing is decomposed into single-purpose classes rather than one large command, which keeps individual files small and testable. API Design — Commands follow Symfony Console conventions (--os, --arch, --version, --stability style flags), so anyone familiar with Symfony-based CLIs can use rr get-binary or rr make:config with minimal onboarding.