create-skybridge 0.0.0-dev.6f2d80b → 0.0.0-dev.6f6bbd0

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.
Files changed (38) hide show
  1. package/LICENSE +21 -0
  2. package/dist/index.d.ts +1 -1
  3. package/dist/index.js +97 -27
  4. package/dist/index.test.d.ts +1 -0
  5. package/dist/index.test.js +23 -0
  6. package/index.js +6 -1
  7. package/package.json +11 -10
  8. package/template/README.md +13 -2
  9. package/template/_gitignore +2 -1
  10. package/template/alpic.json +1 -2
  11. package/template/node_modules/.bin/mcp-inspector +21 -0
  12. package/template/node_modules/.bin/nodemon +21 -0
  13. package/template/node_modules/.bin/sb +21 -0
  14. package/template/node_modules/.bin/shx +21 -0
  15. package/template/node_modules/.bin/skybridge +21 -0
  16. package/template/node_modules/.bin/tsc +21 -0
  17. package/template/node_modules/.bin/tsserver +21 -0
  18. package/template/node_modules/.bin/tsx +21 -0
  19. package/template/node_modules/.bin/vite +21 -0
  20. package/template/nodemon.json +5 -0
  21. package/template/package.json +32 -10
  22. package/template/server/src/index.ts +21 -4
  23. package/template/server/src/server.ts +6 -20
  24. package/template/tsconfig.json +23 -0
  25. package/template/tsconfig.server.json +11 -0
  26. package/template/web/src/index.css +1 -0
  27. package/template/web/src/widgets/magic-8-ball.tsx +5 -3
  28. package/template/web/vite.config.ts +1 -1
  29. package/template/pnpm-lock.yaml +0 -317
  30. package/template/pnpm-workspace.yaml +0 -7
  31. package/template/server/nodemon.json +0 -5
  32. package/template/server/package.json +0 -34
  33. package/template/server/src/env.ts +0 -12
  34. package/template/server/tsconfig.json +0 -17
  35. package/template/web/package.json +0 -24
  36. package/template/web/tsconfig.app.json +0 -34
  37. package/template/web/tsconfig.json +0 -13
  38. package/template/web/tsconfig.node.json +0 -26
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Alpic
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/dist/index.d.ts CHANGED
@@ -1 +1 @@
1
- export {};
1
+ export declare function init(args?: string[]): Promise<void>;
package/dist/index.js CHANGED
@@ -1,13 +1,9 @@
1
+ import { spawnSync } from "node:child_process";
1
2
  import fs from "node:fs";
2
3
  import path from "node:path";
3
4
  import { fileURLToPath } from "node:url";
4
5
  import * as prompts from "@clack/prompts";
5
6
  import mri from "mri";
6
- const argv = mri(process.argv.slice(2), {
7
- boolean: ["help", "overwrite"],
8
- alias: { h: "help" },
9
- });
10
- const cwd = process.cwd();
11
7
  const defaultProjectName = "skybridge-project";
12
8
  // prettier-ignore
13
9
  const helpMessage = `\
@@ -18,16 +14,22 @@ Create a new Skybridge project by copying the starter template.
18
14
  Options:
19
15
  -h, --help show this help message
20
16
  --overwrite remove existing files in target directory
17
+ --immediate install dependencies and start development server
21
18
 
22
19
  Examples:
23
20
  create-skybridge my-app
24
- create-skybridge . --overwrite
21
+ create-skybridge . --overwrite --immediate
25
22
  `;
