create-skybridge 0.0.0-dev.e38035c → 0.0.0-dev.e39da51

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 (35) hide show
  1. package/dist/index.js +96 -71
  2. package/dist/index.test.js +11 -1
  3. package/package.json +6 -6
  4. package/template/AGENTS.md +1 -0
  5. package/template/README.md +41 -19
  6. package/template/_gitignore +5 -0
  7. package/template/alpic.json +1 -2
  8. package/template/node_modules/.bin/alpic +21 -0
  9. package/template/node_modules/.bin/sb +21 -0
  10. package/template/node_modules/.bin/skybridge +21 -0
  11. package/template/node_modules/.bin/vite +2 -2
  12. package/template/package.json +17 -21
  13. package/template/server/src/index.ts +62 -39
  14. package/template/tsconfig.server.json +1 -1
  15. package/template/web/src/helpers.ts +1 -1
  16. package/template/web/src/index.css +129 -6
  17. package/template/web/src/widgets/magic-8-ball.tsx +8 -5
  18. package/template/web/vite.config.ts +2 -2
  19. package/template/node_modules/.bin/mcp-inspector +0 -21
  20. package/template/node_modules/.bin/shx +0 -21
  21. package/template/server/src/middleware.ts +0 -54
  22. package/template/server/src/server.ts +0 -61
  23. package/template-ecom/README.md +0 -89
  24. package/template-ecom/alpic.json +0 -4
  25. package/template-ecom/nodemon.json +0 -5
  26. package/template-ecom/package.json +0 -40
  27. package/template-ecom/server/src/index.ts +0 -39
  28. package/template-ecom/server/src/middleware.ts +0 -54
  29. package/template-ecom/server/src/server.ts +0 -73
  30. package/template-ecom/tsconfig.json +0 -23
  31. package/template-ecom/tsconfig.server.json +0 -11
  32. package/template-ecom/web/src/helpers.ts +0 -4
  33. package/template-ecom/web/src/index.css +0 -194
  34. package/template-ecom/web/src/widgets/ecom-carousel.tsx +0 -181
  35. package/template-ecom/web/vite.config.ts +0 -15
package/dist/index.js CHANGED
@@ -3,12 +3,9 @@ import fs from "node:fs";
3
3
  import path from "node:path";
4
4
  import { fileURLToPath } from "node:url";
5
5
  import * as prompts from "@clack/prompts";
6
+ import { downloadTemplate } from "giget";
6
7
  import mri from "mri";
7
8
  const defaultProjectName = "skybridge-project";
8
- const templates = [
9
- { value: "default", label: "a minimal implementation" },
10
- { value: "ecom", label: "a functional ecommerce carousel" },
11
- ];
12
9
  // prettier-ignore
13
10
  const helpMessage = `\
14
11
  Usage: create-skybridge [OPTION]... [DIRECTORY]
@@ -17,28 +14,32 @@ Create a new Skybridge project by copying the starter template.
17
14
 
18
15
  Options:
19
16
  -h, --help show this help message
17
+ --repo <uri> use a git repository instead of the built-in template
20
18
  --overwrite remove existing files in target directory
21
19
  --immediate install dependencies and start development server
22
- --template <template> use a specific template
23
20
 
24
- Available templates:
25
- ${templates.map((t) => ` ${t.value.padEnd(23)} ${t.label}`).join("\n")}
21
+ Repository URI formats:
22
+ github:user/repo
23
+ gitlab:user/repo/subdirectory
24
+ bitbucket:user/repo#branch
26
25
 
27
26
  Examples:
28
27
  create-skybridge my-app
28
+ create-skybridge my-app --repo github:alpic-ai/skybridge/examples/ecom-carousel
29
29
  create-skybridge . --overwrite --immediate
30
30
  `;
