PHPackages                             jeffochoa/amp-validator - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. jeffochoa/amp-validator

ActiveProject[Framework](/categories/framework)

jeffochoa/amp-validator
=======================

Test your Accelerated Mobile Pages right away from your terminal.

v1.0.1(7y ago)14784[1 PRs](https://github.com/jeffochoa/amp-validator/pulls)MITPHPPHP ^7.1.3

Since Jul 20Pushed 5y ago1 watchersCompare

[ Source](https://github.com/jeffochoa/amp-validator)[ Packagist](https://packagist.org/packages/jeffochoa/amp-validator)[ RSS](/packages/jeffochoa-amp-validator/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (4)Versions (3)Used By (0)

 [![AMP validation Example](https://raw.githubusercontent.com/jeffochoa/amp-validator/master/docs/example.png)](https://raw.githubusercontent.com/jeffochoa/amp-validator/master/docs/example.png)

 [![Total Downloads](https://camo.githubusercontent.com/97b7ddba5e14968911047f092f7ac397eaca3cc2a3c05b81220036000ba9fd87/68747470733a2f2f706f7365722e707567782e6f72672f6a6566666f63686f612f616d702d76616c696461746f722f642f746f74616c2e737667)](https://packagist.org/packages/jeffochoa/amp-validator) [![Latest Version](https://camo.githubusercontent.com/e44750ad4d7f803f43a275a216caf965847ad406d1058f3c982718542f7865fe/68747470733a2f2f706f7365722e707567782e6f72672f6a6566666f63686f612f616d702d76616c696461746f722f762f737461626c652e737667)](https://packagist.org/packages/jeffochoa/amp-validator) [![License](https://camo.githubusercontent.com/312bdfc42ccf01d31496fc8815503157945c3b8938b26c5c64ee79fb89a2e53f/68747470733a2f2f706f7365722e707567782e6f72672f6a6566666f63686f612f616d702d76616c696461746f722f6c6963656e73652e737667)](https://packagist.org/packages/jeffochoa/amp-validator)

---

About AMP validation CLI tool
-----------------------------

[](#about-amp-validation-cli-tool)

Test your Accelerated Mobile Pages right away from your terminal.

[![AMP online validation tool](https://raw.githubusercontent.com/jeffochoa/amp-validator/master/docs/validation-video.jpg)](https://www.ampproject.org/docs/fundamentals/validate)

This package uses CLOUDFARE's [AMP validator API](https://blog.cloudflare.com/amp-validator-api/).

Installation
------------

[](#installation)

### Via Composer

[](#via-composer)

```
composer global require jeffochoa/amp-validator
```

### Manually

[](#manually)

First, download the binary using `wget`:

```
wget https://github.com/jeffochoa/amp-validator/blob/master/builds/amp-validator -O amp-validator
```

Change binary permissions:

```
sudo chmod ax amp-validator
```

Move to bin directory:

```
sudo mv amp-validator /usr/local/bin/amp-validator
```

Usage
-----

[](#usage)

```
amp-validator
```

### Singe page validation

[](#singe-page-validation)

The given URL should be publicly accessible.

```
amp-validator validate http://website.test/valid-amp-link
```

### Validate a batch of links

[](#validate-a-batch-of-links)

You can use the generated CSV report by [Google Webmaster Tools](https://www.google.com/webmasters/tools/home) (GWT) as input to validate locally.

[![AMP online validation tool](https://raw.githubusercontent.com/jeffochoa/amp-validator/master/docs/csv-download.png)](https://www.google.com/webmasters/tools/accelerated-mobile-pages)

Go to

Download the AMP report in `Search Appearance / Accelerate mobile pages`

Once you have the file downloaded locally:

```
amp-validator validate-batch path-to-file/downloaded.csv
```

This tool will read the CSV file generated on GWT to run the validation on each tests contained in the file, then you can select between the different types of output formats to export your report.

```

    Please select an output format
    ----------------------------------------------------------------------------------

    ● Export to CSV file
    ○ In console (summarized)
    ○ In console (extended)
    ○ Cancel

```

#### Extra help to fix the errors in your page

[](#extra-help-to-fix-the-errors-in-your-page)

The following example is the output generated using the "In console (extended)" option:

```
-----------------------------------------------------------------------------------
| Key     | Value                                                                    |
-----------------------------------------------------------------------------------
| link    | https://you-given-url.test                                               |
| error   | The attribute 'target' in tag 'a' is set to the invalid value 'blank'.   |
| line    | 1221                                                                     |
| col     | 3                                                                        |
| code    | INVALID_ATTR_VALUE                                                       |
| help    | https://www.ampproject.org/docs/reference/spec#links                     |
| preview | https://search.google.com/test/amp?url=https://you-given-url.test        |
------------------------------------------------------------------------------------

```

If you click on the `preview` link, you'll be taken to the online google validation tool.

[![AMP online validation tool](https://raw.githubusercontent.com/jeffochoa/amp-validator/master/docs/test-online.jpg)](https://raw.githubusercontent.com/jeffochoa/amp-validator/master/docs/test-online.jpg)

License
-------

[](#license)

AMP Validator is an open-sourced software licensed under the [MIT license](LICENSE.md).

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 56.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Total

2

Last Release

2852d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/80d5b818ba7e153fc45449cac9bf17346ac5c668a32596b454f3d5380281207e?d=identicon)[jeffer8a](/maintainers/jeffer8a)

---

Top Contributors

[![nunomaduro](https://avatars.githubusercontent.com/u/5457236?v=4)](https://github.com/nunomaduro "nunomaduro (9 commits)")[![jeffochoa](https://avatars.githubusercontent.com/u/8247079?v=4)](https://github.com/jeffochoa "jeffochoa (7 commits)")

---

Tags

cliconsoleframeworklaravellaravel-zeroamp

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/jeffochoa-amp-validator/health.svg)

```
[![Health](https://phpackages.com/badges/jeffochoa-amp-validator/health.svg)](https://phpackages.com/packages/jeffochoa-amp-validator)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
