mushi-mushi 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +68 -0
- package/dist/index.js +102 -0
- package/package.json +75 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Kenji Sakuramoto
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# mushi-mushi
|
|
2
|
+
|
|
3
|
+
> 🐛 **One-command setup for the [Mushi Mushi](https://github.com/kensaurus/mushi-mushi) bug-reporting + AI triage SDK.**
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
npx mushi-mushi
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
That's it. The wizard auto-detects your framework, installs the right SDK package, writes your env vars, and prints the snippet to paste into your app.
|
|
10
|
+
|
|
11
|
+
## What does it do?
|
|
12
|
+
|
|
13
|
+
1. **Detects your framework** — Next.js, Nuxt, SvelteKit, Angular, Expo, Capacitor, plain React/Vue/Svelte, or vanilla JS — by reading `package.json` and looking for config files.
|
|
14
|
+
2. **Picks the right SDK** — installs `@mushi-mushi/react`, `@mushi-mushi/vue`, `@mushi-mushi/svelte`, `@mushi-mushi/angular`, `@mushi-mushi/react-native`, `@mushi-mushi/capacitor`, or `@mushi-mushi/web` depending on what you're using.
|
|
15
|
+
3. **Detects your package manager** — uses `pnpm`, `npm`, `yarn`, or `bun` based on your lockfile.
|
|
16
|
+
4. **Writes env vars** — `MUSHI_PROJECT_ID` and `MUSHI_API_KEY` go into `.env.local` with the right framework prefix (`NEXT_PUBLIC_`, `NUXT_PUBLIC_`, or `VITE_`).
|
|
17
|
+
5. **Warns about `.gitignore`** — never commits secrets if `.env.local` isn't ignored.
|
|
18
|
+
6. **Prints the integration snippet** — framework-specific provider/init code you can paste straight in.
|
|
19
|
+
|
|
20
|
+
It is **non-destructive**: never silently overwrites existing env vars and never modifies your application code.
|
|
21
|
+
|
|
22
|
+
## Flags
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
npx mushi-mushi --framework next # skip framework detection
|
|
26
|
+
npx mushi-mushi --project-id proj_xxx --api-key mushi_xxx
|
|
27
|
+
npx mushi-mushi --skip-install # print install command instead of running it
|
|
28
|
+
npx mushi-mushi -y # accept the detected framework without prompting
|
|
29
|
+
npx mushi-mushi --help
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Direct SDK install (skip the wizard)
|
|
33
|
+
|
|
34
|
+
If you'd rather wire it up yourself, install the framework SDK directly:
|
|
35
|
+
|
|
36
|
+
| Framework | Package |
|
|
37
|
+
| ----------------- | -------------------------------- |
|
|
38
|
+
| React | `@mushi-mushi/react` |
|
|
39
|
+
| Next.js | `@mushi-mushi/react` |
|
|
40
|
+
| Vue 3 / Nuxt | `@mushi-mushi/vue` + `@mushi-mushi/web` |
|
|
41
|
+
| Svelte / SvelteKit| `@mushi-mushi/svelte` + `@mushi-mushi/web` |
|
|
42
|
+
| Angular | `@mushi-mushi/angular` + `@mushi-mushi/web` |
|
|
43
|
+
| React Native / Expo | `@mushi-mushi/react-native` |
|
|
44
|
+
| Capacitor / Ionic | `@mushi-mushi/capacitor` |
|
|
45
|
+
| Vanilla JS | `@mushi-mushi/web` |
|
|
46
|
+
|
|
47
|
+
## Other CLI commands
|
|
48
|
+
|
|
49
|
+
`mushi-mushi` only handles setup. For day-to-day commands install the full CLI:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
npm i -g @mushi-mushi/cli
|
|
53
|
+
mushi reports list
|
|
54
|
+
mushi reports show <id>
|
|
55
|
+
mushi reports triage <id> --status acknowledged --severity high
|
|
56
|
+
mushi status
|
|
57
|
+
mushi deploy check
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Links
|
|
61
|
+
|
|
62
|
+
- 🌐 [Console](https://kensaur.us/mushi-mushi/) — view and triage reports
|
|
63
|
+
- 📦 [GitHub](https://github.com/kensaurus/mushi-mushi)
|
|
64
|
+
- 📚 [Docs](https://github.com/kensaurus/mushi-mushi#readme)
|
|
65
|
+
|
|
66
|
+
## License
|
|
67
|
+
|
|
68
|
+
MIT
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
// src/index.ts
|
|
4
|
+
import { runInit } from "@mushi-mushi/cli/init";
|
|
5
|
+
var HELP = `mushi-mushi \u2014 bug-reporting SDK launcher
|
|
6
|
+
|
|
7
|
+
Usage:
|
|
8
|
+
npx mushi-mushi run the setup wizard (interactive)
|
|
9
|
+
npx mushi-mushi init same, with optional flags
|
|
10
|
+
|
|
11
|
+
Flags (forwarded to \`mushi init\`):
|
|
12
|
+
--project-id <id> skip the project ID prompt
|
|
13
|
+
--api-key <key> skip the API key prompt
|
|
14
|
+
--framework <id> force a framework (next, react, vue, nuxt,
|
|
15
|
+
svelte, sveltekit, angular, expo,
|
|
16
|
+
react-native, capacitor, vanilla)
|
|
17
|
+
--skip-install print the install command instead of running it
|
|
18
|
+
-y, --yes accept the detected framework without prompting
|
|
19
|
+
-h, --help show this help
|
|
20
|
+
|
|
21
|
+
Other commands (status, reports, deploy, test, login, config, index) live
|
|
22
|
+
in @mushi-mushi/cli \u2014 install with \`npm i -g @mushi-mushi/cli\` and use
|
|
23
|
+
\`mushi <command>\`.
|
|
24
|
+
|
|
25
|
+
Docs: https://github.com/kensaurus/mushi-mushi
|
|
26
|
+
Console: https://kensaur.us/mushi-mushi/`;
|
|
27
|
+
var VALID_FRAMEWORKS = [
|
|
28
|
+
"next",
|
|
29
|
+
"react",
|
|
30
|
+
"vue",
|
|
31
|
+
"nuxt",
|
|
32
|
+
"svelte",
|
|
33
|
+
"sveltekit",
|
|
34
|
+
"angular",
|
|
35
|
+
"expo",
|
|
36
|
+
"react-native",
|
|
37
|
+
"capacitor",
|
|
38
|
+
"vanilla"
|
|
39
|
+
];
|
|
40
|
+
function parseArgs(argv) {
|
|
41
|
+
const args = argv[0] === "init" ? argv.slice(1) : argv;
|
|
42
|
+
const out = { showHelp: false };
|
|
43
|
+
for (let i = 0; i < args.length; i++) {
|
|
44
|
+
const a = args[i];
|
|
45
|
+
if (a === "-h" || a === "--help") {
|
|
46
|
+
out.showHelp = true;
|
|
47
|
+
continue;
|
|
48
|
+
}
|
|
49
|
+
if (a === "-y" || a === "--yes") {
|
|
50
|
+
out.yes = true;
|
|
51
|
+
continue;
|
|
52
|
+
}
|
|
53
|
+
if (a === "--skip-install") {
|
|
54
|
+
out.skipInstall = true;
|
|
55
|
+
continue;
|
|
56
|
+
}
|
|
57
|
+
if (a === "--project-id") {
|
|
58
|
+
out.projectId = args[++i];
|
|
59
|
+
continue;
|
|
60
|
+
}
|
|
61
|
+
if (a === "--api-key") {
|
|
62
|
+
out.apiKey = args[++i];
|
|
63
|
+
continue;
|
|
64
|
+
}
|
|
65
|
+
if (a === "--framework") {
|
|
66
|
+
const fw = args[++i];
|
|
67
|
+
if (!VALID_FRAMEWORKS.includes(fw)) {
|
|
68
|
+
throw new Error(`Unknown framework: ${fw}. Valid: ${VALID_FRAMEWORKS.join(", ")}`);
|
|
69
|
+
}
|
|
70
|
+
out.framework = fw;
|
|
71
|
+
continue;
|
|
72
|
+
}
|
|
73
|
+
if (a.startsWith("-")) {
|
|
74
|
+
throw new Error(`Unknown flag: ${a}. Try --help.`);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
return out;
|
|
78
|
+
}
|
|
79
|
+
async function main() {
|
|
80
|
+
let parsed;
|
|
81
|
+
try {
|
|
82
|
+
parsed = parseArgs(process.argv.slice(2));
|
|
83
|
+
} catch (err) {
|
|
84
|
+
console.error(err instanceof Error ? err.message : String(err));
|
|
85
|
+
process.exit(1);
|
|
86
|
+
}
|
|
87
|
+
if (parsed.showHelp) {
|
|
88
|
+
console.log(HELP);
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
await runInit({
|
|
92
|
+
projectId: parsed.projectId,
|
|
93
|
+
apiKey: parsed.apiKey,
|
|
94
|
+
framework: parsed.framework,
|
|
95
|
+
skipInstall: parsed.skipInstall,
|
|
96
|
+
yes: parsed.yes
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
main().catch((err) => {
|
|
100
|
+
console.error(err instanceof Error ? err.message : String(err));
|
|
101
|
+
process.exit(1);
|
|
102
|
+
});
|
package/package.json
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "mushi-mushi",
|
|
3
|
+
"version": "0.4.0",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"description": "Mushi Mushi launcher — `npx mushi-mushi` (or `npx mushi-mushi init`) auto-detects your framework and installs the right SDK. Bug-reporting + AI triage SDK for React, Vue, Svelte, Angular, React Native, Expo, Capacitor, and vanilla JS.",
|
|
6
|
+
"bin": {
|
|
7
|
+
"mushi-mushi": "./dist/index.js"
|
|
8
|
+
},
|
|
9
|
+
"dependencies": {
|
|
10
|
+
"@mushi-mushi/cli": "^0.4.0"
|
|
11
|
+
},
|
|
12
|
+
"devDependencies": {
|
|
13
|
+
"@types/node": "^22.15.3",
|
|
14
|
+
"eslint": "^10.2.0",
|
|
15
|
+
"tsup": "^8.5.1",
|
|
16
|
+
"typescript": "^6.0.2",
|
|
17
|
+
"@mushi-mushi/eslint-config": "0.0.0"
|
|
18
|
+
},
|
|
19
|
+
"author": "Kenji Sakuramoto",
|
|
20
|
+
"repository": {
|
|
21
|
+
"type": "git",
|
|
22
|
+
"url": "https://github.com/kensaurus/mushi-mushi.git",
|
|
23
|
+
"directory": "packages/launcher"
|
|
24
|
+
},
|
|
25
|
+
"homepage": "https://github.com/kensaurus/mushi-mushi#readme",
|
|
26
|
+
"bugs": {
|
|
27
|
+
"url": "https://github.com/kensaurus/mushi-mushi/issues"
|
|
28
|
+
},
|
|
29
|
+
"publishConfig": {
|
|
30
|
+
"access": "public"
|
|
31
|
+
},
|
|
32
|
+
"files": [
|
|
33
|
+
"dist",
|
|
34
|
+
"README.md",
|
|
35
|
+
"LICENSE"
|
|
36
|
+
],
|
|
37
|
+
"sideEffects": false,
|
|
38
|
+
"keywords": [
|
|
39
|
+
"mushi-mushi",
|
|
40
|
+
"bug-reporting",
|
|
41
|
+
"user-feedback",
|
|
42
|
+
"session-replay",
|
|
43
|
+
"screenshot",
|
|
44
|
+
"shake-to-report",
|
|
45
|
+
"sdk",
|
|
46
|
+
"wizard",
|
|
47
|
+
"setup",
|
|
48
|
+
"init",
|
|
49
|
+
"react",
|
|
50
|
+
"next.js",
|
|
51
|
+
"nextjs",
|
|
52
|
+
"vue",
|
|
53
|
+
"nuxt",
|
|
54
|
+
"svelte",
|
|
55
|
+
"sveltekit",
|
|
56
|
+
"angular",
|
|
57
|
+
"react-native",
|
|
58
|
+
"expo",
|
|
59
|
+
"capacitor",
|
|
60
|
+
"ionic",
|
|
61
|
+
"sentry-companion",
|
|
62
|
+
"error-tracking",
|
|
63
|
+
"ai-triage",
|
|
64
|
+
"llm"
|
|
65
|
+
],
|
|
66
|
+
"type": "module",
|
|
67
|
+
"engines": {
|
|
68
|
+
"node": ">=18"
|
|
69
|
+
},
|
|
70
|
+
"scripts": {
|
|
71
|
+
"build": "tsup",
|
|
72
|
+
"lint": "eslint src/",
|
|
73
|
+
"typecheck": "tsc --noEmit"
|
|
74
|
+
}
|
|
75
|
+
}
|