Skip to Content
v0.8.0 · shippedNative iOS / Android / Flutter / Capacitor SDKs, A2A discovery, SOC 2 readiness, residency, BYO storage, BYOK. Read the changelog →
QuickstartVanilla JS

Vanilla JS quickstart

For non-React apps (or any framework you’d rather drive imperatively).

Try it live

Live playground — Vanilla JS + ViteOpen in StackBlitz ↗
Booting WebContainer…

1. Install

pnpm add @mushi-mushi/web

2. Initialize

src/mushi.ts
import { initMushi } from '@mushi-mushi/web' const mushi = initMushi({ projectId: import.meta.env.VITE_MUSHI_PROJECT_ID, apiKey: import.meta.env.VITE_MUSHI_API_KEY, }) window.addEventListener('beforeunload', () => mushi.flushOfflineQueueNow())

3. Submit

import { mushi } from './mushi' document.querySelector('#report-bug')?.addEventListener('click', async () => { await mushi.submitReport({ description: 'Login button does nothing on mobile Safari.', severity: 'medium', }) })

The widget (Shake-to-Report on touch devices, sticky button on desktop) mounts automatically with enableWidget: true, which is the default.

⚙️

See SDK reference → @mushi-mushi/web for the full config surface (PII scrubbing, rate limits, custom triggers, on-device pre-filter).

Last updated on