26
- async function init() {
23
+ export async function init(args = process.argv.slice(2)) {
24
+ const argv = mri(args, {
25
+ boolean: ["help", "overwrite", "immediate"],
26
+ alias: { h: "help" },
27
+ });
27
28
  const argTargetDir = argv._[0]
28
- ? formatTargetDir(String(argv._[0]))
29
+ ? sanitizeTargetDir(String(argv._[0]))
29
30
  : undefined;
30
31
  const argOverwrite = argv.overwrite;
32
+ const argImmediate = argv.immediate;
31
33
  const help = argv.help;
32
34
  if (help) {
33
35
  console.log(helpMessage);
@@ -44,14 +46,15 @@ async function init() {
44
46
  defaultValue: defaultProjectName,
45
47
  placeholder: defaultProjectName,
46
48
  validate: (value) => {
47
- return value.length === 0 || formatTargetDir(value).length > 0
49
+ return value.length === 0 || sanitizeTargetDir(value).length > 0
48
50
  ? undefined
49
51
  : "Invalid project name";
50
52
  },
51
53
  });
52
- if (prompts.isCancel(projectName))
54
+ if (prompts.isCancel(projectName)) {
53
55
  return cancel();
54
- targetDir = formatTargetDir(projectName);
56
+ }
57
+ targetDir = sanitizeTargetDir(projectName);
55
58
  }
56
59
  else {
57
60
  targetDir = defaultProjectName;
@@ -78,8 +81,9 @@ async function init() {
78
81
  },
79
82
  ],
80
83
  });
81
- if (prompts.isCancel(res))
84
+ if (prompts.isCancel(res)) {
82
85
  return cancel();
86
+ }
83
87
  overwrite = res;
84
88
  }
85
89
  else {
@@ -95,34 +99,104 @@ async function init() {
95
99
  return;
96
100
  }
97
101
  }
98
- const root = path.join(cwd, targetDir);
102
+ const root = path.join(process.cwd(), targetDir);
99
103
  // 3. Copy the repository
100
104
  prompts.log.step(`Copying template...`);
101
105
  try {
102
106
  const templateDir = fileURLToPath(new URL("../template", import.meta.url));
103
107
  // Copy template to target directory
104
- fs.cpSync(templateDir, root, { recursive: true });
108
+ fs.cpSync(templateDir, root, {
109
+ recursive: true,
110
+ filter: (src) => [".npmrc"].every((file) => !src.endsWith(file)),
111
+ });
105
112
  // Rename _gitignore to .gitignore
106
113
  fs.renameSync(path.join(root, "_gitignore"), path.join(root, ".gitignore"));
107
114
  // Update project name in package.json
108
115
  const name = path.basename(root);
109
- for (const dir of ["", "server", "web"]) {
110
- const pkgPath = path.join(root, dir, "package.json");
111
- const pkg = fs.readFileSync(pkgPath, "utf-8");
112
- const fixed = pkg.replace(/apps-sdk-template/g, name);
113
- fs.writeFileSync(pkgPath, fixed);
114
- }
116
+ const pkgPath = path.join(root, "package.json");
117
+ const pkg = fs.readFileSync(pkgPath, "utf-8");
118
+ const fixed = pkg.replace(/apps-sdk-template/g, name);
119
+ fs.writeFileSync(pkgPath, fixed);
115
120
  prompts.log.success(`Project created in ${root}`);
116
- prompts.outro(`Done! Next steps:\n\n cd ${targetDir}\n pnpm install\n pnpm dev`);
117
121
  }
118
122
  catch (error) {
119
123
  prompts.log.error("Failed to copy repository");
120
124
  console.error(error);
121
125
  process.exit(1);
122
126
  }
