Polyscope - The agent-first dev environment for Laravel

Mago

Mago stats

Downloads
321.2K
Stars
2,261
Open Issues
51
Forks
89

View on GitHub →

Mago is a toolchain for PHP that aims to provide a set of tools to help developers write better code.

Mago Banner

An extremely fast PHP linter, formatter, and static analyzer, written in Rust.

Mago is a comprehensive toolchain for PHP that helps developers write better code. Inspired by the Rust ecosystem, Mago brings speed, reliability, and an exceptional developer experience to PHP projects of all sizes.

Table of Contents

Installation

The most common way to install Mago on macOS and Linux is by using our shell script:

curl --proto '=https' --tlsv1.2 -sSf https://carthage.software/mago.sh | bash

To install a specific version:

curl --proto '=https' --tlsv1.2 -sSf https://carthage.software/mago.sh | bash -s -- --version=1.0.0

For all other installation methods, including Homebrew, Composer, and Cargo, please refer to our official Installation Guide.

Getting Started

To get started with Mago and learn how to configure your project, please visit our Getting Started Guide in the official documentation.

Features

  • ⚡️ Extremely Fast: Built in Rust for maximum performance.
  • 🔍 Lint: Identify issues in your codebase with customizable rules.
  • 🔬 Static Analysis: Perform deep analysis of your codebase to catch potential type errors and bugs.
  • 🛠️ Automated Fixes: Apply fixes for many lint issues automatically.
  • 📜 Formatting: Automatically format your code to adhere to best practices and style guides.
  • 🧠 Semantic Checks: Ensure code correctness with robust semantic analysis.
  • 🌳 AST Visualization: Explore your code’s structure with Abstract Syntax Tree (AST) parsing.

Our Sponsors

JetBrains

Jason R. McNeilVincent Berset

Bohuslav ŠimekTicketSwap

See all sponsors

Contributing

Mago is a community-driven project, and we welcome contributions! Whether you're reporting bugs, suggesting features, writing documentation, or submitting code, your help is valued.

Inspiration & Acknowledgements

Mago stands on the shoulders of giants. Our design and functionality are heavily inspired by pioneering tools in both the Rust and PHP ecosystems.

Inspirations:

  • Clippy: For its comprehensive linting approach.
  • OXC: A major inspiration for building a high-performance toolchain in Rust.
  • Hakana: For its deep static analysis capabilities.

Acknowledgements:

We deeply respect the foundational work of tools like PHP-CS-Fixer, Psalm, PHPStan, and PHP_CodeSniffer. While Mago aims to offer a unified and faster alternative, these tools paved the way for modern PHP development.

License

Mago is dual-licensed under your choice of the following:

Cube

Laravel Newsletter

Join 40k+ other developers and never miss out on new tips, tutorials, and more.


Carthage Software Mago Related Articles

Statamic 6 Is Officially Released image

Statamic 6 Is Officially Released

Read article
Authentication With Laravel and MongoDB image

Authentication With Laravel and MongoDB

Read article
Marketing as Code: Laravel Screenshot Automation image

Marketing as Code: Laravel Screenshot Automation

Read article
Observability vs monitoring image

Observability vs monitoring

Read article
Laravel Nova 4 - A teaser image

Laravel Nova 4 - A teaser

Read article
Invoker–the no-bull Laravel tool image

Invoker–the no-bull Laravel tool

Read article
Harpoon: Next generation time tracking and invoicing logo

Harpoon: Next generation time tracking and invoicing

The next generation time-tracking and billing software that helps your agency plan and forecast a profitable future.

Harpoon: Next generation time tracking and invoicing
Honeybadger logo

Honeybadger

Simple developer-focused application monitoring for Laravel. Error tracking, log management, uptime monitoring, status pages, and more!

Honeybadger
Lucky Media logo

Lucky Media

Get Lucky Now - the ideal choice for Laravel Development, with over a decade of experience!

Lucky Media
Laravel Cloud logo

Laravel Cloud

Easily create and manage your servers and deploy your Laravel applications in seconds.

Laravel Cloud
Tighten logo

Tighten

We help companies turn great ideas into amazing apps, products, and services.

Tighten
Kirschbaum logo

Kirschbaum

Providing innovation and stability to ensure your web application succeeds.

Kirschbaum