Setup Mago is a GitHub Action that brings the Mago CLI to your GitHub Actions workflows. It handles downloading and installing the correct Mago binary for your runner’s operating system and architecture, with smart automatic version detection from your project’s Composer files.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/nhedger/setup-mago/llms.txt
Use this file to discover all available pages before exploring further.
Introduction
Learn what Setup Mago does and how it fits into your PHP CI pipeline.
Quickstart
Add Setup Mago to your workflow in under two minutes.
Version Detection
Understand how the action automatically picks the right Mago version.
Inputs Reference
Full reference for all action inputs: version, token, and working-directory.
Why Setup Mago?
Mago is a fast, opinionated PHP toolchain for linting and formatting. Setup Mago makes it trivial to integrate Mago into any GitHub Actions workflow — no manual binary downloads, no platform-specific scripts, and no version drift between local and CI environments.Auto Version Detection
Reads the exact version from your
composer.lock so CI always matches your local environment.Cross-Platform
Supports Linux, macOS, and Windows runners on both x64 and arm64 architectures.
Zero Config
Works out of the box with no required inputs — just add the step and run
mago.Quick Example
.github/workflows/lint.yaml
For a full walkthrough including version pinning and multi-platform matrix setups, see the Quickstart.