127
+ const userAgent = process.env.npm_config_user_agent;
128
+ const pkgManager = userAgent?.split(" ")[0]?.split("/")[0] || "npm";
129
+ // 4. Ask about immediate installation
130
+ let immediate = argImmediate;
131
+ if (immediate === undefined) {
132
+ if (interactive) {
133
+ const immediateResult = await prompts.confirm({
134
+ message: `Install with ${pkgManager} and start now?`,
135
+ });
136
+ if (prompts.isCancel(immediateResult)) {
137
+ return cancel();
138
+ }
139
+ immediate = immediateResult;
140
+ }
141
+ else {
142
+ immediate = false;
143
+ }
144
+ }
145
+ const installCmd = [pkgManager, "install"];
146
+ const runCmd = [pkgManager];
147
+ switch (pkgManager) {
148
+ case "yarn":
149
+ case "pnpm":
150
+ case "bun":
151
+ break;
152
+ case "deno":
153
+ runCmd.push("task");
154
+ break;
155
+ default:
156
+ runCmd.push("run");
157
+ }
158
+ runCmd.push("dev");
159
+ if (!immediate) {
160
+ prompts.outro(`Done! Next steps:
161
+ cd ${targetDir}
162
+ ${installCmd.join(" ")}
163
+ ${runCmd.join(" ")}
164
+ `);
165
+ return;
166
+ }
167
+ prompts.log.step(`Installing dependencies with ${pkgManager}...`);
168
+ run(installCmd, {
169
+ stdio: "inherit",
170
+ cwd: root,
171
+ });
172
+ prompts.log.step("Starting dev server...");
173
+ run(runCmd, {
174
+ stdio: "inherit",
175
+ cwd: root,
176
+ });
177
+ }
178
+ function run([command, ...args], options) {
179
+ const { status, error } = spawnSync(command, args, options);
180
+ if (status != null && status > 0) {
181
+ process.exit(status);
182
+ }
183
+ if (error) {
184
+ console.error(`\n${command} ${args.join(" ")} error!`);
185
+ console.error(error);
186
+ process.exit(1);
187
+ }
123
188
  }
124
- function formatTargetDir(targetDir) {
125
- return targetDir.trim().replace(/\/+$/g, "");
189
+ function sanitizeTargetDir(targetDir) {
190
+ return (targetDir
191
+ .trim()
192
+ // Only keep alphanumeric, dash, underscore, dot, @, /
193
+ .replace(/[^a-zA-Z0-9\-_.@/]/g, "")
194
+ // Prevent path traversal
195
+ .replace(/\.\./g, "")
196
+ // Collapse multiple slashes
197
+ .replace(/\/+/g, "/")
198
+ // Remove leading/trailing slashes
199
+ .replace(/^\/+|\/+$/g, ""));
126
200
  }
127
201
  function isEmpty(path) {
128
202
  const files = fs.readdirSync(path);
@@ -139,7 +213,3 @@ function emptyDir(dir) {
139
213
  fs.rmSync(path.resolve(dir, file), { recursive: true, force: true });
140
214
  }
141
215
  }
142
- init().catch((e) => {
143
- console.error(e);
144
- process.exit(1);
145
- });
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,23 @@
1
+ import { randomBytes } from "node:crypto";
2
+ import fs from "node:fs/promises";
3
+ import path from "node:path";
4
+ import { afterEach, beforeEach, describe, expect, it } from "vitest";
5
+ import { init } from "./index.js";
6
+ describe("create-skybridge", () => {
7
+ let tempDirName;
8
+ beforeEach(() => {
9
+ tempDirName = `test-${randomBytes(2).toString("hex")}`;
10
+ });
11
+ afterEach(async () => {
12
+ await fs.rm(path.join(process.cwd(), tempDirName), {
13
+ recursive: true,
14
+ force: true,
15
+ });
16
+ });
17
+ it("should scaffold a new project", async () => {
18
+ const name = `../../${tempDirName}//project$`;
19
+ await init([name]);
20
+ await fs.access(path.join(process.cwd(), tempDirName, "project", ".gitignore"));
21
+ expect(fs.access(path.join(process.cwd(), tempDirName, "project", ".npmrc"))).rejects.toThrowError();
22
+ });
23
+ });
package/index.js CHANGED
@@ -1,3 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import "./dist/index.js";
3
+ import { init } from "./dist/index.js";
4
+
5
+ init().catch((e) => {
6
+ console.error(e);
7
+ process.exit(1);
8
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-skybridge",
3
- "version": "0.0.0-dev.6f2d80b",
3
+ "version": "0.0.0-dev.6f6bbd0",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "author": "Alpic",
@@ -16,18 +16,19 @@
16
16
  "dist",
17
17
  "template"
18
18
  ],
19
- "scripts": {
20
- "build": "tsc",
21
- "test:type": "tsc --noEmit",
22
- "test:format": "biome ci",
23
- "prepublishOnly": "pnpm run build"
24
- },
25
19
  "dependencies": {
26
20
  "@clack/prompts": "^0.11.0",
27
21
  "mri": "^1.2.0"
28
22
  },
29
23
  "devDependencies": {
30
- "@types/node": "^25.0.3",
31
- "typescript": "^5.9.3"
24
+ "typescript": "^5.9.3",
25
+ "vitest": "^4.0.16"
26
+ },
27
+ "scripts": {
28
+ "build": "tsc",
29
+ "test": "pnpm run test:unit && pnpm run test:type && pnpm run test:format",
30
+ "test:unit": "vitest run",
31
+ "test:type": "tsc --noEmit",
32
+ "test:format": "biome ci"
32
33
  }
33
- }
34
+ }
@@ -6,8 +6,7 @@ A minimal TypeScript template for building OpenAI Apps SDK compatible MCP server
6
6
 
