create-skybridge 0.0.0-dev.fb3f63e → 0.0.0-dev.fb985cd

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 (158) hide show
  1. package/dist/index.js +426 -208
  2. package/package.json +9 -8
  3. package/templates/blank/.dockerignore +4 -0
  4. package/templates/blank/AGENTS.md +1 -0
  5. package/templates/blank/Dockerfile +53 -0
  6. package/templates/blank/README.md +93 -0
  7. package/{template → templates/blank}/_gitignore +3 -1
  8. package/templates/blank/node_modules/.bin/alpic +21 -0
  9. package/templates/blank/node_modules/.bin/sb +21 -0
  10. package/templates/blank/node_modules/.bin/skybridge +21 -0
  11. package/templates/blank/node_modules/.bin/tsc +21 -0
  12. package/templates/blank/node_modules/.bin/tsserver +21 -0
  13. package/templates/blank/node_modules/.bin/tsx +21 -0
  14. package/templates/blank/node_modules/.bin/vite +21 -0
  15. package/templates/blank/package.json +30 -0
  16. package/templates/blank/src/helpers.ts +4 -0
  17. package/templates/blank/src/index.ts +3 -0
  18. package/templates/blank/src/server.ts +12 -0
  19. package/templates/blank/tsconfig.json +5 -0
  20. package/templates/blank/vite.config.ts +12 -0
  21. package/templates/demo/.dockerignore +4 -0
  22. package/templates/demo/AGENTS.md +1 -0
  23. package/templates/demo/Dockerfile +53 -0
  24. package/templates/demo/README.md +97 -0
  25. package/templates/demo/_gitignore +7 -0
  26. package/templates/demo/alpic.json +3 -0
  27. package/templates/demo/evals/start.eval.ts +11 -0
  28. package/templates/demo/node_modules/.bin/alpic +21 -0
  29. package/templates/demo/node_modules/.bin/sb +21 -0
  30. package/templates/demo/node_modules/.bin/skybridge +21 -0
  31. package/templates/demo/node_modules/.bin/tsc +21 -0
  32. package/templates/demo/node_modules/.bin/tsserver +21 -0
  33. package/templates/demo/node_modules/.bin/tsx +21 -0
  34. package/templates/demo/node_modules/.bin/vite +21 -0
  35. package/templates/demo/node_modules/.bin/vitest +21 -0
  36. package/templates/demo/package.json +47 -0
  37. package/templates/demo/src/helpers.ts +4 -0
  38. package/templates/demo/src/index.css +59 -0
  39. package/templates/demo/src/index.ts +3 -0
  40. package/templates/demo/src/server.ts +92 -0
  41. package/templates/demo/src/views/components/doc-link.tsx +22 -0
  42. package/templates/demo/src/views/components/doc.tsx +21 -0
  43. package/templates/demo/src/views/components/nav.tsx +31 -0
  44. package/templates/demo/src/views/components/progress.tsx +35 -0
  45. package/templates/demo/src/views/components/steps/outro.tsx +68 -0
  46. package/templates/demo/src/views/components/steps/state.tsx +47 -0
  47. package/templates/demo/src/views/components/steps/tool-call.tsx +53 -0
  48. package/templates/demo/src/views/components/steps/tool-output.tsx +40 -0
  49. package/templates/demo/src/views/images/mascot/beret.png +0 -0
  50. package/templates/demo/src/views/images/mascot/chapka.png +0 -0
  51. package/templates/demo/src/views/images/mascot/cowboy-hat.png +0 -0
  52. package/templates/demo/src/views/images/mascot/fez.png +0 -0
  53. package/templates/demo/src/views/images/mascot/jester-hat.png +0 -0
  54. package/templates/demo/src/views/images/mascot/mitre.png +0 -0
  55. package/templates/demo/src/views/images/mascot/non-la.png +0 -0
  56. package/templates/demo/src/views/images/mascot/original.png +0 -0
  57. package/templates/demo/src/views/images/mascot/propeller-beanie.png +0 -0
  58. package/templates/demo/src/views/images/mascot/ski-mask.png +0 -0
  59. package/templates/demo/src/views/images/mascot/sombrero.png +0 -0
  60. package/templates/demo/src/views/images/mascot/top-hat.png +0 -0
  61. package/templates/demo/src/views/images/mascot/viking-helmet.png +0 -0
  62. package/templates/demo/src/views/onboarding.tsx +63 -0
  63. package/templates/demo/src/views/use-mascot.ts +60 -0
  64. package/templates/demo/tsconfig.evals.json +11 -0
  65. package/templates/demo/tsconfig.json +11 -0
  66. package/templates/demo/vite.config.ts +20 -0
  67. package/templates/ecom/.dockerignore +4 -0
  68. package/templates/ecom/.env.template +7 -0
  69. package/templates/ecom/.ladle/components.tsx +26 -0
  70. package/templates/ecom/.ladle/config.mjs +11 -0
  71. package/templates/ecom/.ladle/vite.config.ts +11 -0
  72. package/templates/ecom/AGENTS.md +2 -0
  73. package/templates/ecom/Dockerfile +53 -0
  74. package/templates/ecom/README.md +93 -0
  75. package/templates/ecom/_gitignore +9 -0
  76. package/templates/ecom/alpic.json +3 -0
  77. package/templates/ecom/node_modules/.bin/alpic +21 -0
  78. package/templates/ecom/node_modules/.bin/ladle +21 -0
  79. package/templates/ecom/node_modules/.bin/sb +21 -0
  80. package/templates/ecom/node_modules/.bin/skybridge +21 -0
  81. package/templates/ecom/node_modules/.bin/tsc +21 -0
  82. package/templates/ecom/node_modules/.bin/tsserver +21 -0
  83. package/templates/ecom/node_modules/.bin/tsx +21 -0
  84. package/templates/ecom/node_modules/.bin/vite +21 -0
  85. package/templates/ecom/package.json +42 -0
  86. package/templates/ecom/src/catalog/index.ts +19 -0
  87. package/templates/ecom/src/catalog/mock.ts +134 -0
  88. package/templates/ecom/src/catalog/shopify.ts +264 -0
  89. package/templates/ecom/src/components/chip.css.ts +63 -0
  90. package/templates/ecom/src/components/chip.stories.tsx +27 -0
  91. package/templates/ecom/src/components/chip.tsx +49 -0
  92. package/templates/ecom/src/components/empty-state.stories.tsx +3 -0
  93. package/templates/ecom/src/components/empty-state.tsx +12 -0
  94. package/templates/ecom/src/components/expandable-text.css.ts +49 -0
  95. package/templates/ecom/src/components/expandable-text.stories.tsx +20 -0
  96. package/templates/ecom/src/components/expandable-text.tsx +53 -0
  97. package/templates/ecom/src/components/image-gallery.css.ts +172 -0
  98. package/templates/ecom/src/components/image-gallery.stories.tsx +30 -0
  99. package/templates/ecom/src/components/image-gallery.tsx +163 -0
  100. package/templates/ecom/src/components/product-card.css.ts +159 -0
  101. package/templates/ecom/src/components/product-card.stories.tsx +58 -0
  102. package/templates/ecom/src/components/product-card.tsx +102 -0
  103. package/templates/ecom/src/components/product-carousel.css.ts +134 -0
  104. package/templates/ecom/src/components/product-carousel.stories.tsx +64 -0
  105. package/templates/ecom/src/components/product-carousel.tsx +202 -0
  106. package/templates/ecom/src/components/variant-picker.css.ts +27 -0
  107. package/templates/ecom/src/components/variant-picker.stories.tsx +67 -0
  108. package/templates/ecom/src/components/variant-picker.tsx +70 -0
  109. package/templates/ecom/src/components/view-frame.css.ts +22 -0
  110. package/templates/ecom/src/components/view-frame.tsx +27 -0
  111. package/templates/ecom/src/config.ts +12 -0
  112. package/templates/ecom/src/design/contract.css.ts +39 -0
  113. package/templates/ecom/src/design/fonts.css +15 -0
  114. package/templates/ecom/src/design/primitives.css.ts +101 -0
  115. package/templates/ecom/src/design/recipes/typography.css.ts +75 -0
  116. package/templates/ecom/src/design/sprinkles.css.ts +128 -0
  117. package/templates/ecom/src/design/themes/dark.css.ts +36 -0
  118. package/templates/ecom/src/design/themes/light.css.ts +36 -0
  119. package/templates/ecom/src/design/tokens.ts +8 -0
  120. package/templates/ecom/src/helpers.ts +4 -0
  121. package/templates/ecom/src/i18n.ts +35 -0
  122. package/templates/ecom/src/index.css +9 -0
  123. package/templates/ecom/src/index.ts +3 -0
  124. package/templates/ecom/src/lib/cx.ts +9 -0
  125. package/templates/ecom/src/lib/format.ts +9 -0
  126. package/templates/ecom/src/lib/variants.ts +150 -0
  127. package/templates/ecom/src/server.ts +39 -0
  128. package/templates/ecom/src/tools/render-carousel.ts +161 -0
  129. package/templates/ecom/src/tools/search-products.ts +196 -0
  130. package/templates/ecom/src/types.ts +87 -0
  131. package/templates/ecom/src/views/carousel/detail/detail.css.ts +115 -0
  132. package/templates/ecom/src/views/carousel/detail/detail.stories.tsx +133 -0
  133. package/templates/ecom/src/views/carousel/detail/index.tsx +254 -0
  134. package/templates/ecom/src/views/carousel/index.tsx +233 -0
  135. package/templates/ecom/tsconfig.json +11 -0
  136. package/templates/ecom/vite.config.ts +8 -0
  137. package/dist/index.test.d.ts +0 -1
  138. package/dist/index.test.js +0 -33
  139. package/template/AGENTS.md +0 -1
  140. package/template/README.md +0 -99
  141. package/template/node_modules/.bin/alpic +0 -21
  142. package/template/node_modules/.bin/nodemon +0 -21
  143. package/template/node_modules/.bin/sb +0 -21
  144. package/template/node_modules/.bin/skybridge +0 -21
  145. package/template/node_modules/.bin/tsc +0 -21
  146. package/template/node_modules/.bin/tsserver +0 -21
  147. package/template/node_modules/.bin/tsx +0 -21
  148. package/template/node_modules/.bin/vite +0 -21
  149. package/template/nodemon.json +0 -5
  150. package/template/package.json +0 -38
  151. package/template/server/src/index.ts +0 -62
  152. package/template/tsconfig.json +0 -23
  153. package/template/tsconfig.server.json +0 -11
  154. package/template/web/src/helpers.ts +0 -4
  155. package/template/web/src/index.css +0 -154
  156. package/template/web/src/widgets/magic-8-ball.tsx +0 -27
  157. package/template/web/vite.config.ts +0 -15
  158. /package/{template → templates/blank}/alpic.json +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-skybridge",
