Bridge APIHome

Prompt for AI assistants

Paste this into ChatGPT, Claude, Gemini or any coding assistant, then describe the tool you want. Choose a self-contained HTML file, plain JavaScript (.js) script or standalone TypeScript (.ts) script for Kapsula 0.5.0. HTML can also be opened in a browser; .js scripts use the UI container supplied by Kapsula.

TypeScript prompt · JavaScript prompt · HTML prompt · JavaScript guide · Русская инструкция

Own projects require Kapsula Pro. Update Kapsula to 0.5.0 for standalone .ts import. Plain .js, saved-source editing and copyable code errors remain available.

How to use

  1. Choose the HTML, JavaScript or TypeScript prompt below and paste it into the chat.
  2. Add one line describing your tool: "A tea timer with 3/5 minute buttons", "A Pomodoro with a daily count", "A medication reminder at 9:00 and 21:00".
  3. In Kapsula, open Add project, select the matching format and paste the code, or choose the .html/.js/.ts file. Tap Run. Edit the saved source later with Update code in the same project to keep its data.

TypeScript (.ts) prompt · Kapsula 0.5.0

One standalone .ts script, converted offline on your device. No full type checking, imports, npm or JSX/React. Guide and workout.ts → · Русская инструкция →

HTML prompt

Plain JavaScript (.js) prompt

One script, no HTML wrapper or dependencies. Choose JavaScript (.js) when pasting. The script creates its own UI in #app.

Edit and fix with AI

Open project settings → Update code to edit saved HTML/JavaScript/TypeScript. Updating that project preserves its storage; keep your data format compatible. If code fails, use Copy the error for your AI, then send the error and source to your own chat yourself. There is no automatic AI upload or version rollback.

Already have code that doesn't alert you?

If an assistant wrote a plain browser page — the Notification API, a bare setInterval timer, localStorage — it opens in Kapsula but stays silent once the phone is locked, or says something like "notifications are not supported in this environment". That is the code, not a Kapsula limit. Paste the prompt above into the same chat and add: "Rewrite my previous HTML for Kapsula following these rules. Replace the Notification API and background timers with K.notify.schedule(), and localStorage with K.storage."

Why the prompt matters

Assistants don't know Kapsula's bridge yet. The prompt teaches them the five things that make a page behave like an app: the sandbox rules, where state must live, how alarms are scheduled, the 16-alarm limit, and graceful fallback in a normal browser. Full details: bridge API reference.

Kapsula runs only code you add yourself. Nothing is sent to Kapsula's servers — there are none.

Try the complete focus-timer walkthrough: prompt, HTML download and phone test