Cursor integration
Add live chat to a site you build with Cursor
In Cursor, the Agent writes the code. Give it the Hooky prompt: it finds your project’s shared template, whatever the framework, and adds the chat bubble. You deploy as usual and reply from your phone.
Why add chat to your site
When you code with Cursor, you control everything: your framework, your host, your domain. Building real-time chat yourself, though, means a backend, websockets, a mobile app to reply from… Hooky gives you all of that with one line of code: the bubble on your site, the inbox and notifications on your phone.
Install Hooky with Cursor’s Agent
Create your Hooky account (free for one site), add your site and copy its prompt from Sites: the key is already in it.
Open your project in Cursor and start the Agent in the side pane (Cmd+I on Mac).
Paste the prompt. The Agent looks for the template shared by every page and adds the tag. Review the diff before accepting it: a single line should appear (two with the import for Next.js).
Deploy as usual: commit, push, or your host’s command (Vercel, Netlify, your own server…). Cursor doesn’t publish your site for you.
The prompt for Cursor
Add the Hooky chat bubble to this site, on every page. Find the HTML template shared by every page (index.html for React or Vite, app/layout.tsx for Next.js with the Script component from next/script and strategy="afterInteractive", the base layout for Astro, Nuxt, SvelteKit, Rails or Django) and paste this tag there once, right before </body>:
<script src="https://heyhooky.com/widget.js" data-site-key="SITE_PUBLIC_KEY" async></script>
Don’t change the script URL or the data-site-key attribute. Don’t add any other code: the bubble shows up on its own. If the site has several independent templates, add the tag to each and tell me which ones.
Cursor’s Agent can also read Hooky’s docs for AI: start the prompt with “Read https://heyhooky.com/llms.txt first”, and it will also know how to count your conversions with Hooky.track.
Test locally, then live
To see the bubble on your dev server, add localhost to the site’s allowed addresses in Hooky (all ports are covered), or don’t declare any address yet: the bubble then works everywhere. A page opened as a file (file://) has no address: serve it with a small local server.
Once deployed, open your domain: the bubble is at the bottom of the screen, and your test message lands in Messages.
Go further with the Agent
- A “Message us” button: ask it to call
Hooky.open()on click (docs). - Your stats:
Hooky.track("signup")after a successful signup,Hooky.track("purchase", { value: 49 })after a payment (docs). - Server side: events through the API with the site’s secret key, or your alerts (order, deploy, error) in the site’s channel, in Slack webhook format (docs).
Frequently asked questions
Can Cursor install Hooky without me opening the dashboard?
Yes. Tell the Agent: “Read https://heyhooky.com/llms.txt, then create a Hooky account with my email and install the bubble on https://my-site.com”. It calls the signup API, adds the tag, and you get an email to activate your account. See Create an account from an AI.
What about the MCP server?
It’s coming soon: Cursor will then be able to install Hooky by itself. Until then, the prompt and llms.txt do the job.
My site has a strict CSP
At a minimum, allow https://heyhooky.com for scripts, and https://api.heyhooky.com as well as wss://api.heyhooky.com for connections (requests and real time). Photos attached to messages may come from another origin: if one doesn’t display, the browser console will tell you what to add.
Does the bubble slow my site down?
It loads async, with no dependency and no cookie, and lives in a Shadow DOM: it doesn’t block rendering and doesn’t touch your styles.
Other tools
Your visitors have questions. Answer them from wherever you are.
Free for one site, installed with one prompt. Then just keep your phone in your pocket.