3
- "version": "0.0.0-dev.fb3f63e",
3
+ "version": "0.0.0-dev.fb985cd",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "author": "Alpic",
@@ -14,22 +14,23 @@
14
14
  "files": [
15
15
  "index.js",
16
16
  "dist",
17
- "template"
17
+ "templates"
18
18
  ],
19
19
  "dependencies": {
20
- "@clack/prompts": "^1.0.0",
21
- "giget": "^3.1.2",
20
+ "@clack/prompts": "^1.7.0",
21
+ "cross-spawn": "^7.0.6",
22
22
  "mri": "^1.2.0"
23
23
  },
24
24
  "devDependencies": {
25
- "typescript": "^5.9.3",
26
- "vitest": "^4.0.18"
25
+ "@types/cross-spawn": "^6.0.6",
26
+ "typescript": "^6.0.3",
27
+ "vitest": "^4.1.10"
27
28
  },
28
29
  "scripts": {
29
30
  "build": "tsc",
30
- "test": "pnpm run test:unit && pnpm run test:type && pnpm run test:format",
31
+ "test": "pnpm run test:unit && pnpm run test:format",
31
32
  "test:unit": "vitest run",
32
- "test:type": "tsc --noEmit",
33
+ "format": "biome check --write --error-on-warnings",
33
34
  "test:format": "biome ci"
34
35
  }