7
7
  ### Prerequisites
8
8
 
9
- - Node.js 22+
10
- - pnpm (install with `npm install -g pnpm`)
9
+ - Node.js 24+
11
10
  - HTTP tunnel such as [ngrok](https://ngrok.com/download)
12
11
 
13
12
  ### Local Development
@@ -15,7 +14,13 @@ A minimal TypeScript template for building OpenAI Apps SDK compatible MCP server
15
14
  #### 1. Install
16
15
 
17
16
  ```bash
17
+ npm install
18
+ # or
19
+ yarn install
20
+ # or
18
21
  pnpm install
22
+ # or
23
+ bun install
19
24
  ```
20
25
 
21
26
  #### 2. Start your local server
@@ -23,7 +28,13 @@ pnpm install
23
28
  Run the development server from the root directory:
24
29
 
25
30
  ```bash
31
+ npm run dev
32
+ # or
33
+ yarn dev
34
+ # or
26
35
  pnpm dev
36
+ # or
37
+ bun dev
27
38
  ```
28
39
 
29
40
  This command starts an Express server on port 3000. This server packages:
@@ -1,4 +1,5 @@
1
1
  node_modules/
2
2
  dist/
3
3
  .env*
4
- .DS_store
4
+ .DS_store
5
+ *.tsbuildinfo
@@ -1,4 +1,3 @@
1
1
  {
2
- "$schema": "https://assets.alpic.ai/alpic.json",
3
- "buildOutputDir": "server/dist"
2
+ "$schema": "https://assets.alpic.ai/alpic.json"
4
3
  }
@@ -0,0 +1,21 @@
1
+ #!/bin/sh
2
+ basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
+
4
+ case `uname` in
5
+ *CYGWIN*|*MINGW*|*MSYS*)
6
+ if command -v cygpath > /dev/null 2>&1; then
7
+ basedir=`cygpath -w "$basedir"`
8
+ fi
9
+ ;;
10
+ esac
11
+
12
+ if [ -z "$NODE_PATH" ]; then
13
+ export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/@modelcontextprotocol+inspector@0.18.0_@types+node@25.0.3_@types+react-dom@19.2.3_@type_cfe96c348f18ba1e580ab58ea63930bf/node_modules/@modelcontextprotocol/inspector/cli/build/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/@modelcontextprotocol+inspector@0.18.0_@types+node@25.0.3_@types+react-dom@19.2.3_@type_cfe96c348f18ba1e580ab58ea63930bf/node_modules/@modelcontextprotocol/inspector/cli/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/@modelcontextprotocol+inspector@0.18.0_@types+node@25.0.3_@types+react-dom@19.2.3_@type_cfe96c348f18ba1e580ab58ea63930bf/node_modules/@modelcontextprotocol/inspector/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/@modelcontextprotocol+inspector@0.18.0_@types+node@25.0.3_@types+react-dom@19.2.3_@type_cfe96c348f18ba1e580ab58ea63930bf/node_modules/@modelcontextprotocol/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/@modelcontextprotocol+inspector@0.18.0_@types+node@25.0.3_@types+react-dom@19.2.3_@type_cfe96c348f18ba1e580ab58ea63930bf/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/node_modules"
14
+ else
15
+ export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/@modelcontextprotocol+inspector@0.18.0_@types+node@25.0.3_@types+react-dom@19.2.3_@type_cfe96c348f18ba1e580ab58ea63930bf/node_modules/@modelcontextprotocol/inspector/cli/build/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/@modelcontextprotocol+inspector@0.18.0_@types+node@25.0.3_@types+react-dom@19.2.3_@type_cfe96c348f18ba1e580ab58ea63930bf/node_modules/@modelcontextprotocol/inspector/cli/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/@modelcontextprotocol+inspector@0.18.0_@types+node@25.0.3_@types+react-dom@19.2.3_@type_cfe96c348f18ba1e580ab58ea63930bf/node_modules/@modelcontextprotocol/inspector/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/@modelcontextprotocol+inspector@0.18.0_@types+node@25.0.3_@types+react-dom@19.2.3_@type_cfe96c348f18ba1e580ab58ea63930bf/node_modules/@modelcontextprotocol/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/@modelcontextprotocol+inspector@0.18.0_@types+node@25.0.3_@types+react-dom@19.2.3_@type_cfe96c348f18ba1e580ab58ea63930bf/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/node_modules:$NODE_PATH"
16
+ fi
17
+ if [ -x "$basedir/node" ]; then
18
+ exec "$basedir/node" "$basedir/../@modelcontextprotocol/inspector/cli/build/cli.js" "$@"
19
+ else
20
+ exec node "$basedir/../@modelcontextprotocol/inspector/cli/build/cli.js" "$@"
21
+ fi
@@ -0,0 +1,21 @@
1
+ #!/bin/sh
2
+ basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
+
4
+ case `uname` in
5
+ *CYGWIN*|*MINGW*|*MSYS*)
6
+ if command -v cygpath > /dev/null 2>&1; then
7
+ basedir=`cygpath -w "$basedir"`
8
+ fi
9
+ ;;
10
+ esac
11
+
12
+ if [ -z "$NODE_PATH" ]; then
13
+ export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/nodemon@3.1.11/node_modules/nodemon/bin/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/nodemon@3.1.11/node_modules/nodemon/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/nodemon@3.1.11/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/node_modules"
14
+ else
15
+ export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/nodemon@3.1.11/node_modules/nodemon/bin/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/nodemon@3.1.11/node_modules/nodemon/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/nodemon@3.1.11/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/node_modules:$NODE_PATH"
16
+ fi
17
+ if [ -x "$basedir/node" ]; then
18
+ exec "$basedir/node" "$basedir/../nodemon/bin/nodemon.js" "$@"
19
+ else
20
+ exec node "$basedir/../nodemon/bin/nodemon.js" "$@"
21
+ fi
@@ -0,0 +1,21 @@
1
+ #!/bin/sh
2
+ basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
+
4
+ case `uname` in
5
+ *CYGWIN*|*MINGW*|*MSYS*)
6
+ if command -v cygpath > /dev/null 2>&1; then
7
+ basedir=`cygpath -w "$basedir"`
8
+ fi
9
+ ;;
10
+ esac
11
+
12
+ if [ -z "$NODE_PATH" ]; then
13
+ export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/skybridge@0.20.0_@modelcontextprotocol+sdk@1.25.2_hono@4.11.3_zod@4.3.5__@types+node@25_aea5dc2b2511e98e2f9f50b3f1005e40/node_modules/skybridge/bin/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/skybridge@0.20.0_@modelcontextprotocol+sdk@1.25.2_hono@4.11.3_zod@4.3.5__@types+node@25_aea5dc2b2511e98e2f9f50b3f1005e40/node_modules/skybridge/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/skybridge@0.20.0_@modelcontextprotocol+sdk@1.25.2_hono@4.11.3_zod@4.3.5__@types+node@25_aea5dc2b2511e98e2f9f50b3f1005e40/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/node_modules"
14
+ else
15
+ export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/skybridge@0.20.0_@modelcontextprotocol+sdk@1.25.2_hono@4.11.3_zod@4.3.5__@types+node@25_aea5dc2b2511e98e2f9f50b3f1005e40/node_modules/skybridge/bin/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/skybridge@0.20.0_@modelcontextprotocol+sdk@1.25.2_hono@4.11.3_zod@4.3.5__@types+node@25_aea5dc2b2511e98e2f9f50b3f1005e40/node_modules/skybridge/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/skybridge@0.20.0_@modelcontextprotocol+sdk@1.25.2_hono@4.11.3_zod@4.3.5__@types+node@25_aea5dc2b2511e98e2f9f50b3f1005e40/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/node_modules:$NODE_PATH"
16
+ fi
17
+ if [ -x "$basedir/node" ]; then
18
+ exec "$basedir/node" "$basedir/../skybridge/bin/run.js" "$@"
19
+ else
20
+ exec node "$basedir/../skybridge/bin/run.js" "$@"
21
+ fi
@@ -0,0 +1,21 @@
1
+ #!/bin/sh
2
+ basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
+
4
+ case `uname` in
5
+ *CYGWIN*|*MINGW*|*MSYS*)
6
+ if command -v cygpath > /dev/null 2>&1; then
7
+ basedir=`cygpath -w "$basedir"`
8
+ fi
9
+ ;;
10
+ esac
11
+
12
+ if [ -z "$NODE_PATH" ]; then
13
+ export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/shx@0.4.0/node_modules/shx/lib/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/shx@0.4.0/node_modules/shx/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/shx@0.4.0/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/node_modules"
14
+ else
15
+ export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/shx@0.4.0/node_modules/shx/lib/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/shx@0.4.0/node_modules/shx/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/shx@0.4.0/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/node_modules:$NODE_PATH"
16
+ fi
17
+ if [ -x "$basedir/node" ]; then
18
+ exec "$basedir/node" "$basedir/../shx/lib/cli.js" "$@"
19
+ else
20
+ exec node "$basedir/../shx/lib/cli.js" "$@"
21
+ fi
@@ -0,0 +1,21 @@
1
+ #!/bin/sh
2
+ basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
+
4
+ case `uname` in
5
+ *CYGWIN*|*MINGW*|*MSYS*)
6
+ if command -v cygpath > /dev/null 2>&1; then
7
+ basedir=`cygpath -w "$basedir"`
8
+ fi
9
+ ;;
10
+ esac
11
+
12
+ if [ -z "$NODE_PATH" ]; then
13
+ export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/skybridge@0.20.0_@modelcontextprotocol+sdk@1.25.2_hono@4.11.3_zod@4.3.5__@types+node@25_aea5dc2b2511e98e2f9f50b3f1005e40/node_modules/skybridge/bin/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/skybridge@0.20.0_@modelcontextprotocol+sdk@1.25.2_hono@4.11.3_zod@4.3.5__@types+node@25_aea5dc2b2511e98e2f9f50b3f1005e40/node_modules/skybridge/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/skybridge@0.20.0_@modelcontextprotocol+sdk@1.25.2_hono@4.11.3_zod@4.3.5__@types+node@25_aea5dc2b2511e98e2f9f50b3f1005e40/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/node_modules"
14
+ else
15
+ export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/skybridge@0.20.0_@modelcontextprotocol+sdk@1.25.2_hono@4.11.3_zod@4.3.5__@types+node@25_aea5dc2b2511e98e2f9f50b3f1005e40/node_modules/skybridge/bin/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/skybridge@0.20.0_@modelcontextprotocol+sdk@1.25.2_hono@4.11.3_zod@4.3.5__@types+node@25_aea5dc2b2511e98e2f9f50b3f1005e40/node_modules/skybridge/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/skybridge@0.20.0_@modelcontextprotocol+sdk@1.25.2_hono@4.11.3_zod@4.3.5__@types+node@25_aea5dc2b2511e98e2f9f50b3f1005e40/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/node_modules:$NODE_PATH"
16
+ fi
17
+ if [ -x "$basedir/node" ]; then
18
+ exec "$basedir/node" "$basedir/../skybridge/bin/run.js" "$@"
19
+ else
20
+ exec node "$basedir/../skybridge/bin/run.js" "$@"
21
+ fi
@@ -0,0 +1,21 @@
1
+ #!/bin/sh
2
+ basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
+
4
+ case `uname` in
5
+ *CYGWIN*|*MINGW*|*MSYS*)
6
+ if command -v cygpath > /dev/null 2>&1; then
7
+ basedir=`cygpath -w "$basedir"`
8
+ fi
9
+ ;;
10
+ esac
11
+
12
+ if [ -z "$NODE_PATH" ]; then
13
+ export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/bin/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/typescript@5.9.3/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/node_modules"
14
+ else
15
+ export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/bin/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/typescript@5.9.3/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/node_modules:$NODE_PATH"
16
+ fi
17
+ if [ -x "$basedir/node" ]; then
18
+ exec "$basedir/node" "$basedir/../typescript/bin/tsc" "$@"
19
+ else
20
+ exec node "$basedir/../typescript/bin/tsc" "$@"
21
+ fi
@@ -0,0 +1,21 @@
1
+ #!/bin/sh
2
+ basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
+
4
+ case `uname` in
5
+ *CYGWIN*|*MINGW*|*MSYS*)
6
+ if command -v cygpath > /dev/null 2>&1; then
7
+ basedir=`cygpath -w "$basedir"`
8
+ fi
9
+ ;;
10
+ esac
11
+
12
+ if [ -z "$NODE_PATH" ]; then
13
+ export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/bin/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/typescript@5.9.3/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/node_modules"
14
+ else
15
+ export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/bin/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/typescript@5.9.3/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/node_modules:$NODE_PATH"
16
+ fi
17
+ if [ -x "$basedir/node" ]; then
18
+ exec "$basedir/node" "$basedir/../typescript/bin/tsserver" "$@"
19
+ else
20
+ exec node "$basedir/../typescript/bin/tsserver" "$@"
21
+ fi
@@ -0,0 +1,21 @@
1
+ #!/bin/sh
2
+ basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
+
4
+ case `uname` in
5
+ *CYGWIN*|*MINGW*|*MSYS*)
6
+ if command -v cygpath > /dev/null 2>&1; then
7
+ basedir=`cygpath -w "$basedir"`
8
+ fi
9
+ ;;
10
+ esac
11
+
12
+ if [ -z "$NODE_PATH" ]; then
13
+ export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/tsx@4.21.0/node_modules/tsx/dist/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/tsx@4.21.0/node_modules/tsx/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/tsx@4.21.0/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/node_modules"
14
+ else
15
+ export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/tsx@4.21.0/node_modules/tsx/dist/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/tsx@4.21.0/node_modules/tsx/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/tsx@4.21.0/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/node_modules:$NODE_PATH"
16
+ fi
17
+ if [ -x "$basedir/node" ]; then
18
+ exec "$basedir/node" "$basedir/../tsx/dist/cli.mjs" "$@"
19
+ else
20
+ exec node "$basedir/../tsx/dist/cli.mjs" "$@"
21
+ fi
@@ -0,0 +1,21 @@
1
+ #!/bin/sh
2
+ basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
+
4
+ case `uname` in
5
+ *CYGWIN*|*MINGW*|*MSYS*)
6
+ if command -v cygpath > /dev/null 2>&1; then
7
+ basedir=`cygpath -w "$basedir"`
8
+ fi
9
+ ;;
10
+ esac
11
+
12
+ if [ -z "$NODE_PATH" ]; then
13
+ export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/vite@7.3.1_@types+node@25.0.3_jiti@2.6.1_lightningcss@1.30.2_terser@5.44.1_tsx@4.21.0/node_modules/vite/bin/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/vite@7.3.1_@types+node@25.0.3_jiti@2.6.1_lightningcss@1.30.2_terser@5.44.1_tsx@4.21.0/node_modules/vite/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/vite@7.3.1_@types+node@25.0.3_jiti@2.6.1_lightningcss@1.30.2_terser@5.44.1_tsx@4.21.0/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/node_modules"
14
+ else
15
+ export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/vite@7.3.1_@types+node@25.0.3_jiti@2.6.1_lightningcss@1.30.2_terser@5.44.1_tsx@4.21.0/node_modules/vite/bin/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/vite@7.3.1_@types+node@25.0.3_jiti@2.6.1_lightningcss@1.30.2_terser@5.44.1_tsx@4.21.0/node_modules/vite/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/vite@7.3.1_@types+node@25.0.3_jiti@2.6.1_lightningcss@1.30.2_terser@5.44.1_tsx@4.21.0/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/node_modules:$NODE_PATH"
16
+ fi
17
+ if [ -x "$basedir/node" ]; then
18
+ exec "$basedir/node" "$basedir/../vite/bin/vite.js" "$@"
19
+ else
20
+ exec node "$basedir/../vite/bin/vite.js" "$@"
21
+ fi
@@ -0,0 +1,5 @@
1
+ {
2
+ "watch": ["server/src"],
3
+ "ext": "ts,json",
4
+ "exec": "tsx server/src/index.ts"
5
+ }
@@ -4,18 +4,40 @@
4
4
  "private": true,
