Skip to content

kensaurus/mushi-mushi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

193 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mushi Mushi

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

Plain-English diagnosis + a paste-ready fix, right inside Cursor and Claude Code. No log-reading. No second LLM API key for MCP.

Fastest path β€” drop Mushi into your AI editor:

npx mushi-mushi setup --ide cursor   # or: --ide claude

Already shipping an app? One command installs the SDK + env vars + an optional test report:

npx mushi-mushi

Open source, self-hostable, MIT JS core β€” bring your own LLM key, no second key for MCP, no lock-in. Self-host in minutes Β· licensing.

What is Mushi, exactly? Read the one-page constitution: VISION.md β€” the single source of truth for positioning, the north-star sentence, and who this is for.

Add to Cursor Add to VS Code Try the demo β€” no signup

npm Node CI License Server Enterprise smithery badge

Vision Β· Quick start Β· Connect your editor Β· Self-host Β· Already on Sentry? Β· Packages Β· Docs Β· Live demo Β· Operators / platform Β· Roadmap

Report detail β€” plain-English root cause, confidence chip, paste-ready Cursor fix prompt, and PDCA receipt strip.

↑ the diagnosis: plain-English root cause + a paste-ready fix prompt Β· click to open the live demo


60-second proof

npx mushi-mushi

The wizard auto-detects your framework, installs the right SDK, writes MUSHI_PROJECT_ID + MUSHI_API_KEY to .env.local, and prints the snippet to paste. Then, the moment something breaks:

  1. The bug lands in your queue β€” screenshot, the user's note, the route, the last console + network events, device context.
  2. Mushi produces the diagnosis: a plain-English root cause + a ready-to-apply fix.
  3. You pull it straight into your editor over MCP and paste the fix:
npx mushi-mushi setup --ide cursor    # then ask Cursor: "what's broken in prod?"

No Sentry, no account, no monitoring stack required to see value. Self-host the whole thing in under five minutes, or use the free hosted tier (no card).


What this is

  • Built for the solo, AI-first builder β€” the vibe coder. You ship fast with Cursor, Claude Code, Lovable, or Bolt to real users, then lose afternoons when something breaks in code you didn't fully write. (Small teams and agencies feel the same pain β€” it works for them too.)
  • The comprehension layer for AI-built apps. AI lets you ship in an afternoon. But when it breaks, you're alone with a stack trace for code you didn't really write. Mushi makes understanding the bug as fast as creating the feature that caused it.
  • It pays the momentum tax for you. A two-hour incident shouldn't eat your whole day β€” the real cost is the flow state you lose. Mushi turns "something broke" into "here's exactly why, and here's the fix" so a bug costs you five minutes, not your afternoon.
  • It lives in your editor. Plain-English diagnosis + a paste-ready fix arrive over MCP inside Cursor / Claude Code β€” no dashboard to go read, no second LLM key for MCP.

These are the bugs your monitoring can't see, and the ones you didn't write:

  • A user added a coupon and the pay button slipped under their keyboard.
  • A new signup tapped Save twice because nothing visibly happened the first time.
  • A Pro customer's dashboard takes 12 seconds to load β€” and they've opened the competitor's tab.
  • A layout that looks fine on your laptop folds in half on the one Android model used by 18% of your traffic.

What it is not

  • Not another dashboard you have to go read. The answer comes to your editor.
  • Not an enterprise monitoring stack. No Sentry/Datadog/Firebase required to get value β€” standalone first.
  • Not something you configure for an afternoon. One command in, diagnosis out.

The diagnosis loop

When a user shakes their phone (or clicks the reporter), four things happen in the order a careful colleague would do them:

  1. Capture. The widget grabs the screenshot, the route, the user's note, the last few console + network events, and the device context.
  2. Classify. A two-stage LLM pipeline tags severity, category, and a plain-English root-cause hint β€” the screenshot goes through an air-gapped vision pass that can't see the text prompt, so a malicious screenshot can't inject one. A nightly judge scores the classifier's own work and feeds a prompt-A/B loop.
  3. Connect. The report embeds into a knowledge graph (Postgres + pgvector). The same broken button reported twenty times shows up as one row, not twenty.
  4. Fix. Optional. Click Dispatch fix (or from Slack / MCP / CI) and an agent in a sandbox tries the change, runs your tests, and opens a draft PR. You review it like any other PR β€” merge, edit, or close.
