Skip to content

Commit 5c51055

Browse files
authored
Highlight OpenUI Cloud benefits in CLI (#834)
1 parent 780bc97 commit 5c51055

5 files changed

Lines changed: 53 additions & 29 deletions

File tree

docs/content/docs/agent/getting-started/quickstart.mdx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@ The CLI scaffolds a complete Next.js app: a streaming chat with a sidebar, threa
77

88
## 1. Create
99

10-
Run the create command and answer the prompts. One prompt asks you to choose your AI setup:
11-
**OpenUI Cloud** is the fastest setup with free hosted models, while
12-
**OpenAI-compatible provider** uses your own key and self-hosts the AI route in the
13-
generated app.
10+
Run the create command and answer the prompts. One prompt asks you to choose your agent backend:
11+
For most prototypes and evaluations, start with **OpenUI Cloud, the recommended
12+
default**: hosted models plus managed conversation history, streaming, built-in
13+
tools, and ready-to-use reports and presentations. You can ship without operating
14+
the model, storage, or artifact infrastructure. Choose **self-hosted** when owning
15+
the OpenAI-compatible provider, AI route, and persistence is a requirement.
1416

1517
```bash tab="pnpm" tab-group="pkg"
1618
pnpx @openuidev/cli@latest create

docs/content/docs/api-reference/cli.mdx

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -53,19 +53,19 @@ openui create [options]
5353

5454
**Options**
5555

56-
| Flag | Description |
57-
| --------------------------- | ----------------------------------------------------------- |
58-
| `-n, --name <string>` | Project name (directory to create) |
59-
| `-t, --template <template>` | AI setup/template: `openui-cloud` or `openui-self-hosted` |
60-
| `--api-key <key>` | OpenUI Cloud API key; skips sign-in for the Cloud setup |
61-
| `--auth <method>` | Cloud auth method: `oauth`, `manual`, or `skip` |
62-
| `--skill` | Install the OpenUI agent skill for AI coding assistants |
63-
| `--no-skill` | Skip installing the OpenUI agent skill |
64-
| `--no-install` | Scaffold without running dependency installation |
65-
| `--no-interactive` | Fail instead of prompting for missing input |
66-
| `--agent-name <name>` | Declare the invoking coding-agent slug (default: `unknown`) |
67-
68-
When run interactively (default), the CLI prompts for any missing options. It asks you to choose your AI setup: **OpenUI Cloud** is the fastest setup with free hosted models, while **OpenAI-compatible provider** uses your own key and self-hosts the AI route in the generated app. Pass `--no-interactive` in CI or scripted environments to surface missing required flags as errors instead.
56+
| Flag | Description |
57+
| --------------------------- | ---------------------------------------------------------------- |
58+
| `-n, --name <string>` | Project name (directory to create) |
59+
| `-t, --template <template>` | AI backend: `openui-cloud` (recommended) or `openui-self-hosted` |
60+
| `--api-key <key>` | OpenUI Cloud API key; skips sign-in for the Cloud setup |
61+
| `--auth <method>` | Cloud auth method: `oauth`, `manual`, or `skip` |
62+
| `--skill` | Install the OpenUI agent skill for AI coding assistants |
63+
| `--no-skill` | Skip installing the OpenUI agent skill |
64+
| `--no-install` | Scaffold without running dependency installation |
65+
| `--no-interactive` | Fail instead of prompting for missing input |
66+
| `--agent-name <name>` | Declare the invoking coding-agent slug (default: `unknown`) |
67+
68+
When run interactively (default), the CLI prompts for any missing options. For most prototypes and evaluations, start with **OpenUI Cloud, the recommended default**: hosted models, managed conversation history and streaming, built-in tools, and ready-to-use reports and presentations without operating the model, storage, or artifact infrastructure. Choose **self-hosted** when owning the OpenAI-compatible provider, AI route, and persistence is a requirement. Pass `--no-interactive` in CI or scripted environments to surface missing required flags as errors instead.
6969

7070
**What it does**
7171

packages/openui-cli/README.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ Command-line tools for starting OpenUI projects and generating model instruction
1010
It currently supports two workflows:
1111

1212
- scaffolding a new OpenUI app from one of two templates:
13-
- **OpenUI Chat**a Next.js app where you bring your own model key (OpenAI)
14-
- **OpenUI Cloud**a Next.js app backed by OpenUI Cloud for managed conversations, artifacts, and streaming
13+
- **OpenUI Cloud (recommended)**hosted models with managed conversations, streaming, built-in tools, and ready-to-use report and presentation artifacts
14+
- **Self-hosted**bring an OpenAI-compatible model key and own the AI route and persistence
1515
- generating a system prompt or JSON Schema from a `createLibrary()` export
1616

1717
## Install
@@ -35,8 +35,8 @@ npx @openuidev/cli@latest create
3535
Skip the prompt and pick a template directly:
3636

3737
```bash
38-
npx @openuidev/cli@latest create --template openui-self-hosted
3938
npx @openuidev/cli@latest create --template openui-cloud
39+
npx @openuidev/cli@latest create --template openui-self-hosted
4040
```
4141

4242
Generate a prompt from a library file:
@@ -55,7 +55,7 @@ npx @openuidev/cli@latest generate ./src/library.ts --json-schema
5555

5656
### `openui create`
5757

58-
Scaffolds a new Next.js app from the **OpenUI Chat** or **OpenUI Cloud** template.
58+
Scaffolds a new Next.js agent app from the recommended managed **OpenUI Cloud** template or the **self-hosted** template.
5959

6060
```bash
6161
openui create [options]
@@ -64,7 +64,7 @@ openui create [options]
6464
Options:
6565

6666
- `-n, --name <string>`: Project name
67-
- `-t, --template <template>`: Template to scaffold `openui-self-hosted` or `openui-cloud`
67+
- `-t, --template <template>`: AI backend `openui-cloud` (managed) or `openui-self-hosted` (bring your provider)
6868
- `--skill`: Install the OpenUI agent skill for AI coding assistants
6969
- `--no-skill`: Skip installing the OpenUI agent skill
7070
- `--no-install`: Scaffold without running the package install
@@ -83,24 +83,29 @@ What it does:
8383
- optionally installs the OpenUI agent skill for AI coding assistants
8484
- writes a `.env` file tailored to the template (see below)
8585

86+
#### Choose a backend
87+
88+
- **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.
89+
- **Self-hosted** — choose this when owning the OpenAI-compatible provider integration, AI route, and persistence is a requirement.
90+
8691
#### Template-specific `.env`
8792

88-
- **OpenUI Chat** — prompts for your OpenAI API key and writes `OPENAI_API_KEY` to `.env` (interactive mode only). Leave blank to skip.
8993
- **OpenUI Cloud** — obtains an OpenUI Cloud API key and writes `THESYS_API_KEY` plus `DEMO_USER_ID=demo-user` to `.env`. The key is resolved by, in order:
9094
- `--api-key <key>` if provided
9195
- the `--auth` method, otherwise an interactive prompt offering:
9296
- `oauth` — sign in with Thesys in the browser and mint a key for your org
9397
- `manual` — paste an existing key
9498
- `skip` — leave `THESYS_API_KEY` empty and add it later (get one at <https://console.thesys.dev/keys>)
9599
- in non-interactive mode without `--api-key`, the cloud template fails because a key is required
100+
- **Self-hosted** — prompts for your OpenAI-compatible provider API key and writes `OPENAI_API_KEY` to `.env` (interactive mode only). Leave blank to skip.
96101

97102
Examples:
98103

99104
```bash
100105
openui create
101-
openui create --name my-app --template openui-self-hosted
102106
openui create --name my-app --template openui-cloud --auth oauth
103107
openui create --name my-app --template openui-cloud --api-key tk_your_key
108+
openui create --name my-app --template openui-self-hosted
104109
openui create --name my-app --no-skill --no-install
105110
openui create --no-interactive --name my-app --template openui-cloud --api-key tk_your_key
106111
```

packages/openui-cli/src/commands/create-app.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,15 +124,15 @@ export async function runCreateApp(options: CreateAppOptions): Promise<void> {
124124
: {
125125
prompt: {
126126
type: "select",
127-
message: "Choose your AI setup",
127+
message: "Choose your agent backend (OpenUI Cloud is recommended for most apps)",
128128
choices: [
129129
{
130130
value: "openui-cloud",
131-
name: "OpenUI Cloud — fastest setup with free hosted models (recommended)",
131+
name: "OpenUI Cloud — managed models, history, tools & artifacts (recommended)",
132132
},
133133
{
134134
value: "openui-self-hosted",
135-
name: "OpenAI-compatible provider — use your own key and self-host the AI route",
135+
name: "Self-hosted — choose when you need to own the provider, AI route & persistence",
136136
},
137137
],
138138
},

packages/openui-cli/src/index.ts

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,32 @@ program.hook("preAction", (_thisCommand, actionCommand) => {
4343

4444
program
4545
.command("create")
46-
.description("Scaffold a new Next.js app with OpenUI Cloud or your provider")
46+
.description(
47+
"Scaffold a Next.js agent app with the recommended OpenUI Cloud backend or your own provider",
48+
)
4749
.option("-n, --name <string>", "Project name")
48-
.option("-t, --template <template>", "AI setup: openui-cloud | openui-self-hosted")
50+
.option(
51+
"-t, --template <template>",
52+
"AI backend: openui-cloud (recommended default) | openui-self-hosted (infrastructure control)",
53+
)
4954
.option("--api-key <key>", "OpenUI Cloud API key (cloud template; skips sign-in)")
5055
.option("--auth <method>", "Cloud auth method: oauth | manual | skip")
5156
.option("--skill", "Install the OpenUI agent skill for AI coding assistants")
5257
.option("--no-skill", "Skip installing the OpenUI agent skill")
5358
.option("--no-interactive", "Fail with error if required args are missing")
5459
.option("--no-install", "Scaffold without running the package install")
60+
.addHelpText(
61+
"after",
62+
`
63+
Templates:
64+
openui-cloud Recommended default for prototypes and evaluations.
65+
Hosted models, managed conversation history, built-in tools,
66+
and ready-to-use reports and presentations. No model, storage,
67+
or artifact infrastructure to operate.
68+
openui-self-hosted Choose when owning the OpenAI-compatible provider, AI route,
69+
and persistence is a requirement.
70+
`,
71+
)
5572
.action(
5673
async (options: {
5774
name?: string;

0 commit comments

Comments
 (0)