create-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 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,42 @@
1
+ # create-mushi-mushi
2
+
3
+ > One-line setup for the [Mushi Mushi](https://github.com/kensaurus/mushi-mushi) bug-reporting + AI triage SDK.
4
+
5
+ ```bash
6
+ npm create mushi-mushi
7
+ # or
8
+ pnpm create mushi-mushi
9
+ yarn create mushi-mushi
10
+ bun create mushi-mushi
11
+ ```
12
+
13
+ Auto-detects your framework (Next.js, Nuxt, SvelteKit, Angular, Expo, Capacitor, plain React/Vue/Svelte, vanilla JS), installs the right `@mushi-mushi/*` SDK, writes your env vars, and prints the snippet to drop into your app.
14
+
15
+ This is a **scaffold for existing projects** — it does not generate a new app from scratch. To add Mushi to an app you already have, run it from the project root.
16
+
17
+ ## Flags
18
+
19
+ ```bash
20
+ npm create mushi-mushi -- --framework next
21
+ npm create mushi-mushi -- --project-id proj_xxx --api-key mushi_xxx
22
+ npm create mushi-mushi -- --skip-install
23
+ npm create mushi-mushi -- -y
24
+ npm create mushi-mushi -- --help
25
+ ```
26
+
27
+ ## Equivalent
28
+
29
+ ```bash
30
+ npx mushi-mushi # same wizard, shorter to type
31
+ npx @mushi-mushi/cli init # same wizard, scoped name
32
+ ```
33
+
34
+ ## Links
35
+
36
+ - 🌐 [Console](https://kensaur.us/mushi-mushi/)
37
+ - 📦 [GitHub](https://github.com/kensaurus/mushi-mushi)
38
+ - 📚 [Docs](https://github.com/kensaurus/mushi-mushi#readme)
39
+
40
+ ## License
41
+
42
+ MIT
package/dist/index.js ADDED
@@ -0,0 +1,96 @@
1
+ #!/usr/bin/env node
2
+
3
+ // src/index.ts
4
+ import { runInit } from "@mushi-mushi/cli/init";
5
+ var HELP = `create-mushi-mushi \u2014 add Mushi Mushi to your existing project
6
+
7
+ Usage:
8
+ npm create mushi-mushi run the setup wizard
9
+ npm create mushi-mushi -- --help show all flags
10
+
11
+ Flags (forwarded to the wizard):
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
+
20
+ Docs: https://github.com/kensaurus/mushi-mushi
21
+ Console: https://kensaur.us/mushi-mushi/`;
22
+ var VALID_FRAMEWORKS = [
23
+ "next",
24
+ "react",
25
+ "vue",
26
+ "nuxt",
27
+ "svelte",
28
+ "sveltekit",
29
+ "angular",
30
+ "expo",
31
+ "react-native",
32
+ "capacitor",
33
+ "vanilla"
34
+ ];
35
+ function parseArgs(args) {
36
+ const out = { showHelp: false };
37
+ for (let i = 0; i < args.length; i++) {
38
+ const a = args[i];
39
+ if (a === "-h" || a === "--help") {
40
+ out.showHelp = true;
41
+ continue;
42
+ }
43
+ if (a === "-y" || a === "--yes") {
44
+ out.yes = true;
45
+ continue;
46
+ }
47
+ if (a === "--skip-install") {
48
+ out.skipInstall = true;
49
+ continue;
50
+ }
51
+ if (a === "--project-id") {
52
+ out.projectId = args[++i];
53
+ continue;
54
+ }
55
+ if (a === "--api-key") {
56
+ out.apiKey = args[++i];
57
+ continue;
58
+ }
59
+ if (a === "--framework") {
60
+ const fw = args[++i];
61
+ if (!VALID_FRAMEWORKS.includes(fw)) {
62
+ throw new Error(`Unknown framework: ${fw}. Valid: ${VALID_FRAMEWORKS.join(", ")}`);
63
+ }
64
+ out.framework = fw;
65
+ continue;
66
+ }
67
+ if (a.startsWith("-")) {
68
+ throw new Error(`Unknown flag: ${a}. Try --help.`);
69
+ }
70
+ }
71
+ return out;
72
+ }
73
+ async function main() {
74
+ let parsed;
75
+ try {
76
+ parsed = parseArgs(process.argv.slice(2));
77
+ } catch (err) {
78
+ console.error(err instanceof Error ? err.message : String(err));
79
+ process.exit(1);
80
+ }
81
+ if (parsed.showHelp) {
82
+ console.log(HELP);
83
+ return;
84
+ }
85
+ await runInit({
86
+ projectId: parsed.projectId,
87
+ apiKey: parsed.apiKey,
88
+ framework: parsed.framework,
89
+ skipInstall: parsed.skipInstall,
90
+ yes: parsed.yes
91
+ });
92
+ }
93
+ main().catch((err) => {
94
+ console.error(err instanceof Error ? err.message : String(err));
95
+ process.exit(1);
96
+ });
package/package.json ADDED
@@ -0,0 +1,71 @@
1
+ {
2
+ "name": "create-mushi-mushi",
3
+ "version": "0.4.0",
4
+ "license": "MIT",
5
+ "description": "Run `npm create mushi-mushi` to add the Mushi Mushi bug-reporting SDK to your existing project — the wizard auto-detects your framework (React, Vue, Svelte, Angular, React Native, Expo, Capacitor) and installs the right package.",
6
+ "bin": {
7
+ "create-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/create-mushi-mushi"
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
+ "create",
41
+ "scaffold",
42
+ "init",
43
+ "wizard",
44
+ "bug-reporting",
45
+ "user-feedback",
46
+ "session-replay",
47
+ "screenshot",
48
+ "shake-to-report",
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
+ ],
62
+ "type": "module",
63
+ "engines": {
64
+ "node": ">=18"
65
+ },
66
+ "scripts": {
67
+ "build": "tsup",
68
+ "lint": "eslint src/",
69
+ "typecheck": "tsc --noEmit"
70
+ }
71
+ }