flowchart LR
    subgraph App["Your app"]
        SDK["mushi-mushi/{react, vue, svelte, angular, …}<br/>shadow-DOM widget Β· screenshot Β· console Β· network"]
    end
    subgraph Edge["Supabase Edge (Hono gateway + ~50 functions)"]
        API["api"]
        FF["fast-filter"]
        CR["classify-report<br/>+ vision + RAG"]
        ORCH["fix-worker"]
    end
    subgraph DB["Postgres + pgvector"]
        REP["reports"]
        KG["knowledge graph"]
        FIX["fix_attempts"]
    end
    subgraph Agents["mushi-mushi/agents"]
        SBX["sandbox: e2b / modal / cloudflare"]
        GH["GitHub PR"]
    end
    SDK -->|HTTPS| API
    API --> FF --> CR
    CR --> KG
    CR --> REP
    REP --> ORCH --> Agents
    Agents --> GH
Loading

The architecture, sequence diagram, and component-by-component spec live in apps/docs/content/concepts/architecture.mdx.


Self-host in under 5 minutes

A single Docker Compose file gets you a working stack against your own Supabase project:

cd deploy
cp .env.example .env   # ANTHROPIC_API_KEY, Supabase creds
docker compose up -d

SELF_HOSTED.md and the Self-host in minutes guide are the long-form walkthroughs. A production-ready Helm chart lives at deploy/helm/ β€” one helm install on any cluster.

Hosted (zero-config). Prefer we run it? Sign up at kensaur.us/mushi-mushi/, click Start free, no card, create a project, and copy your projectId + apiKey. The free tier covers 50 diagnoses a month (no card required).

One BYOK rule, both ways. Self-host and you bring your own Anthropic / OpenAI key β€” you pay the vendor at list rate, we never mark up a token. On hosted you bring no key at all: we meter by diagnosis (the plain-English root cause + fix), never by tokens, with a per-project spend cap and 50 / 80 / 100% alerts so the bill can't surprise you. Full numbers: pricing.

Internal edge functions (fast-filter, classify-report, fix-worker, judge-batch, intelligence-report, usage-aggregator, generate-synthetic) authenticate via requireServiceRoleAuth. Never expose them with --no-verify-jwt. Only the public api function should face the internet β€” see packages/server/README.md.


Already on Sentry?

You don't need it β€” Mushi works standalone β€” but if you already run it, Mushi enriches it. Sentry owns "errors your code throws"; Mushi owns the bugs that don't throw (dead buttons, 12-second screens, layouts that break on one phone) and the plain-English diagnosis + fix Sentry's $80/mo Seer tier reserves for bigger teams.

Inbound adapters forward Sentry (and Datadog, Bugsnag, Rollbar, Crashlytics, New Relic, Honeycomb, Grafana Loki, CloudWatch, Opsgenie, Firebase) alerts into Mushi for deeper fix context; outbound plugins send Mushi's verdicts back so a Sentry issue auto-resolves the moment Mushi merges its fix. The full enrichment / synthesis story lives in docs/operators/ β€” it's the upgrade path, never the front door.


Framework coverage

Most developers install one SDK β€” npx mushi-mushi picks it for you. React/Next.js quick start:

npm install @mushi-mushi/react      # also covers Next.js
import { MushiProvider } from '@mushi-mushi/react';

function App() {
  return (
    <MushiProvider config={{ projectId: 'proj_xxx', apiKey: 'mushi_xxx' }}>
      <YourApp />
    </MushiProvider>
  );
}
Other frameworks β€” Vue, Svelte, Angular, React Native, Vanilla JS, iOS, Android, Flutter
// Vue 3 / Nuxt
import { MushiPlugin } from '@mushi-mushi/vue';
app.use(MushiPlugin, { projectId: 'proj_xxx', apiKey: 'mushi_xxx' });

// Svelte / SvelteKit
import { initMushi } from '@mushi-mushi/svelte';
initMushi({ projectId: 'proj_xxx', apiKey: 'mushi_xxx' });

// Angular 17+
import { provideMushi } from '@mushi-mushi/angular';
bootstrapApplication(AppComponent, { providers: [provideMushi({ projectId: 'proj_xxx', apiKey: 'mushi_xxx' })] });

// React Native / Expo
import { MushiProvider } from '@mushi-mushi/react-native';

// Vanilla JS / any framework
import { Mushi } from '@mushi-mushi/web';
Mushi.init({ projectId: 'proj_xxx', apiKey: 'mushi_xxx' });

