a chrome extension that performs web browsing actions autonomously to complete a given goal/task (using LLM as a brain).
- Check if your
Node.js
version is >= 14. - Run
npm install
to install the dependencies. - replace your GEMINI api key in
.env.template
and rename the file to.env
run the command
$ cd clickolas-cage
$ npm run dev
This runs the chrome extension locally.
Also run
$ npx @portkey-ai/gateway
To run the ai gateway locally
- set your Chrome browser 'Developer mode' up
- click 'Load unpacked', and select
clickolas-cage/build
folder
The main source files are:
src/popup/popup.jsx
The popup window that shows when you press the extension iconsrc/background/background.js
Persists and facilitates planningsrc/contentScript/contentScript.js
Executes on web pages, executes actions and scrapes elementssrc/utils.js
Helper functions
- User clicks extension icon, enters and submits goal prompt
- Popup.jsx sends a message to background.js with request type 'new_goal'
- background.js calls promptToFirstStep() in utils.js
- LLM returns starting URL which feeds into navURL()
- navURL will open a new tab with the starting URL
- getNextStep() is called which will get contentScript to extract clickable elements and send it to LLM to generate next step
After the development of your extension run the command
$ npm run build
Now, the content of build
folder will be the extension ready to be submitted to the Chrome Web Store. Just take a look at the official guide to more infos about publishing.
Generated by create-chrome-ext