Any sample code for eyes(visual testing)

Can anyone share any sample code to use eyes for visual testing. I am getting error on eyes.init(). it is asking for applitools settings.

// add WinAppDriver script
web.init()
web.type(‘id=searchBar’, ‘Agile Testing’)
web.waitForExist(‘li.ui-screen-hidden’)
eyes.checkWindow(‘Agile Testing Books 1’)

Got it from the sample project
https://docs.oxygenhq.org/download-installation-start/start-working-with-oxygen/getting-started-web/sample-project-web-test

Thank you Eran for your reply, I have tried that but got following error:

“beforeCommand” hook failed:Hook does not exist: beforeCommand

MODULE_NOT_INITIALIZED_ERROR - Missing eyes.init() at /Users/…/Downloads/oxygen-master/tests/visual.js line 10

“afterCommand” hook failed:Hook does not exist: afterCommand

Test failed: [MODULE_NOT_INITIALIZED_ERROR] “Missing eyes.init()” at //oxygen-master/tests/visual.js line 10

Test finished with status --> FAILED.

when I used : eyes.init(‘web’);

then I am getting following error:

UNKNOWN_ERROR - Error: dlopen(/Applications/Oxygen.app/Contents/Resources/app.asar.unpacked/node_modules/canvas/build/Release/canvas.node, 1): Library not loaded: /usr/local/opt/jpeg/lib/libjpeg.9.dylib

Have you defined an Applitools account?
In the IDE you can define it through the settings button on the right
In CLI you define it in the project settings