feat(cli): select a backend framework at scaffold time - #964
Open
AbhinRustagi wants to merge 1 commit into
Open
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
AbhinRustagi
force-pushed
the
be-framework-select
branch
from
August 13, 2026 11:52
cbc3eb0 to
c0368f8
Compare
3 tasks
AbhinRustagi
force-pushed
the
be-framework-select
branch
from
August 13, 2026 11:57
c0368f8 to
d4b5e4d
Compare
AbhinRustagi
force-pushed
the
be-framework-select
branch
from
August 13, 2026 12:21
d4b5e4d to
b86c11d
Compare
2 tasks
AbhinRustagi
force-pushed
the
be-framework-select
branch
from
August 14, 2026 06:17
b86c11d to
f8cfcec
Compare
AbhinRustagi
force-pushed
the
be-framework-select
branch
from
August 14, 2026 10:25
09a3a42 to
a1f41f5
Compare
Add a `--backend-framework` flag and matching interactive prompt to `openui create`, plus the machinery that applies a framework overlay on top of a base template. - `BackendFramework` type and `normalizeBackendFramework()` accept `default`, `langgraph` and `vercel-ai-sdk` (with `none`/`no-framework`, `lang-graph`, `vercel`/`ai-sdk` aliases) and reject anything else. - `resolveBackendOverlay()` reads `backends/<framework>/manifest.json` from the template; `applyBackendOverlay()` copies the overlay files over the scaffolded project and honours `removeFiles`. - `rewritePackageJson()` merges the manifest's `dependencies`, `devDependencies` and `scripts`, and applies `removeDependencies`. - `backends/` is excluded from the base template copy so only the selected overlay lands in the generated project. - Framework scaffolds cannot reuse the shipped lockfiles, so those are dropped and the install switches to `npm install` / `pnpm install --no-frozen-lockfile`. - The dev server no longer starts when the required API key (`THESYS_API_KEY` or `OPENAI_API_KEY`) is missing; the CLI prints the remaining steps and exits non-zero instead. - Telemetry gains a `backend_framework_selected` funnel step recording whether the value came from a flag, a prompt, or the default. `default` keeps the existing behaviour. Selecting a framework before its overlay ships fails with a clear `template_missing` error. Squashed from 14 commits by Visharad Kashyap: dcbc7d3 feat(cli): scaffold selected backend framework 63d4869 fix(cli): keep cloud transport for framework tools ef5a812 feat(cli): add backend diagnostic tool c2b54e8 fix(cli): restore weather tool and AI SDK name be3a53e fix(cli): block dev start without api key 534e108 fix(cli): use native framework streams 9dc595c fix(cli): use packaged Vercel AI SDK adapter a4b47c6 Add OSS framework tool loops ddd5961 chore(cli): update template package versions 6daa3d3 feat(cli): use native cloud framework streams a075d0c feat(cli): scaffold deployable cloud framework backends c5f55d0 fix(cli): use published langchain package ead198c fix(cli): track latest langchain release c157f92 refactor(cli): compose backend template overlays Co-Authored-By: Visharad Kashyap <154831195+vishxrad@users.noreply.github.com>
AbhinRustagi
force-pushed
the
be-framework-select
branch
from
August 14, 2026 11:17
a1f41f5 to
027d4a1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
openui createcan now scaffold a LangGraph or Vercel AI SDK backend instead of the template's default SDK route.Changes
--backend-frameworkflag and prompt —default,langgraph,vercel-ai-sdk.defaultbehaves exactly as before.backends/<framework>/inside a template. Its files are copied over the scaffold, andmanifest.jsondescribes everything else.packageJson(dependencies, devDependencies, scripts, removeDependencies),files.remove, andgettingStarted.--immediateno longer starts the dev server when the template's API key is missing; it prints the remaining steps and exits non-zero.No overlays ship here — those land later in the stack. Until then, picking a framework fails with a clear "overlay not found" error, so this is safe to merge on its own.
Test Plan
tsc,prettierandeslintclean. Built the CLI and scaffolded:--template openui-self-hostedwith no flag — unchanged, still usesnpm ci--backend-framework langgraph— fails withBackend overlay "langgraph" not found--backend-framework nope— rejected, lists the valid valuesChecklist