31
31
  export async function init(args = process.argv.slice(2)) {
32
32
  const argv = mri(args, {
33
33
  boolean: ["help", "overwrite", "immediate"],
34
- alias: { h: "help", t: "template" },
34
+ string: ["repo"],
35
+ alias: { h: "help" },
35
36
  });
36
37
  const argTargetDir = argv._[0]
37
38
  ? sanitizeTargetDir(String(argv._[0]))
38
39
  : undefined;
40
+ const argRepo = argv.repo;
39
41
  const argOverwrite = argv.overwrite;
40
42
  const argImmediate = argv.immediate;
41
- const argTemplate = argv.template;
42
43
  const help = argv.help;
43
44
  if (help) {
44
45
  console.log(helpMessage);
@@ -55,7 +56,7 @@ export async function init(args = process.argv.slice(2)) {
55
56
  defaultValue: defaultProjectName,
56
57
  placeholder: defaultProjectName,
57
58
  validate: (value) => {
58
- return value.length === 0 || sanitizeTargetDir(value).length > 0
59
+ return !value || sanitizeTargetDir(value).length > 0
59
60
  ? undefined
60
61
  : "Invalid project name";
61
62
  },
@@ -69,38 +70,7 @@ export async function init(args = process.argv.slice(2)) {
69
70
  targetDir = defaultProjectName;
70
71
  }
71
72
  }
72
- // 2. Select a template
73
- const hasInvalidTemplate = argTemplate && !templates.some((t) => t.value === argTemplate);
74
- let template = argTemplate;
75
- if (interactive) {
76
- if (!argTemplate || hasInvalidTemplate) {
77
- let message = "Please choose a template:";
78
- if (hasInvalidTemplate) {
79
- message = `${argTemplate} is not a valid template. Please choose one of the following:`;
80
- }
81
- template = await prompts.select({
82
- message,
83
- options: templates.map((t) => ({
84
- value: t.value,
85
- label: `${t.value}: ${t.label}`,
86
- })),
87
- });
88
- if (prompts.isCancel(template)) {
89
- return cancel();
90
- }
91
- }
92
- }
93
- else if (hasInvalidTemplate) {
94
- prompts.log.error(`Template is not a valid template. Please choose one of the following: ${templates.map((t) => t.value).join(", ")}`);
95
- process.exit(1);
96
- }
97
- let templatePath = "../template";
98
- switch (template) {
99
- case "ecom":
100
- templatePath = "../template-ecom";
101
- break;
102
- }
103
- // 3. Handle directory if exist and not empty
73
+ // 2. Handle directory if exist and not empty
104
74
  if (fs.existsSync(targetDir) && !isEmpty(targetDir)) {
105
75
  let overwrite = argOverwrite ? "yes" : undefined;
106
76
  if (!overwrite) {
@@ -135,40 +105,76 @@ export async function init(args = process.argv.slice(2)) {
135
105
  emptyDir(targetDir);
136
106
  break;
137
107
  case "no":
138
- cancel();
139
- return;
108
+ prompts.log.error("Target directory is not empty.");
109
+ process.exit(1);
140
110
  }
141
111
  }
142
112
  const root = path.join(process.cwd(), targetDir);
143
- // 4. Copy the template
144
- prompts.log.step(`Copying template...`);
113
+ // 3. Download from repo or copy template
145
114
  try {
146
- const templateDir = fileURLToPath(new URL(templatePath, import.meta.url));
147
- // Copy template to target directory
148
- fs.cpSync(templateDir, root, {
149
- recursive: true,
150
- filter: (src) => [".npmrc"].every((file) => !src.endsWith(file)),
151
- });
152
- // Write .gitignore
153
- fs.writeFileSync(path.join(root, ".gitignore"), `node_modules/
154
- dist/
155
- .env*
156
- .DS_store`);
157
- // Update project name in package.json
158
- const name = path.basename(root);
159
- const pkgPath = path.join(root, "package.json");
160
- const pkg = fs.readFileSync(pkgPath, "utf-8");
161
- const fixed = pkg.replace(/apps-sdk-template/g, name);
162
- fs.writeFileSync(pkgPath, fixed);
163
- prompts.log.success(`Project created in ${root}`);
115
+ if (argRepo) {
116
+ prompts.log.step(`Downloading ${argRepo}...`);
117
+ await downloadTemplate(argRepo, { dir: root });
118
+ prompts.log.success(`Project created in ${root}`);
119
+ }
120
+ else {
121
+ prompts.log.step(`Copying template...`);
122
+ const templateDir = fileURLToPath(new URL("../template", import.meta.url));
123
+ // Copy template to target directory
124
+ fs.cpSync(templateDir, root, {
125
+ recursive: true,
126
+ filter: (src) => [".npmrc"].every((file) => !src.endsWith(file)),
127
+ });
128
+ // Rename _gitignore to .gitignore
129
+ fs.renameSync(path.join(root, "_gitignore"), path.join(root, ".gitignore"));
130
+ prompts.log.success(`Project created in ${root}`);
131
+ }
164
132
  }
165
133
  catch (error) {
166
- prompts.log.error("Failed to copy repository");
134
+ prompts.log.error("Failed to create project from template");
135
+ console.error(error);
136
+ process.exit(1);
137
+ }
138
+ // Update project name in package.json
139
+ const pkgPath = path.join(root, "package.json");
140
+ if (!fs.existsSync(pkgPath)) {
141
+ prompts.log.error("No package.json found in project");
142
+ process.exit(1);
143
+ }
144
+ try {
145
+ const pkg = JSON.parse(fs.readFileSync(pkgPath, "utf-8"));
146
+ pkg.name = path.basename(root);
147
+ fs.writeFileSync(pkgPath, `${JSON.stringify(pkg, null, 2)}\n`);
148
+ }
149
+ catch (error) {
150
+ prompts.log.error("Failed to update project name in package.json");
167
151
  console.error(error);
168
152
  process.exit(1);
169
153
  }
170
154
  const userAgent = process.env.npm_config_user_agent;
171
155
  const pkgManager = userAgent?.split(" ")[0]?.split("/")[0] || "npm";
156
+ // 4. Ask about skills installation
157
+ if (interactive) {
158
+ const skillsResult = await prompts.confirm({
159
+ message: "Install the coding agents skills? (recommended)",
160
+ initialValue: true,
161
+ });
162
+ if (prompts.isCancel(skillsResult)) {
163
+ return cancel();
164
+ }
165
+ if (skillsResult) {
166
+ run([
167
+ ...getPkgExecCmd(pkgManager, "skills"),
168
+ "add",
169
+ "alpic-ai/skybridge",
170
+ "-s",
171
+ "chatgpt-app-builder",
172
+ ], {
173
+ stdio: "inherit",
174
+ cwd: targetDir,
175
+ });
176
+ }
177
+ }
172
178
  // 5. Ask about immediate installation
173
179
  let immediate = argImmediate;
174
180
  if (immediate === undefined) {
@@ -241,18 +247,37 @@ function sanitizeTargetDir(targetDir) {
241
247
  // Remove leading/trailing slashes
242
248
  .replace(/^\/+|\/+$/g, ""));
243
249
  }
244
- function isEmpty(path) {
245
- const files = fs.readdirSync(path);
246
- return files.length === 0 || (files.length === 1 && files[0] === ".git");
250
+ // Skip user's SPEC.md and IDE/agent preferences (.idea, .claude, etc.)
251
+ function isSkippedEntry(entry) {
252
+ return ((entry.name.startsWith(".") && entry.isDirectory()) ||
253
+ entry.name === "SPEC.md");
254
+ }
255
+ function isEmpty(dirPath) {
256
+ const entries = fs.readdirSync(dirPath, { withFileTypes: true });
257
+ return entries.every(isSkippedEntry);
247
258
  }
248
259
  function emptyDir(dir) {
249
260
  if (!fs.existsSync(dir)) {
250
261
  return;
251
262
  }
252
- for (const file of fs.readdirSync(dir)) {
253
- if (file === ".git") {
263
+ for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
264
+ if (isSkippedEntry(entry)) {
254
265
  continue;
255
266
  }
256
- fs.rmSync(path.resolve(dir, file), { recursive: true, force: true });
267
+ fs.rmSync(path.join(dir, entry.name), { recursive: true, force: true });
268
+ }
269
+ }
270
+ function getPkgExecCmd(pkgManager, cmd) {
271
+ switch (pkgManager) {
272
+ case "yarn":
273
+ return ["yarn", "dlx", cmd];
274
+ case "pnpm":
275
+ return ["pnpm", "dlx", cmd];
276
+ case "bun":
277
+ return ["bunx", cmd];
278
+ case "deno":
279
+ return ["deno", "run", "-A", `npm:${cmd}`];
280
+ default:
281
+ return ["npx", cmd];
257
282
  }
258
283
  }
@@ -14,10 +14,20 @@ describe("create-skybridge", () => {
14
14
  force: true,
15
15
  });
16
16
  });
17
- it("should scaffold a new project", async () => {
17
+ it("should copy the template", async () => {
18
18
  const name = `../../${tempDirName}//project$`;
19
19
  await init([name]);
20
20
  await fs.access(path.join(process.cwd(), tempDirName, "project", ".gitignore"));
21
21
  expect(fs.access(path.join(process.cwd(), tempDirName, "project", ".npmrc"))).rejects.toThrowError();
22
22
  });
23
+ it("should download template from repo", async () => {
24
+ const name = `../../${tempDirName}//project$`;
25
+ await init([
26
+ name,
27
+ "--repo",
28
+ "github:alpic-ai/skybridge/examples/ecom-carousel",
29
+ ]);
30
+ await fs.access(path.join(process.cwd(), tempDirName, "project", ".gitignore"));
31
+ expect(fs.access(path.join(process.cwd(), tempDirName, "project", ".npmrc"))).rejects.toThrowError();
32
+ });
23
33
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-skybridge",
3
- "version": "0.0.0-dev.e38035c",
3
+ "version": "0.0.0-dev.e39da51",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "author": "Alpic",
@@ -14,19 +14,19 @@
14
14
  "files": [
15
15
  "index.js",
16
16
  "dist",
17
- "template",
18
- "template-ecom"
17
+ "template"
19
18
  ],
20
19
  "dependencies": {
21
- "@clack/prompts": "^0.11.0",
20
+ "@clack/prompts": "^1.0.0",
21
+ "giget": "^3.1.2",
22
22
  "mri": "^1.2.0"
23
23
  },
24
24
  "devDependencies": {
25
25
  "typescript": "^5.9.3",
26
- "vitest": "^4.0.16"
26
+ "vitest": "^4.0.18"
27
27
  },
28
28
  "scripts": {
29
- "build": "tsc && node copyExamples.js",
29
+ "build": "tsc",
30
30
  "test": "pnpm run test:unit && pnpm run test:type && pnpm run test:format",
31
31
  "test:unit": "vitest run",
32
32
  "test:type": "tsc --noEmit",
@@ -0,0 +1 @@
1
+ Before writing code, first explore the project structure, then invoke the chatgpt-app-builder skill for documentation.
@@ -1,13 +1,13 @@
1
- # ChatGPT Apps SDK Alpic Starter
1
+ # Skybridge Starter
2
2
 
3
- A minimal TypeScript template for building OpenAI Apps SDK compatible MCP servers with widget rendering in ChatGPT.
3
+ A minimal TypeScript template for building MCP and ChatGPT Apps with the [Skybridge](https://docs.skybridge.tech/home) framework.
4
4
 
5
5
  ## Getting Started
6
6
 
7
7
  ### Prerequisites
8
8
 
9
9
  - Node.js 24+
10
- - HTTP tunnel such as [ngrok](https://ngrok.com/download)
10
+ - HTTP tunnel such as [ngrok](https://ngrok.com/download) if you want to test with remote MCP hosts like ChatGPT or Claude.ai.
11
11
 
12
12
  ### Local Development
13
13
 
@@ -37,41 +37,63 @@ pnpm dev
37
37
  bun dev
38
38
  ```
39
39
 
40
- This command starts an Express server on port 3000. This server packages:
40
+ This command starts:
41
+ - Your MCP server at `http://localhost:3000/mcp`.
42
+ - Skybridge DevTools UI at `http://localhost:3000/`.
41
43
 
42
- - an MCP endpoint on `/mcp` (the app backend)
43
- - a React application on Vite HMR dev server (the UI elements to be displayed in ChatGPT)
44
+ #### 3. Project structure
44
45
 
45
- #### 3. Connect to ChatGPT
46
-
47
- - ChatGPT requires connectors to be publicly accessible. To expose your server on the Internet, run:
48
- ```bash
49
- ngrok http 3000
50
46
  ```
51
- - In ChatGPT, navigate to **Settings → Connectors → Create** and add the forwarding URL provided by ngrok suffixed with `/mcp` (e.g. `https://3785c5ddc4b6.ngrok-free.app/mcp`)
47
+ ├── server/
48
+ │ └── src/
49
+ │ ├── index.ts # Entry point
50
+ │ ├── middleware.ts # MCP middleware
51
+ │ └── server.ts # Widget registry & routes
52
+ ├── web/
53
+ │ ├── src/
54
+ │ │ ├── widgets/ # React components (one per widget)
55
+ │ │ ├── helpers.ts # Shared utilities
56
+ │ │ └── index.css # Global styles
57
+ │ └── vite.config.ts
58
+ ├── alpic.json # Deployment config
59
+ ├── nodemon.json # Dev server config
60
+ └── package.json
61
+ ```
52
62
 
53
63
  ### Create your first widget
54
64
 
55
65
  #### 1. Add a new widget
56
66
 
57
- - Register a widget in `server/server.ts` with a unique name (e.g., `my-widget`)
58
- - Create a matching React component at `web/src/widgets/my-widget.tsx`. The file name must match the widget name exactly
67
+ - Register a widget in `server/src/server.ts` with a unique name (e.g., `my-widget`) using [`registerWidget`](https://docs.skybridge.tech/api-reference/register-widget)
68
+ - Create a matching React component at `web/src/widgets/my-widget.tsx`. **The file name must match the widget name exactly**.
59
69
 
60
70
  #### 2. Edit widgets with Hot Module Replacement (HMR)
61
71
 
62
- Edit and save components in `web/src/widgets/` — changes appear instantly in ChatGPT
72
+ Edit and save components in `web/src/widgets/` — changes will appear instantly inside your App.
63
73
 
64
74
  #### 3. Edit server code
65
75
 
66
- Modify files in `server/` and reload your ChatGPT connector in **Settings Connectors [Your connector] → Reload**
76
+ Modify files in `server/` and refresh the connection with your testing MCP Client to see the changes.
77
+
78
+ ### Testing your App
79
+
80
+ You can test your App locally by using our DevTools UI on `localhost:3000` while running the `pnpm dev` command.
81
+
82
+ To test your app with other MCP Clients like ChatGPT, Claude or VSCode, see [Testing Your App](https://docs.skybridge.tech/quickstart/test-your-app).
83
+
67
84
 
68
85
  ## Deploy to Production
69
86
 
70
- - Use [Alpic](https://alpic.ai/) to deploy your OpenAI App to production
71
- - In ChatGPT, navigate to **Settings → Connectors → Create** and add your MCP server URL (e.g., `https://your-app-name.alpic.live`)
87
+ Skybridge is infrastructure vendor agnostic, and your app can be deployed on any cloud platform supporting MCP.
72
88
 
73
- ## Resources
89
+ The simplest way to deploy your App in minutes is [Alpic](https://alpic.ai/).
90
+ 1. Create an account on [Alpic platform](https://app.alpic.ai/).
91
+ 2. Connect your GitHub repository to automatically deploy at each commit.
92
+ 3. Use your remote App URL to connect it to MCP Clients, or use the Alpic Playground to easily test your App.
74
93
 
94
+ ## Resources
95
+ - [Skybridge Documentation](https://docs.skybridge.tech/)
75
96
  - [Apps SDK Documentation](https://developers.openai.com/apps-sdk)
97
+ - [MCP Apps Documentation](https://github.com/modelcontextprotocol/ext-apps/tree/main)
76
98
  - [Model Context Protocol Documentation](https://modelcontextprotocol.io/)
77
99
  - [Alpic Documentation](https://docs.alpic.ai/)
@@ -0,0 +1,5 @@
1
+ node_modules/
2
+ dist/
3
+ .env*
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/alpic@1.85.0_@opentelemetry+api@1.9.0/node_modules/alpic/bin/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/alpic@1.85.0_@opentelemetry+api@1.9.0/node_modules/alpic/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/alpic@1.85.0_@opentelemetry+api@1.9.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/alpic@1.85.0_@opentelemetry+api@1.9.0/node_modules/alpic/bin/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/alpic@1.85.0_@opentelemetry+api@1.9.0/node_modules/alpic/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/alpic@1.85.0_@opentelemetry+api@1.9.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/../alpic/bin/run.js" "$@"
19
+ else
20
+ exec node "$basedir/../alpic/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/skybridge@0.31.3_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__@skybridge+devtools@0.31.3_2d6e8e74b602234e8340521ea4586b07/node_modules/skybridge/bin/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/skybridge@0.31.3_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__@skybridge+devtools@0.31.3_2d6e8e74b602234e8340521ea4586b07/node_modules/skybridge/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/skybridge@0.31.3_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__@skybridge+devtools@0.31.3_2d6e8e74b602234e8340521ea4586b07/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.31.3_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__@skybridge+devtools@0.31.3_2d6e8e74b602234e8340521ea4586b07/node_modules/skybridge/bin/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/skybridge@0.31.3_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__@skybridge+devtools@0.31.3_2d6e8e74b602234e8340521ea4586b07/node_modules/skybridge/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/skybridge@0.31.3_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__@skybridge+devtools@0.31.3_2d6e8e74b602234e8340521ea4586b07/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/skybridge@0.31.3_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__@skybridge+devtools@0.31.3_2d6e8e74b602234e8340521ea4586b07/node_modules/skybridge/bin/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/skybridge@0.31.3_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__@skybridge+devtools@0.31.3_2d6e8e74b602234e8340521ea4586b07/node_modules/skybridge/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/skybridge@0.31.3_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__@skybridge+devtools@0.31.3_2d6e8e74b602234e8340521ea4586b07/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.31.3_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__@skybridge+devtools@0.31.3_2d6e8e74b602234e8340521ea4586b07/node_modules/skybridge/bin/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/skybridge@0.31.3_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__@skybridge+devtools@0.31.3_2d6e8e74b602234e8340521ea4586b07/node_modules/skybridge/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/skybridge@0.31.3_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__@skybridge+devtools@0.31.3_2d6e8e74b602234e8340521ea4586b07/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
@@ -10,9 +10,9 @@ case `uname` in
10
10
  esac
11
11
 
12
12
  if [ -z "$NODE_PATH" ]; then
13
- export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/vite@7.3.0_@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.0_@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.0_@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"
13
+ export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/vite@7.3.1_@types+node@25.2.2_jiti@2.6.1_lightningcss@1.30.2_terser@5.44.1_tsx@4.21.0_yaml@2.8.2/node_modules/vite/bin/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/vite@7.3.1_@types+node@25.2.2_jiti@2.6.1_lightningcss@1.30.2_terser@5.44.1_tsx@4.21.0_yaml@2.8.2/node_modules/vite/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/vite@7.3.1_@types+node@25.2.2_jiti@2.6.1_lightningcss@1.30.2_terser@5.44.1_tsx@4.21.0_yaml@2.8.2/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/node_modules"
14
14
  else
15
- export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/vite@7.3.0_@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.0_@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.0_@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"
15
+ export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/vite@7.3.1_@types+node@25.2.2_jiti@2.6.1_lightningcss@1.30.2_terser@5.44.1_tsx@4.21.0_yaml@2.8.2/node_modules/vite/bin/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/vite@7.3.1_@types+node@25.2.2_jiti@2.6.1_lightningcss@1.30.2_terser@5.44.1_tsx@4.21.0_yaml@2.8.2/node_modules/vite/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/vite@7.3.1_@types+node@25.2.2_jiti@2.6.1_lightningcss@1.30.2_terser@5.44.1_tsx@4.21.0_yaml@2.8.2/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/node_modules:$NODE_PATH"
16
16
  fi
17
17
  if [ -x "$basedir/node" ]; then
18
18
  exec "$basedir/node" "$basedir/../vite/bin/vite.js" "$@"
@@ -5,38 +5,34 @@
5
5
  "description": "Alpic MCP Server Template",
6
6
  "type": "module",
7
7
  "scripts": {
8
- "dev": "nodemon",
9
- "build": "vite build -c web/vite.config.ts && shx rm -rf server/dist && tsc -p tsconfig.server.json && shx cp -r web/dist server/dist/assets",
10
- "start": "node server/dist/index.js",
11
- "inspector": "mcp-inspector http://localhost:3000/mcp",
12
- "server:build": "tsc -p tsconfig.server.json",
13
- "server:start": "node server/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"
8
+ "dev": "skybridge dev",
9
+ "build": "skybridge build",
10
+ "start": "skybridge start",
11
+ "deploy": "alpic deploy"
16
12
  },
17
13
  "dependencies": {
18
- "@modelcontextprotocol/sdk": "^1.25.1",
14
+ "@modelcontextprotocol/sdk": "^1.26.0",
15
+ "cors": "^2.8.6",
19
16
  "express": "^5.2.1",
20
- "react": "^19.2.3",
21
- "react-dom": "^19.2.3",
22
- "skybridge": ">=0.16.8 <1.0.0",
23
- "vite": "^7.3.0",
24
- "zod": "^4.3.5"
17
+ "react": "^19.2.4",
18
+ "react-dom": "^19.2.4",
19
+ "skybridge": ">=0.31.3 <1.0.0",
20
+ "vite": "^7.3.1",
21
+ "zod": "^4.3.6"
25
22
  },
26
23
  "devDependencies": {
27
- "@modelcontextprotocol/inspector": "^0.18.0",
28
- "@skybridge/devtools": ">=0.16.2 <1.0.0",
24
+ "@skybridge/devtools": ">=0.31.3 <1.0.0",
25
+ "@types/cors": "^2.8.19",
29
26
  "@types/express": "^5.0.6",
30
- "@types/react": "^19.2.7",
27
+ "@types/react": "^19.2.13",
31
28
  "@types/react-dom": "^19.2.3",
32
- "@vitejs/plugin-react": "^5.1.2",
29
+ "@vitejs/plugin-react": "^5.1.4",
30
+ "alpic": "^1.84.3",
33
31
  "nodemon": "^3.1.11",
34
- "shx": "^0.4.0",
35
32
  "tsx": "^4.21.0",
36
33
  "typescript": "^5.9.3"
37
34
  },
38
- "workspaces": [],
39
35
  "engines": {
40
- "node": ">=24.0.0"
36
+ "node": ">=24.13.0"
41
37
  }
42
38
  }