PHPackages                             diffy-website/diffy-cli - 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. [CLI &amp; Console](/categories/cli)
4. /
5. diffy-website/diffy-cli

ActiveLibrary[CLI &amp; Console](/categories/cli)

diffy-website/diffy-cli
=======================

Diffy CLI tool.

0.1.45(5mo ago)913.0k↓20%15[1 issues](https://github.com/DiffyWebsite/diffy-cli/issues)[4 PRs](https://github.com/DiffyWebsite/diffy-cli/pulls)MITPHPPHP ^8.2CI passing

Since Jan 13Pushed 1mo ago3 watchersCompare

[ Source](https://github.com/DiffyWebsite/diffy-cli)[ Packagist](https://packagist.org/packages/diffy-website/diffy-cli)[ Docs](https://diffy.website/)[ RSS](/packages/diffy-website-diffy-cli/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (6)Versions (43)Used By (0)

DiffyCli
========

[](#diffycli)

Command-Line tool for interacting with Diffy.

Great for building integrations for your CI/CD tools. Allows taking screenshots, diffs, comparing environments.

[![Travis CI](https://camo.githubusercontent.com/12c794060bd0cd0ad31b4c0d26da4da68e7fe3991afe4b190c5295013b47c618/68747470733a2f2f7472617669732d63692e6f72672f4469666679576562736974652f64696666792d636c692e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/DiffyWebsite/diffy-cli)[![License](https://camo.githubusercontent.com/48ec640df7aa98ffef21cc458ad62f485e8c6afaab5ab4da8d13d84e1cd7779e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d3430383637372e737667)](LICENSE)

Usage
-----

[](#usage)

### Manual Installation

[](#manual-installation)

Download the latest release from  page. Download just `diffy.phar` file. No need for all the source code. You can copy file to your executables so it is available everywhere.

```
wget -O /usr/local/bin/diffy https://github.com/diffywebsite/diffy-cli/releases/latest/download/diffy.phar
chmod a+x /usr/local/bin/diffy
```

### Installation with Composer

[](#installation-with-composer)

```
composer require diffy-website/diffy-cli --with-all-dependencies
```

### Authentication

[](#authentication)

You need to obtain a Key to interact with API. This can be done from [Profile](https://app.diffy.website/#/keys).

Once you have a key -- run

```
diffy auth:login xxxxxxxxxxxx
```

This will save the key for future usages.

### Commands

[](#commands)

#### Take screenshots

[](#take-screenshots)

```
diffy screenshot:create PROJECT_ID ENVIRONMENT
```

PROJECT\_ID is an ID of the project. You can get it from URL of your project. ENVIRONMENT is one of "production", "staging", "development" (short options: "prod", "stage", "dev")

You can use `--wait` key to wait for the screenshot to be completed.

As a result, you will get an ID of the screenshot.

#### Compare screenshots (creating diff)

[](#compare-screenshots-creating-diff)

If you know your screenshots IDs the easiest would be:

```
diffy diff:create PROJECT_ID SCREENSHOT_ID1 SCREENSHOT_ID2
```

Also, you can create diff with custom name:

```
diffy diff:create PROJECT_ID SCREENSHOT_ID1 SCREENSHOT_ID2 --name="custom"
```

#### Shortcut to take screenshots and compare them right away

[](#shortcut-to-take-screenshots-and-compare-them-right-away)

```
diffy project:compare PROJECT_ID production staging
```

or compare with baseline

```
diffy project:compare PROJECT_ID baseline staging
```

or in case of custom environments (also set the name for the diff to be "custom")

```
diffy project:compare PROJECT_ID prod custom --env2Url="https://custom.example.com" --name="custom"
```

or in case of custom environment with basic auth credentials

```
diffy project:compare PROJECT_ID prod custom --env2Url="https://custom.example.com" --env2User="user" --env2Pass="password"
```

Allowed environments are: prod, stage, dev, custom (long options: production, staging, development).

#### Update project(s)

[](#update-projects)

If you want to update your config (For example, from CICD)

```
diffy project:update PROJECT_ID ./examples/project-settings.yaml
```

You can download project config file from Project Settings page. See

#### Create project(s)

[](#create-projects)

Similar you can create a project by passing the config file.

```
diffy project:create ./examples/diffy_create_project.yaml
```

#### Get project information

[](#get-project-information)

Get the full settings of the project

```
diffy project:get PROJECT_ID
```

#### Get list of diffs

[](#get-list-of-diffs)

```
diffy diff:list PROJECT_ID PAGE_NUMBER
```

PROJECT\_ID is an ID of the project. You can get it from URL of your project. PAGE\_NUMBER is number of the page results (starts from 0)

#### Baseline

[](#baseline)

There are two commands available to work with baseline set

```
diffy screenshot:create-baseline PROJECT_ID ENVIRONMENT # will create set of screenshots and set them as baseline right away
diffy screenshot:set-baseline PROJECT_ID SCREENSHOT_ID # set screenshots SCREENSHOT_ID as a baseline
```

#### Create screenshots from images

[](#create-screenshots-from-images)

```
diffy screenshot:create-uploaded 342 ./examples/diffy_create_screenshot_upload.json
```

### Github integration

[](#github-integration)

Main documentation page

The only difference you will need to have is to pass commit sha to compare operation:

```
diffy project:compare PROJECT_ID prod custom --env2Url="https://custom.example.com" --commit-sha="29b872765b21387b7adfd67fd16b7f11942e1a56"
```

### Examples

[](#examples)

Take a look at folder with [Examples](https://github.com/DiffyWebsite/diffy-cli/tree/master/examples). This is a collection of shell scripts that aim to give you an idea how CLI tool can be used in your CI pipelines.

Development
-----------

[](#development)

### Prerequisites

[](#prerequisites)

List the things that are needed to install the software and how to install them. For most PHP projects, it should usually be sufficient to run:

```
composer install

```

If you wish to build the phar for this project, install the `box` phar builder via:

```
composer phar:install-tools

```

### Installing

[](#installing)

Provide a step by step series of examples that show how to install this project.

Say what the step will be. If the phar for this project is the primary output, and not a mere development utility, then perhaps the first step will be to build the phar:

```
composer phar:build

```

It may then be sufficient to install via:

```
cp example.phar /usr/local/bin

```

End with an example of getting some data out of the system or using it for a little demo.

Running the tests
-----------------

[](#running-the-tests)

The test suite may be run locally by way of some simple composer scripts:

TestCommandRun all tests`composer test`PHPUnit tests`composer unit`PHP linter`composer lint`Code style`composer cs`Fix style errors`composer cbf`Deployment
----------

[](#deployment)

Add additional notes about how to deploy this on a live system.

If your project has been set up to automatically deploy its .phar with every GitHub release, then you will be able to deploy by the following procedure:

- Edit the `VERSION` file to contain the version to release, and commit the change.
- Run `composer release`

Built With
----------

[](#built-with)

List significant dependencies that developers of this project will interact with.

- [Composer](https://getcomposer.org/) - Dependency Management
- [Robo](https://robo.li/) - PHP Task Runner
- [Symfony](https://symfony.com/) - PHP Framework

Contributing
------------

[](#contributing)

Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on the process for submitting pull requests to us.

Versioning
----------

[](#versioning)

We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [releases](https://github.com/DiffyWebsite/diffy-cli/releases) page.

Authors
-------

[](#authors)

- **Yuri Gerasymov** - created project from template.

See also the list of [contributors](https://github.com/DiffyWebsite/diffy-cli/contributors) who participated in this project.

License
-------

[](#license)

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details

###  Health Score

55

—

FairBetter than 98% of packages

Maintenance81

Actively maintained with recent releases

Popularity35

Limited adoption so far

Community21

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~58 days

Recently: every ~66 days

Total

38

Last Release

152d ago

PHP version history (5 changes)0.1.1PHP &gt;=7.1

0.1.22PHP ^7.4||^8.0

0.1.23PHP ^7.4 || ^8.0

0.1.36PHP ^8.0

0.1.40PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/71764e71ca8d82358edfbae4e576dde1c113a07be24ffc46f4b85a9a980e9c3c?d=identicon)[ygerasimov](/maintainers/ygerasimov)

---

Top Contributors

[![ygerasimov](https://avatars.githubusercontent.com/u/294265?v=4)](https://github.com/ygerasimov "ygerasimov (68 commits)")[![svipsa](https://avatars.githubusercontent.com/u/5382284?v=4)](https://github.com/svipsa "svipsa (28 commits)")[![gregurcom](https://avatars.githubusercontent.com/u/64068982?v=4)](https://github.com/gregurcom "gregurcom (18 commits)")[![gregurco](https://avatars.githubusercontent.com/u/4052904?v=4)](https://github.com/gregurco "gregurco (11 commits)")[![TomVanEtten](https://avatars.githubusercontent.com/u/123970056?v=4)](https://github.com/TomVanEtten "TomVanEtten (10 commits)")[![LHRR](https://avatars.githubusercontent.com/u/99414309?v=4)](https://github.com/LHRR "LHRR (2 commits)")[![julien-](https://avatars.githubusercontent.com/u/7086610?v=4)](https://github.com/julien- "julien- (2 commits)")[![Snissink](https://avatars.githubusercontent.com/u/87116890?v=4)](https://github.com/Snissink "Snissink (2 commits)")[![Greg-Boggs](https://avatars.githubusercontent.com/u/653450?v=4)](https://github.com/Greg-Boggs "Greg-Boggs (1 commits)")[![dustinleblanc](https://avatars.githubusercontent.com/u/3948808?v=4)](https://github.com/dustinleblanc "dustinleblanc (1 commits)")[![jonnyhocks](https://avatars.githubusercontent.com/u/1545354?v=4)](https://github.com/jonnyhocks "jonnyhocks (1 commits)")[![rmuit](https://avatars.githubusercontent.com/u/153133?v=4)](https://github.com/rmuit "rmuit (1 commits)")

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/diffy-website-diffy-cli/health.svg)

```
[![Health](https://phpackages.com/badges/diffy-website-diffy-cli/health.svg)](https://phpackages.com/packages/diffy-website-diffy-cli)
```

###  Alternatives

[drush/drush

Drush is a command line shell and scripting interface for Drupal, a veritable Swiss Army knife designed to make life easier for those of us who spend some of our working hours hacking away at the command prompt.

2.4k57.4M685](/packages/drush-drush)[pantheon-systems/terminus

A command line interface for Pantheon

3391.5M13](/packages/pantheon-systems-terminus)[chromatic/usher

A collection of Robo commands for use on Chromatic projects.

13534.3k1](/packages/chromatic-usher)[statamic/cli

Statamic CLI Tool

7587.7k](/packages/statamic-cli)[mehrancodes/laravel-harbor

A CLI tool to Quickly create On-Demand preview environment for your apps.

9989.0k](/packages/mehrancodes-laravel-harbor)

PHPackages © 2026

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