Disturb-AI helps you stay mindful of distractions while working online. It lets you set a focus goal, detects distracting browsing behavior and alerts you when your focus strays too long.
- Clone this repository.
- Run
npm install
to install dependencies. - During development, use
npm run dev
and load thesrc
folder as an unpacked extension. - For production, run
npm run build
to generate the extension in thedist/
folder. - Load the
dist
folder as an unpacked extension in Chrome. - Provide your OpenAI API key on the settings page to enable distraction detection.
- Saved options and focus goals are automatically loaded the next time you open the popup or options page.
- Optionally add your own extension icons under
src/icons
and reference them inmanifest.json
.
The source under src/
contains a minimal working skeleton. Edit the scripts to add advanced distraction detection logic.
If you'd like to recreate this extension completely from scratch, follow these basic steps. They mirror how this repository was initialized.
- Initialise a new Node project:
npm init -y
- Install React, Vite and the React plugin for Vite:
npm install -D vite @vitejs/plugin-react react react-dom
- Create a
src/
directory and within it addpopup.html
andoptions.html
. - Create React entry points (e.g.
popup-main.jsx
andoptions-main.jsx
) that mount your React components. - Write a minimal
manifest.json
referencing your HTML files and a background service worker script. - Add a
vite.config.js
(see this repo for reference) so thatnpm run dev
andnpm run build
work correctly. - Update
package.json
scripts to includedev
,build
and optionallytest
commands.
A simple GitHub Actions workflow installs dependencies and runs npm test
on pull requests.
Placeholder license text.