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 scription taking screenshots, diffs, comparing environments.
Usage
Manual Installation
Download 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.
Installion 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.
Also, you can create diff with custom name:
Compare screenshots with id SCREENSHOT_ID1 and SCREENSHOT_ID2
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
or with existing screenshots
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)
See the ./examples/diffy_update_project.json or ./examples/diffy-project-projectID-demo-test-project.yaml file for a valid config file.
For multiple projects
The PROJECT_ID is defined by the key inside the JSON object.
Create project(s)
Similar you can create a project by passing the config file.
You can create multiple projects by giving an array of projects.
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:
BrowserStack integration
If you have Automate Pro plan or higher we can use Screenshot API to generate screenshots and send them to Diffy.
For that you need following steps.
Save credentials. They can be obtained at account setting page.
Get a list of all possible browsers available to choose which ones you would like to use.
Run process of taking screenshots
LambdaTest integration
If you have Live plan or higher we can use Screenshot API to generate screenshots and send them to Diffy.
For that you need following steps.
First you need to save credentials. They can be obtained at account setting page. You need to pass your Username and Access Token.
Get a list of all possible browsers available to choose which ones you would like to use.
Run process of taking screenshots
Once the job is completed you can see screenshots set appeared in your project.
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
VERSION
file 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
- Yuriy Gerasimov - 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 ^4
diffywebsite/diffy-php Version ^1
guzzlehttp/guzzle Version ^7
n98/junit-xml Version ^1.1
symfony/yaml Version ^6.4