# @mushi-mushi/svelte

> Svelte SDK for Mushi Mushi — context-based init, SvelteKit error hook integration

Latest version **1.0.2** (published 2026-06-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install @mushi-mushi/svelte
pnpm add @mushi-mushi/svelte
yarn add @mushi-mushi/svelte
bun add @mushi-mushi/svelte
```

## Health

**Score 50/100 (C)** — status: active.

Positive: no vulnerabilities; high maintenance score.

Warnings: low downloads; no types; no esm support.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2026-06-23 |
| First published | 2026-04-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Kenji Sakuramoto |
| Maintainers | kensaurus |
| Keywords | mushi-mushi, bug-reporting, user-feedback, user-report, feedback-widget, svelte, sveltekit, session-replay, screenshot, shake-to-report, sentry-companion, error-tracking, ai-triage, auto-fix, llm-ops, ai-agent, sdk |

## Links

- npm: https://www.npmjs.com/package/@mushi-mushi/svelte
- Repository: https://github.com/kensaurus/mushi-mushi
- Homepage: https://kensaur.us/mushi-mushi
- Issues: https://github.com/kensaurus/mushi-mushi/issues
- npm.io page: https://npm.io/package/@mushi-mushi/svelte

## Alternatives

- [@sentry/react-native](https://npm.io/package/@sentry/react-native.md) — 2.6M weekly downloads
- [@ardatan/aggregate-error](https://npm.io/package/@ardatan/aggregate-error.md) — 708.1K weekly downloads
- [custom-error-generator](https://npm.io/package/custom-error-generator.md) — 2.0K weekly downloads
- [@technik-sde/prosemirror-recreate-transform](https://npm.io/package/@technik-sde/prosemirror-recreate-transform.md) — 1.5K weekly downloads
- [@suchipi/error-utils](https://npm.io/package/@suchipi/error-utils.md) — 78 weekly downloads

## Recent versions

- 1.0.2 (latest) — 2026-06-23
- 1.0.1 — 2026-06-18
- 1.0.0 — 2026-06-17
- 0.9.0 — 2026-05-21
- 0.8.4 — 2026-05-20
- 0.8.3 — 2026-05-20
- 0.8.2 — 2026-05-09
- 0.8.1 — 2026-05-05
- 0.8.0 — 2026-04-28
- 0.7.0 — 2026-04-27
- 0.3.2 — 2026-04-24
- 0.3.1 — 2026-04-23
- 0.3.0 — 2026-04-23
- 0.2.3 — 2026-04-22
- 0.2.2 — 2026-04-22
- … 3 more at https://npm.io/package/@mushi-mushi/svelte/versions

## README

# @mushi-mushi/svelte

> **Your AI wrote it. Mushi tells you why it broke.**

Svelte SDK for Mushi Mushi bug reporting. **API-only** — captures errors and submits reports but does not include the widget UI. Add `@mushi-mushi/web` alongside this package for the full Shadow DOM widget experience.

> **One-command setup:** `npx mushi-mushi` auto-detects Svelte / SvelteKit and installs this package + `@mushi-mushi/web`.
>
> **Other frameworks:** [`@mushi-mushi/react`](https://npmjs.com/package/@mushi-mushi/react) · [`@mushi-mushi/vue`](https://npmjs.com/package/@mushi-mushi/vue) · [`@mushi-mushi/angular`](https://npmjs.com/package/@mushi-mushi/angular) · [`@mushi-mushi/react-native`](https://npmjs.com/package/@mushi-mushi/react-native) · [`@mushi-mushi/capacitor`](https://npmjs.com/package/@mushi-mushi/capacitor) · [`@mushi-mushi/web`](https://npmjs.com/package/@mushi-mushi/web) (vanilla JS)

## Install

```bash
npm install @mushi-mushi/svelte @mushi-mushi/web
# or: npx mushi-mushi
```

## Environment variables

| Stack | Project ID | API key |
| --- | --- | --- |
| Vite / SvelteKit | `VITE_MUSHI_PROJECT_ID` | `VITE_MUSHI_API_KEY` |

See [Project ID & API keys](https://docs.mushimushi.dev/concepts/credentials).

## Usage

```ts
import { initMushi, getMushi } from '@mushi-mushi/svelte'

initMushi({
  projectId: import.meta.env.VITE_MUSHI_PROJECT_ID,
  apiKey: import.meta.env.VITE_MUSHI_API_KEY,
})

const mushi = getMushi()
mushi.submitReport({ title: 'broken', description: '...' })
```

### With widget UI

```ts
import { initMushi } from '@mushi-mushi/svelte'
import { Mushi } from '@mushi-mushi/web'

initMushi({
  projectId: import.meta.env.VITE_MUSHI_PROJECT_ID,
  apiKey: import.meta.env.VITE_MUSHI_API_KEY,
})

Mushi.init({
  projectId: import.meta.env.VITE_MUSHI_PROJECT_ID,
  apiKey: import.meta.env.VITE_MUSHI_API_KEY,
})
```

### SvelteKit error handler

```ts
import { createMushiErrorHandler } from '@mushi-mushi/svelte'

export const handleError = createMushiErrorHandler()
```

## API

| Export | Purpose |
| --- | --- |
| `initMushi(config)` | Initialize once at app startup |
| `getMushi()` | Access the SDK instance |
| `createMushiErrorHandler()` | SvelteKit `handleError` integration |

## Peer dependencies

- `svelte` >= 4

## License

MIT

---
_Source: https://npm.io/package/@mushi-mushi/svelte · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
