The Open Standard for Generative UI
feat(cli): drop self-hosted backend choice from interactive create (#999)
devin-ai-integration[bot]9961e19a0ae5
diff --git a/packages/openui-cli/README.md b/packages/openui-cli/README.mdindex 2dc57f3f7..2ac1e9aac 100644--- a/packages/openui-cli/README.md+++ b/packages/openui-cli/README.md@@ -80,7 +80,7 @@ Options:What it does:- prompts for the project name, defaulting to `openui-agent`, if you do not pass `--name`-- prompts for the template if you do not pass `--template`+- uses the `openui-cloud` template when you do not pass `--template` (interactive runs no longer ask; `--template openui-self-hosted` still works)- copies the bundled template into a new directory- rewrites monorepo-local dependencies (`workspace:`, `file:`, `catalog:`) in the generated `package.json` to `latest`- installs dependencies automatically using the detected package manager (unless `--no-install`)@@ -92,7 +92,7 @@ What it does:#### Choose a backend- **OpenUI Cloud (recommended default)** — start here for prototypes and evaluations. You get hosted models, managed conversation history and streaming, built-in tools, and ready-to-use report and presentation artifacts without operating the model, storage, or artifact infrastructure.-- **Self-hosted** — choose this when owning the OpenAI-compatible provider integration, AI route, and persistence is a requirement.+- **Self-hosted** — choose this when owning the OpenAI-compatible provider integration, AI route, and persistence is a requirement. It is not offered as an interactive choice; request it with `--template openui-self-hosted`.#### Template-specific `.env`diff --git a/packages/openui-cli/src/commands/create-app.ts b/packages/openui-cli/src/commands/create-app.tsindex 848fa1f87..66f10c093 100644--- a/packages/openui-cli/src/commands/create-app.ts+++ b/packages/openui-cli/src/commands/create-app.ts@@ -140,32 +140,17 @@ export async function runCreateApp(options: CreateAppOptions): Promise<void> {interactive,);- const args = await resolveArgs(- {- template: options.template- ? { value: options.template }- : {- prompt: {- type: "select",- message: "Choose your agent backend",- choices: [- {- value: "openui-cloud",- name: "OpenUI Cloud — free hosted models or bring your own key, managed history, tools & artifacts; fastest setup (recommended)",- },- {- value: "openui-self-hosted",- name: "Self-hosted — bring your own provider and self-manage the entire backend",- },- ],- },- required: true,- },- },- interactive,- );-- const { template } = args as { template: TemplateName };+ // Interactive runs always scaffold the Cloud backend; openui-self-hosted stays+ // available, but only when requested explicitly with --template.+ if (!options.template && !interactive) {+ throw new CreateError(+ "args_resolution",+ "Missing required argument --template",+ "invalid_input",+ "MISSING_REQUIRED_ARG",+ );+ }+ const template: TemplateName = options.template ?? "openui-cloud";const aiSetup = aiSetupFromTemplate(template);telemetry.register({ template, ai_setup: aiSetup });telemetry.capture("cli_ai_setup_selected", {diff --git a/packages/openui-cli/src/index.ts b/packages/openui-cli/src/index.tsindex 17a09fcd1..70a4a3a6c 100644--- a/packages/openui-cli/src/index.ts+++ b/packages/openui-cli/src/index.ts@@ -74,7 +74,8 @@ Templates:OpenAI/Anthropic/Google key (BYOK) on any plan,including the free tier.openui-self-hosted Choose when owning the OpenAI-compatible provider, AI route,- and persistence is a requirement.+ and persistence is a requirement. Available only via+ --template; interactive runs default to openui-cloud.`,).action(