Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Mago Laravel Package

carthage-software/mago

Mago is an extremely fast PHP linter, formatter, and static analyzer written in Rust. It brings Rust-inspired speed and reliability to PHP projects with a modern toolchain and great developer experience, plus multiple install options (script, Homebrew, Composer).

View on GitHub
Deep Wiki
Context7

title: Linter command reference outline: deep

Command reference

The mago lint command is the entry point for all linting-related tasks.

:::tip For global options that can be used with any command, see the Command-Line Interface overview. Remember to specify global options before the lint command. :::

Usage: mago lint [OPTIONS] [PATH]...

Arguments

[PATH]...

Optional. A list of specific files or directories to lint. If you provide paths here, they will be used instead of the paths defined in your mago.toml configuration.

Options

Flag, Alias(es) Description
--list-rules List all enabled linter rules and their descriptions.
--json Used with --list-rules to output the rule information in a machine-readable JSON format.
--explain <RULE_CODE> Provide detailed documentation for a specific linter rule (e.g., no-redundant-nullsafe).
--only <RULE_CODE>, -o Run only a specific, comma-separated list of rules, overriding the configuration file.
--pedantic Enable all linter rules for the most exhaustive analysis possible. This overrides your configuration, ignores PHP version constraints, and enables rules that are disabled by default.
--semantics, -s Perform only the parsing and basic semantic checks without running any lint rules.
--staged Only lint files that are staged in git. Designed for pre-commit hooks. Fails if not in a git repository.
--stdin-input Read file content from stdin and use the single path argument for baseline and reporting. Intended for editor integrations (e.g. unsaved buffers). Requires exactly one path.
--help, -h Print the help summary for the command.

Reading from stdin (editor integration)

When using an editor or IDE that can pipe unsaved buffer content, you can run the linter on that content while still using the real file path for baseline lookup and issue locations:

cat src/Example.php | mago lint --stdin-input src/Example.php

You must pass exactly one path; it is used as the logical file name (workspace-relative) for baseline matching and diagnostics. The path is normalized (e.g. ./src/Example.php is treated like src/Example.php). This mode conflicts with --staged.

Shared Reporting and Fixing Options

The lint command shares a common set of options with other Mago tools for reporting, fixing, and baseline management.

See the Shared Reporting and Fixing Options documentation.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport