Download the PHP package diffy-website/diffy-cli without Composer
On this page you can find all versions of the php package diffy-website/diffy-cli. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download diffy-website/diffy-cli
More information about diffy-website/diffy-cli
Files in diffy-website/diffy-cli
Package diffy-cli
Short Description Diffy CLI tool.
License MIT
Homepage https://diffy.website/
Informations about the package diffy-cli
DiffyCli
Command-Line tool for interacting with Diffy.
Great for building integrations for your CI/CD tools. Allows taking screenshots, diffs, comparing environments.
Usage
Manual Installation
Download the latest release from https://github.com/DiffyWebsite/diffy-cli/releases 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.
Installation with Composer
Authentication
You need to obtain a Key to interact with API. This can be done from Profile.
Once you have a key -- run
This will save the key for future usages.
Commands
Take screenshots
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.
Get screenshot status
Prints 1 when the set of screenshots is completed, and nothing while it is still being captured.
Add --format=json to get the capture state and progress instead:
state is -1 stopped, 0 not started, 1 in progress, 2/3/4 completed. Note that the plain
output 1 means completed, while state of 1 means the capture is still in progress.
Compare screenshots (creating diff)
If you know your screenshots IDs the easiest would be:
Also, you can create diff with custom name:
Shortcut to take screenshots and compare them right away
or compare with baseline
or in case of custom environments (also set the name for the diff to be "custom")
or in case of custom environment with basic auth credentials
Allowed environments are: prod, stage, dev, custom (long options: production, staging, development).
Update project(s)
If you want to update your config (For example, from CICD)
You can download project config file from Project Settings page. See https://docs.diffy.website/features/configure-project-from-yaml-file
Create project(s)
Similar you can create a project by passing the config file.
Get project information
Get the full settings of the project
Get list of diffs
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
There are two commands available to work with baseline set
Create screenshots from images
Github integration
Main documentation page http://diffy.website/documentation/github-integration
The only difference you will need to have is to pass commit sha to compare operation:
GitLab integration
Pass the commit SHA and merge request IID to enable commit statuses and MR comments:
Examples
Take a look at folder with 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
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:
If you wish to build the phar for this project, install the box phar builder via:
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:
It may then be sufficient to install via:
End with an example of getting some data out of the system or using it for a little demo.
Running the tests
The test suite may be run locally by way of some simple composer scripts:
| Test | Command |
|---|---|
| Run all tests | composer test |
| PHPUnit tests | composer unit |
| PHP linter | composer lint |
| Code style | composer cs |
| Fix style errors | composer cbf |
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
VERSIONfile to contain the version to release, and commit the change. - Run
composer release
Built With
List significant dependencies that developers of this project will interact with.
Contributing
Please read CONTRIBUTING.md for details on the process for submitting pull requests to us.
Versioning
We use SemVer for versioning. For the versions available, see the releases page.
Authors
- Yuri Gerasymov - created project from template.
See also the list of contributors who participated in this project.
License
This project is licensed under the MIT License - see the LICENSE file for details
All versions of diffy-cli with dependencies
ext-json Version *
consolidation/robo Version ^5.1.1
cweagans/composer-patches Version ~2.0
diffywebsite/diffy-php Version ^1
guzzlehttp/guzzle Version ^7
n98/junit-xml Version ^1.1