5
5
  "description": "Alpic MCP Server Template",
6
6
  "type": "module",
7
- "packageManager": "pnpm@10.18.3",
8
7
  "scripts": {
9
- "dev": "pnpm --filter @apps-sdk-template/server dev",
10
- "build": "pnpm web:build && rm -rf server/dist && pnpm --filter=@apps-sdk-template/server --prod deploy server/dist && cp -r web/dist server/dist/assets && pnpm --filter=@apps-sdk-template/server build",
11
- "start": "pnpm server:start",
12
- "inspector": "pnpm --filter @apps-sdk-template/server inspector",
13
- "server:build": "pnpm --filter @apps-sdk-template/server build",
14
- "server:start": "pnpm --filter @apps-sdk-template/server start",
15
- "web:build": "pnpm --filter @apps-sdk-template/web build",
16
- "web:preview": "pnpm --filter @apps-sdk-template/web preview"
8
+ "dev": "skybridge",
9
+ "build": "skybridge build",
10
+ "start": "skybridge start",
11
+ "inspector": "mcp-inspector http://localhost:3000/mcp",
12
+ "server:build": "tsc -p tsconfig.server.json",
13
+ "server:start": "node dist/index.js",
14
+ "web:build": "tsc -b web && vite build -c web/vite.config.ts",
15
+ "web:preview": "vite preview -c web/vite.config.ts"
16
+ },
17
+ "dependencies": {
18
+ "@modelcontextprotocol/sdk": "^1.25.2",
19
+ "cors": "^2.8.5",
20
+ "express": "^5.2.1",
21
+ "react": "^19.2.3",
22
+ "react-dom": "^19.2.3",
23
+ "skybridge": ">=0.20.0 <1.0.0",
24
+ "vite": "^7.3.1",
25
+ "zod": "^4.3.5"
17
26
  },
18
27
  "devDependencies": {
19
- "tsx": "^4.19.4"
28
+ "@modelcontextprotocol/inspector": "^0.18.0",
29
+ "@skybridge/devtools": ">=0.20.0 <1.0.0",
30
+ "@types/cors": "^2.8.19",
31
+ "@types/express": "^5.0.6",
32
+ "@types/react": "^19.2.7",
33
+ "@types/react-dom": "^19.2.3",
34
+ "@vitejs/plugin-react": "^5.1.2",
35
+ "nodemon": "^3.1.11",
36
+ "shx": "^0.4.0",
37
+ "tsx": "^4.21.0",
38
+ "typescript": "^5.9.3"
39
+ },
40
+ "engines": {
41
+ "node": ">=24.12.0"
20
42
  }
21
43
  }