35
36
  }
@@ -0,0 +1,4 @@
1
+ node_modules
2
+ .git
3
+ dist
4
+ .env*
@@ -0,0 +1 @@
1
+ This is a ChatGPT/MCP app built with Skybridge. ALWAYS use the `chatgpt-plugin-builder` skill when planning or updating the codebase.
@@ -0,0 +1,53 @@
1
+ # syntax=docker/dockerfile:1
2
+
3
+ # Dockerfile for a Skybridge MCP server.
4
+ #
5
+ # Detects npm, yarn, or pnpm from the lockfile in your project.
6
+ # (For bun or deno, adapt the install/build/prune commands below.)
7
+
8
+ # Build stage: install deps, compile the app, then prune dev deps.
9
+ FROM node:24.18.0-slim AS build
10
+ WORKDIR /app
11
+
12
+ COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* .npmrc* ./
13
+ RUN --mount=type=cache,target=/root/.npm \
14
+ --mount=type=cache,target=/usr/local/share/.cache/yarn \
15
+ --mount=type=cache,target=/root/.local/share/pnpm/store \
16
+ if [ -f package-lock.json ]; then \
17
+ npm ci; \
18
+ elif [ -f yarn.lock ]; then \
19
+ corepack enable yarn && yarn install --frozen-lockfile; \
20
+ elif [ -f pnpm-lock.yaml ]; then \
21
+ corepack enable pnpm && pnpm install --frozen-lockfile; \
22
+ else \
23
+ echo "No lockfile found." && exit 1; \
24
+ fi
25
+
26
+ ENV NODE_ENV=production
27
+
28
+ COPY . .
29
+ RUN if [ -f package-lock.json ]; then \
30
+ npm run build && npm prune --omit=dev; \
31
+ elif [ -f yarn.lock ]; then \
32
+ corepack enable yarn && yarn build && yarn install --frozen-lockfile --production=true; \
33
+ elif [ -f pnpm-lock.yaml ]; then \
34
+ corepack enable pnpm && pnpm build && pnpm prune --prod; \
35
+ fi
36
+
37
+ # Runtime stage: copy built artifacts and prod deps, run as non-root.
38
+ FROM node:24.18.0-slim AS runtime
39
+ WORKDIR /app
40
+ ENV NODE_ENV=production
41
+
42
+ USER node
43
+
44
+ COPY --from=build --chown=node:node /app/node_modules ./node_modules
45
+ COPY --from=build --chown=node:node /app/dist ./dist
46
+ COPY --from=build --chown=node:node /app/package.json ./package.json
47
+
48
+ EXPOSE 3000
49
+
50
+ # Run the built server directly rather than via `npm start` / `skybridge start`.
51
+ # Each wrapper adds a process layer that can swallow SIGTERM, which makes
52
+ # graceful shutdowns time out on platforms like Cloud Run, Fly, and k8s.
53
+ CMD ["node", "dist/__entry.js"]
@@ -0,0 +1,93 @@
1
+ # Skybridge Boilerplate
2
+
3
+ A minimal TypeScript boilerplate for building MCP apps and ChatGPT plugins with the [Skybridge](https://docs.skybridge.tech) framework.
4
+
5
+ ## Getting Started
6
+
7
+ ### Prerequisites
8
+
9
+ - Node.js 24+
10
+
11
+ ### Local Development
12
+
13
+ #### 1. Install
14
+
15
+ ```bash
16
+ npm install
17
+ # or
18
+ pnpm install
19
+ # or
20
+ bun install
21
+ # or
22
+ deno install
23
+ # or
24
+ yarn install
25
+ ```
26
+
27
+ #### 2. Start your local server
28
+
29
+ Run the development server from the root directory:
30
+
31
+ ```bash
32
+ npm run dev
33
+ # or
34
+ pnpm dev
35
+ # or
36
+ bun dev
37
+ # or
38
+ deno task dev
39
+ # or
40
+ yarn dev
41
+ ```
42
+
43
+ This command starts:
44
+ - Your MCP server at `http://localhost:3000/mcp`.
45
+ - Skybridge DevTools UI at `http://localhost:3000`.
46
+
47
+ #### 3. Project structure
48
+
49
+ ```
50
+ ├── src/
51
+ │ ├── index.ts # Entry point (starts the app)
52
+ │ ├── server.ts # App definition (tools, views)
53
+ │ └── helpers.ts # Shared utilities
54
+ ├── vite.config.ts
55
+ ├── alpic.json # Deployment config
56
+ └── package.json
57
+ ```
58
+
59
+ ### Create your first view
60
+
61
+ #### 1. Add a new view
62
+
63
+ - Register a tool in `src/server.ts` with a unique name (e.g., `my-view`) using [`registerTool`](https://docs.skybridge.tech/api-reference/register-tool) and a `view` config.
64
+ - Create a matching React component at `src/views/my-view.tsx`. **The file name must match the view name exactly**.
65
+
66
+ #### 2. Edit views with Hot Module Replacement (HMR)
67
+
68
+ Edit and save components in `src/views/` — changes will appear instantly inside your App.
69
+
70
+ #### 3. Edit server code
71
+
72
+ Modify files in `src/` and refresh the tool list with your MCP Client to see the changes.
73
+
74
+ ### Testing your App
75
+
76
+ You can test your app locally by using our DevTools UI on `http://localhost:3000` while running the `dev` command.
77
+
78
+ To connect your app with web clients like ChatGPT or Claude, expose your server on the internet by adding the `--tunnel` flag.
79
+ By enabling the tunnel, you'll also be able to access a playground to chat with your app and a real LLM. Learn more by reading the [test guide](https://docs.skybridge.tech/quickstart/test-your-app).
80
+
81
+
82
+ ## Deploy to Production
83
+
84
+ Skybridge is infrastructure vendor agnostic, and your app can be deployed on any cloud platform supporting MCP.
85
+
86
+ The simplest way to deploy your app is by running the `deploy` command, which will push your MCP server to the [Alpic](https://alpic.ai/) cloud for free.
87
+
88
+ ## Resources
89
+ - [Skybridge Documentation](https://docs.skybridge.tech/)
90
+ - [ChatGPT Plugins Documentation](https://developers.openai.com/plugins)
91
+ - [MCP Apps Documentation](https://github.com/modelcontextprotocol/ext-apps/tree/main)
92
+ - [Model Context Protocol Documentation](https://modelcontextprotocol.io/)
93
+ - [Alpic Documentation](https://docs.alpic.ai/)
@@ -2,4 +2,6 @@ node_modules/
2
2
  dist/
3
3
  .env*
4
4
  .DS_store
5
- *.tsbuildinfo
5
+ *.tsbuildinfo
6
+ .skybridge/
7
+ .vercel/
@@ -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.157.0_@opentelemetry+api@1.9.1_@opentelemetry+core@2.9.0_@opentelemetry+api@1.9_8f13b9696a5fc8688953a3b2ccd28385/node_modules/alpic/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/alpic@1.157.0_@opentelemetry+api@1.9.1_@opentelemetry+core@2.9.0_@opentelemetry+api@1.9_8f13b9696a5fc8688953a3b2ccd28385/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.157.0_@opentelemetry+api@1.9.1_@opentelemetry+core@2.9.0_@opentelemetry+api@1.9_8f13b9696a5fc8688953a3b2ccd28385/node_modules/alpic/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/alpic@1.157.0_@opentelemetry+api@1.9.1_@opentelemetry+core@2.9.0_@opentelemetry+api@1.9_8f13b9696a5fc8688953a3b2ccd28385/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/node_modules"
14
+ else
15
+ export NODE_PATH="/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/node_modules"
14
+ else
15
+ export NODE_PATH="/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@6.0.3/node_modules/typescript/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/typescript@6.0.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@6.0.3/node_modules/typescript/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/typescript@6.0.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@6.0.3/node_modules/typescript/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/typescript@6.0.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@6.0.3/node_modules/typescript/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/typescript@6.0.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.23.1/node_modules/tsx/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/tsx@4.23.1/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.23.1/node_modules/tsx/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/tsx@4.23.1/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@8.1.5_@types+node@24.13.3_esbuild@0.28.1_jiti@2.7.0_terser@5.44.1_tsx@4.23.1_yaml@2.9.0/node_modules/vite/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/vite@8.1.5_@types+node@24.13.3_esbuild@0.28.1_jiti@2.7.0_terser@5.44.1_tsx@4.23.1_yaml@2.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/vite@8.1.5_@types+node@24.13.3_esbuild@0.28.1_jiti@2.7.0_terser@5.44.1_tsx@4.23.1_yaml@2.9.0/node_modules/vite/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/vite@8.1.5_@types+node@24.13.3_esbuild@0.28.1_jiti@2.7.0_terser@5.44.1_tsx@4.23.1_yaml@2.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/../vite/bin/vite.js" "$@"
19
+ else
20
+ exec node "$basedir/../vite/bin/vite.js" "$@"
21
+ fi
@@ -0,0 +1,30 @@
1
+ {
2
+ "name": "skybridge-blank",
3
+ "version": "0.0.1",
4
+ "private": true,
5
+ "description": "Blank Skybridge MCP server template",
6
+ "type": "module",
7
+ "scripts": {
8
+ "dev": "skybridge dev",
9
+ "dev:tunnel": "skybridge dev --tunnel",
10
+ "build": "skybridge build",
11
+ "start": "skybridge start",
12
+ "deploy": "alpic deploy"
13
+ },
14
+ "dependencies": {
15
+ "skybridge": "^0.0.0-dev.fb985cd",
16
+ "vite": "^8.1.5",
17
+ "zod": "^4.4.3"
18
+ },
19
+ "devDependencies": {
20
+ "@skybridge/devtools": "^0.0.0-dev.fb985cd",
21
+ "@skybridge/vite-plugin": "^0.0.0-dev.fb985cd",
22
+ "@types/node": "^24.13.3",
23
+ "alpic": "^1.155.0",
24
+ "tsx": "^4.23.1",
25
+ "typescript": "^6.0.3"
26
+ },
27
+ "engines": {
28
+ "node": ">=24.18.0"
29
+ }
30
+ }
@@ -0,0 +1,4 @@
1
+ import { generateHelpers } from "skybridge/web";
2
+ import type { AppType } from "./server.js";
3
+
4
+ export const { useToolInfo, useCallTool } = generateHelpers<AppType>();
@@ -0,0 +1,3 @@
1
+ import { app } from "./server.js";
2
+
3
+ export default await app.run();
@@ -0,0 +1,12 @@
1
+ import { Skybridge } from "skybridge/server";
2
+
3
+ // Register tools with `server.registerTool(...)`.
4
+ // Docs: https://docs.skybridge.tech/api-reference/register-tool
5
+
6
+ export const app = new Skybridge({
7
+ name: "skybridge-blank",
8
+ version: "0.0.1",
9
+ handler: (server) => server,
10
+ });
11
+
12
+ export type AppType = typeof app;
@@ -0,0 +1,5 @@
1
+ {
2
+ "extends": "skybridge/tsconfig",
3
+
4
+ "include": ["src", ".skybridge/**/*.d.ts"]
5
+ }
@@ -0,0 +1,12 @@
1
+ import { skybridge } from "@skybridge/vite-plugin";
2
+ import { defineConfig } from "vite";
3
+
4
+ export default defineConfig({
5
+ plugins: [skybridge()],
6
+ server: {
7
+ forwardConsole: {
8
+ unhandledErrors: true,
9
+ logLevels: ["error"],
10
+ },
11
+ },
12
+ });
@@ -0,0 +1,4 @@
1
+ node_modules
2
+ .git
3
+ dist
4
+ .env*
@@ -0,0 +1 @@
1
+ This is a ChatGPT/MCP app built with Skybridge. ALWAYS use the `chatgpt-plugin-builder` skill when planning or updating the codebase.
@@ -0,0 +1,53 @@
1
+ # syntax=docker/dockerfile:1
2
+
3
+ # Dockerfile for a Skybridge MCP server.
4
+ #
5
+ # Detects npm, yarn, or pnpm from the lockfile in your project.
6
+ # (For bun or deno, adapt the install/build/prune commands below.)
7
+
8
+ # Build stage: install deps, compile the app, then prune dev deps.
9
+ FROM node:24.18.0-slim AS build
10
+ WORKDIR /app
11
+
12
+ COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* .npmrc* ./
13
+ RUN --mount=type=cache,target=/root/.npm \
14
+ --mount=type=cache,target=/usr/local/share/.cache/yarn \
15
+ --mount=type=cache,target=/root/.local/share/pnpm/store \
16
+ if [ -f package-lock.json ]; then \
17
+ npm ci; \
18
+ elif [ -f yarn.lock ]; then \
19
+ corepack enable yarn && yarn install --frozen-lockfile; \
20
+ elif [ -f pnpm-lock.yaml ]; then \
21
+ corepack enable pnpm && pnpm install --frozen-lockfile; \
22
+ else \
23
+ echo "No lockfile found." && exit 1; \
24
+ fi
25
+
26
+ ENV NODE_ENV=production
27
+
28
+ COPY . .
29
+ RUN if [ -f package-lock.json ]; then \
30
+ npm run build && npm prune --omit=dev; \
31
+ elif [ -f yarn.lock ]; then \
32
+ corepack enable yarn && yarn build && yarn install --frozen-lockfile --production=true; \
33
+ elif [ -f pnpm-lock.yaml ]; then \
34
+ corepack enable pnpm && pnpm build && pnpm prune --prod; \
35
+ fi
36
+
37
+ # Runtime stage: copy built artifacts and prod deps, run as non-root.
38
+ FROM node:24.18.0-slim AS runtime
39
+ WORKDIR /app
40
+ ENV NODE_ENV=production
41
+
42
+ USER node
43
+
44
+ COPY --from=build --chown=node:node /app/node_modules ./node_modules
45
+ COPY --from=build --chown=node:node /app/dist ./dist
46
+ COPY --from=build --chown=node:node /app/package.json ./package.json
47
+
48
+ EXPOSE 3000
49
+
50
+ # Run the built server directly rather than via `npm start` / `skybridge start`.
51
+ # Each wrapper adds a process layer that can swallow SIGTERM, which makes
52
+ # graceful shutdowns time out on platforms like Cloud Run, Fly, and k8s.
53
+ CMD ["node", "dist/__entry.js"]
@@ -0,0 +1,97 @@
1
+ # Skybridge Template
2
+
3
+ A starter TypeScript template for building MCP apps and ChatGPT plugins with the [Skybridge](https://docs.skybridge.tech) framework.
4
+
5
+ ## Getting Started
6
+
7
+ ### Prerequisites
8
+
9
+ - Node.js 24+
10
+
11
+ ### Local Development
12
+
13
+ #### 1. Install
14
+
15
+ ```bash
16
+ npm install
17
+ # or
18
+ pnpm install
19
+ # or
20
+ bun install
21
+ # or
22
+ deno install
23
+ # or
24
+ yarn install
25
+ ```
26
+
27
+ #### 2. Start your local server
28
+
29
+ Run the development server from the root directory:
30
+
31
+ ```bash
32
+ npm run dev
33
+ # or
34
+ pnpm dev
35
+ # or
36
+ bun dev
37
+ # or
38
+ deno task dev
39
+ # or
40
+ yarn dev
41
+ ```
42
+
43
+ This command starts:
44
+ - Your MCP server at `http://localhost:3000/mcp`.
45
+ - Skybridge DevTools UI at `http://localhost:3000`.
46
+
47
+ #### 3. Project structure
48
+
49
+ ```
50
+ ├── src/
51
+ │ ├── index.ts # Entry point (starts the app)
52
+ │ ├── server.ts # App definition (tools, views)
53
+ │ ├── views/ # React components (one per view)
54
+ │ ├── components/ # Shared UI components
55
+ │ ├── helpers.ts # Shared utilities
56
+ │ └── index.css # Global styles
57
+ ├── evals/ # Model-driven scenarios (pnpm evals, needs ANTHROPIC_API_KEY)
58
+ ├── vite.config.ts
59
+ ├── alpic.json # Deployment config
60
+ └── package.json
61
+ ```
62
+
63
+ ### Create your first view
64
+
65
+ #### 1. Add a new view
66
+
67
+ - Register a tool in `src/server.ts` with a unique name (e.g., `my-view`) using [`registerTool`](https://docs.skybridge.tech/api-reference/register-tool) and a `view` config.
68
+ - Create a matching React component at `src/views/my-view.tsx`. **The file name must match the view name exactly**.
69
+
70
+ #### 2. Edit views with Hot Module Replacement (HMR)
71
+
72
+ Edit and save components in `src/views/` — changes will appear instantly inside your App.
73
+
74
+ #### 3. Edit server code
75
+
76
+ Modify files in `src/` and refresh the tool list with your 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 `http://localhost:3000` while running the `dev` command.
81
+
82
+ To connect your app with web clients like ChatGPT or Claude, expose your server on the internet by adding the `--tunnel` flag.
83
+ By enabling the tunnel, you'll also be able to access a playground to chat with your app and a real LLM. Learn more by reading the [test guide](https://docs.skybridge.tech/quickstart/test-your-app).
84
+
85
+
86
+ ## Deploy to Production
87
+
88
+ Skybridge is infrastructure vendor agnostic, and your app can be deployed on any cloud platform supporting MCP.
89
+
90
+ The simplest way to deploy your app is by running the `deploy` command, which will push your MCP server to the [Alpic](https://alpic.ai/) cloud for free.
91
+
92
+ ## Resources
93
+ - [Skybridge Documentation](https://docs.skybridge.tech/)
94
+ - [ChatGPT Plugins Documentation](https://developers.openai.com/plugins)
95
+ - [MCP Apps Documentation](https://github.com/modelcontextprotocol/ext-apps/tree/main)
96
+ - [Model Context Protocol Documentation](https://modelcontextprotocol.io/)
97
+ - [Alpic Documentation](https://docs.alpic.ai/)
@@ -0,0 +1,7 @@
1
+ node_modules/
2
+ dist/
3
+ .env*
4
+ .DS_store
5
+ *.tsbuildinfo
6
+ .skybridge/
7
+ .vercel/
@@ -0,0 +1,3 @@
1
+ {
2
+ "$schema": "https://assets.alpic.ai/alpic.json"
3
+ }
@@ -0,0 +1,11 @@
1
+ import { anthropic } from "@ai-sdk/anthropic";
2
+ import { start } from "@skybridge/test";
3
+ import { expect, it } from "vitest";
4
+ import { app } from "../src/server.js";
5
+
6
+ it("reaches the onboarding tool from a natural prompt", async () => {
7
+ const chat = await start({ app, model: anthropic("claude-sonnet-4-5") });
8
+ await chat.send("Get me started with Skybridge, my name is Ada");
9
+
10
+ expect.chat(chat).toHaveCalledToolOnce("start");
11
+ });
@@ -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.157.0_@opentelemetry+api@1.9.1_@opentelemetry+core@2.9.0_@opentelemetry+api@1.9_8f13b9696a5fc8688953a3b2ccd28385/node_modules/alpic/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/alpic@1.157.0_@opentelemetry+api@1.9.1_@opentelemetry+core@2.9.0_@opentelemetry+api@1.9_8f13b9696a5fc8688953a3b2ccd28385/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.157.0_@opentelemetry+api@1.9.1_@opentelemetry+core@2.9.0_@opentelemetry+api@1.9_8f13b9696a5fc8688953a3b2ccd28385/node_modules/alpic/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/alpic@1.157.0_@opentelemetry+api@1.9.1_@opentelemetry+core@2.9.0_@opentelemetry+api@1.9_8f13b9696a5fc8688953a3b2ccd28385/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