iOS (Swift PM, v0.4.0): .package(url: "https://github.com/kensaurus/mushi-mushi.git", from: "0.4.0") Β· Android (Gradle): dev.mushimushi:mushi-android:0.4.0 Β· Flutter: pub add mushi_mushi.

Want a runnable example? examples/react-demo is a minimal Vite + React app with test buttons for dead clicks, thrown errors, failed API calls, and console errors.

All packages β€” SDKs, plugins, adapters, and backend
Install Framework What you get
npx mushi-mushi Any (auto-detects) One-command wizard β€” installs the right SDK, writes env vars, prints the snippet
npm i @mushi-mushi/react React / Next.js <MushiProvider>, useMushi(), <MushiErrorBoundary>
npm i @mushi-mushi/vue Vue 3 / Nuxt MushiPlugin, useMushi() composable, error handler
npm i @mushi-mushi/svelte Svelte / SvelteKit initMushi(), SvelteKit error hook
npm i @mushi-mushi/angular Angular 17+ provideMushi(), MushiService, error handler
npm i @mushi-mushi/react-native React Native / Expo Shake-to-report, bottom-sheet widget, navigation capture, offline queue
npm i @mushi-mushi/capacitor Capacitor / Ionic iOS + Android via Capacitor
pub add mushi_mushi Flutter / Dart Shake-to-report, screenshot capture, offline queue
npm i @mushi-mushi/web Vanilla / any framework Framework-agnostic SDK
npm i @mushi-mushi/node Node (Express / Fastify / Hono) Server-side SDK β€” error-handler middleware, uncaughtException hook
npm i @mushi-mushi/adapters Any Node webhook server Translate alerts from 11 sources into Mushi reports

Backend packages β€” @mushi-mushi/server, @mushi-mushi/agents, @mushi-mushi/verify (AGPLv3) β€” power the classification pipeline, knowledge graph, fix dispatch, and Playwright verification. Plugins: Jira, Slack, Linear, PagerDuty, Zapier, Sentry, Discord, MS Teams, GitHub Issues, Bugsnag, Rollbar, Crashlytics, Cursor Cloud. Inventory tooling: inventory-schema, inventory-auth-runner, eslint-plugin-mushi-mushi, mcp-ci.


Where it stops

Mushi is honest about what's still partial. Skim before you commit:

Area Working Still partial
Classification Haiku fast-filter, Sonnet deep + vision air-gap closed, structured outputs, prompt-cached prompts, pg_cron self-healing, Stage 2 streaming via streamObject with progressive reports.stage2_partial UI updates and OpenAI fallback β€”
Judge / self-improve Sonnet judge with OpenAI fallback, prompt A/B auto-promotion via judge β†’ avg_judge_score β†’ promoteCandidate, OpenAI fine-tune adapter end-to-end (submit JSONL β†’ poll β†’ predict against fine_tuned_model_id, BYOK OPENAI_API_KEY), Bedrock fine-tune adapter (SigV4-signed CreateModelCustomizationJob, requires MUSHI_BEDROCK_FINETUNE_ENABLED=1 + AWS BYOK keys) Anthropic fine-tune API is not publicly self-service in 2026 β€” the adapter stub links to the access-request form.
Fix orchestrator Single-repo validateResult gating, GitHub PR, MCP JSON-RPC 2.0 client, multi-repo coordinator, first-party ClaudeCodeAgent (spawns local claude CLI) and CodexAgent (OpenAI Responses API, BYOK) β€” both gated behind explicit env flags so shared deployments never invoke them unintentionally β€”
Sandbox Provider abstraction; local-noop (tests) + e2b / modal / cloudflare (prod). Production refuses local-noop unless MUSHI_ALLOW_LOCAL_SANDBOX=1. β€”
Verify Playwright screenshot diff + step interpreter (navigate / click / type / press / select / assertText / waitFor / observe) β€”
Enterprise Plugin marketplace + HMAC, audit ingest, region pinning, retention CRUD, Stripe metering, SAML SSO via Supabase Auth Admin API, OIDC SSO self-service β€” see the commercial boundary below for which of these are paid/Enterprise-tier β€”
Graph backend SQL adjacency over graph_nodes / graph_edges ships in every deployment Apache AGE is a hosted-tier enhancement when the extension is installed. Managed Supabase stays on SQL adjacency.
Inventory v2 & QA-gates Hand-written inventory.yaml, SDK-driven discovery, Claude proposer, ESLint gate rules, 5-gate composite GitHub check, synthetic monitor, expected_outcome contract end-to-end β€” see docs/operators/ Inventory is gated behind Advanced mode + the inventory_v2 plan flag.
Self-host (Helm) Single-pod deploy on any Kubernetes; pre-install Job applies all SQL migrations from a bundled ConfigMap. Multi-region via global.region + global.peerRegions Helm values. Full active/active write replication is not automated yet β€” write routing relies on client-side region stickiness.

