Integrations Getting Started
We have built a CLI tool https://github.com/DiffyWebsite/diffy-cli so you can integrate Diffy with your CI workflows.
Download the latest release from https://github.com/DiffyWebsite/diffy-cli/releases page. You can copy the file to your executables so it is available everywhere.
chmod a+x diffy.phar cp diffy.phar /usr/local/bin/diffy
You will need to create a Key to authentication the CLI tool. You can find it under the My Account menu.
Once you have a key you can run auth:login
diffy auth:login XXXXXXXX
For security reasons, we encourage you to keep the key as an environmental variable in your CI service. In this way, it won't be exposed to anyone who has access to the code of your project.
Next, you can run the following commands to trigger creating the screenshots and comparing them.
diffy screenshot:create PROJECT_ID ENVIRONMENT
PROJECT_ID is an ID of the project. You can get it from the URL of your project. ENVIRONMENT is one of "production", "staging", "development"
You can use
--wait key to wait for the screenshot to be completed.
As a result, you will get an ID of the screenshot.
diffy diff:create PROJECT_ID SCREENSHOT_ID1 SCREENSHOT_ID2
Compare screenshots with id SCREENSHOT_ID1 and SCREENSHOT_ID2.
We encourage you to check out our examples of shell scripts https://github.com/DiffyWebsite/diffy-cli/tree/master/examples.
If you find some commands are missing please let us know so they will get implemented asap.