Running this for a team?

The platform depth β€” inbound adapters, outbound plugins, A2A / AG-UI / MCP interop, the inventory.yaml QA-gate system, the synthetic monitor, SSO / audit / retention / region pinning, and open-standards plumbing β€” lives in docs/operators/ so the front door stays on the wedge. Start there if you're wiring Mushi into an existing stack or evaluating it as a platform.


Cursor & Claude Skills

Install Mushi skills in your Cursor or Claude Code project for one-command setup, usage, and debugging:

npx skills add kensaurus/mushi-mushi

Then: /mushi-setup (guided SDK install + MCP wiring), /mushi-debug (diagnose ingest / MCP / pipeline failures), /mushi-health (pass/fail check across CLI, API, edge functions, BYOK keys). The admin Connect & Update page (/connect) mirrors the same flows with one-click Add to Cursor deeplinks.

Repo at a glance (run pnpm docs-stats): ~339K TS lines Β· 1,610 source files Β· 44 workspace / 36 npm packages Β· 51 edge functions Β· 298 SQL migrations Β· 19 pipeline agents. Full tour: docs/SCREENSHOTS.md.


Contributing

Issues and PRs welcome:

git clone https://github.com/kensaurus/mushi-mushi.git
cd mushi-mushi
pnpm install
pnpm dev

Requires Node.js β‰₯ 22 and pnpm β‰₯ 10. See individual package READMEs, docs/stats.md for canonical counts, and CONTRIBUTING.md.

License & branding

This repository is open-core β€” the Supabase / Grafana model. The SDK packages are MIT β€” use them in any product, open or closed. The server (the part you self-host or we run for you) is AGPLv3 β€” true OSI open source: self-host it, fork it, modify it for your own org. If you offer a modified server as a hosted service to third parties, publish your changes or see COMMERCIAL-LICENSE.md. A small Enterprise Edition boundary (packages/server/ee/) is source-available but commercial for production use β€” that's operator/enterprise plumbing only, never the wedge.

Surface License Permitted Notes
SDK packages β€” core, web, react, vue, svelte, angular, react-native, capacitor, flutter, ios, android, node, cli, mcp, mcp-ci, plugin-* (13 plugins), adapters (11 sources), inventory-schema, inventory-auth-runner, eslint-plugin-mushi-mushi, brand, marketing-ui MIT Use, fork, sell, embed in proprietary products. Trademarks separate β€” see below.
Server packages β€” @mushi-mushi/server, @mushi-mushi/agents, @mushi-mushi/verify AGPLv3 Use, modify, self-host, fork for your own org. SaaS modifiers publish changes or commercial license. OSI-approved copyleft. The cloud runs this exact core.
Enterprise features β€” SSO/SCIM, audit-log ingest, retention policy CRUD, region pinning, SOC2 evidence Commercial / paid tier Available on the Enterprise plan (hosted) or with a commercial license (self-host). The code may be source-visible, but production use of these specific features is a paid boundary β€” see docs/operators/.
Trademarks β€” "Mushi Mushi", "Mushi", θ™«, the bug logo Trademark policy Refer to the project, build add-ons, link to the repo. Forks must rename. Hosting a service under the Mushi name requires written permission.
Third-party attributions NOTICE β€” Upstream projects we depend on and their licenses.

Security researchers: see SECURITY.md for the threat model, PII commitments, and safe-harbor terms.


Also by @kensaurus

Other free apps and tools from the same Tokyo studio:

App What it does Links
glot.it β€” Learn Thai Free 161 lessons, pitch-contour tone mirror, AI roleplay chat, offline-first. App Store Β· Google Play
yen-yen β€” Expense Tracker Kakeibo-style household ledger. No bank password, no ads, no auto-writes. App Store Β· Google Play
The Wanting Mind β€” Free Book 147,000-word interactive book β€” 3D knowledge graph, 12 narrators, 22 simulations. App Store Β· Google Play
cursor-kenji 58 Cursor AI agent skills for React / Next.js / Supabase development. npx skills add kensaurus/cursor-kenji

If Mushi-chan helped, drop a ⭐ β€” next devs find the repo faster that way. Star the repo Β· Open an issue Β· Follow on Bluesky