Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/content/docs/api-reference/react-ui.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ import {
Generate the system prompt at build time with the CLI:

```bash
npx @openuidev/cli generate ./src/library.ts --out src/generated/system-prompt.txt
npx @openuidev/cli@latest generate ./src/library.ts --out src/generated/system-prompt.txt
```

```tsx
Expand Down
2 changes: 1 addition & 1 deletion docs/content/docs/chat/from-scratch.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ If you want Generative UI, generate a system prompt from the component library.
If you only want plain text chat, you can skip this step and omit `componentLibrary` in the next examples.

```bash
npx @openuidev/cli generate ./src/library.ts --out src/generated/system-prompt.txt
npx @openuidev/cli@latest generate ./src/library.ts --out src/generated/system-prompt.txt
```

Where `src/library.ts` exports your library:
Expand Down
4 changes: 2 additions & 2 deletions docs/content/docs/chat/genui.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ If either side is missing, the model falls back to plain text or emits component
Generate the system prompt with the CLI:

```bash
npx @openuidev/cli generate ./src/library.ts --out src/generated/system-prompt.txt
npx @openuidev/cli@latest generate ./src/library.ts --out src/generated/system-prompt.txt
```

The CLI auto-detects exported `PromptOptions` alongside your library, so examples and rules are included automatically. See [System Prompts](/docs/openui-lang/system-prompts) for details.
Expand Down Expand Up @@ -82,7 +82,7 @@ If you need domain-specific components, keep the same request flow and swap in y
First, generate the system prompt from your custom library:

```bash
npx @openuidev/cli generate ./src/lib/my-library.ts --out src/generated/system-prompt.txt
npx @openuidev/cli@latest generate ./src/lib/my-library.ts --out src/generated/system-prompt.txt
```

Then wire up the frontend — it only needs the component library for rendering:
Expand Down
2 changes: 1 addition & 1 deletion docs/content/docs/chat/nextjs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ This page focuses on one specific backend pattern:
Generate the system prompt at build time:

```bash
npx @openuidev/cli generate ./src/library.ts --out src/generated/system-prompt.txt
npx @openuidev/cli@latest generate ./src/library.ts --out src/generated/system-prompt.txt
```

Create `app/api/chat/route.ts`:
Expand Down
2 changes: 1 addition & 1 deletion docs/content/docs/openui-lang/standard-library.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import { openuiLibrary } from "@openuidev/react-ui";
Use the CLI to generate the system prompt at build time:

```bash
npx @openuidev/cli generate ./src/library.ts --out src/generated/system-prompt.txt
npx @openuidev/cli@latest generate ./src/library.ts --out src/generated/system-prompt.txt
```

Or generate programmatically:
Expand Down
6 changes: 3 additions & 3 deletions docs/content/docs/openui-lang/system-prompts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@ description: Generate and customize prompt instructions from your OpenUI library
The fastest way to generate a system prompt — works with any backend language:

```bash
npx @openuidev/cli generate ./src/library.ts
npx @openuidev/cli@latest generate ./src/library.ts
```

Write to a file:

```bash
npx @openuidev/cli generate ./src/library.ts --out system-prompt.txt
npx @openuidev/cli@latest generate ./src/library.ts --out system-prompt.txt
```

Generate JSON Schema instead:

```bash
npx @openuidev/cli generate ./src/library.ts --json-schema
npx @openuidev/cli@latest generate ./src/library.ts --json-schema
```

The CLI auto-detects exported `PromptOptions` (examples, rules) alongside your library. Use `--prompt-options <name>` to pick a specific export.
Expand Down
2 changes: 1 addition & 1 deletion docs/imports/OpenUiGeneratesSchema.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function Group() {
</svg>
</div>
<p className="absolute font-['Andale_Mono:Regular',sans-serif] h-[262px] leading-none left-[73px] not-italic text-[10px] text-white top-[71px] w-[254px] whitespace-pre-wrap">{`# generate system prompt from library
npx @openuidev/cli generate ./src/library.ts
npx @openuidev/cli@latest generate ./src/library.ts

# use in your backend
const completion = await client.chat.completions.create({
Expand Down
2 changes: 1 addition & 1 deletion examples/openui-react-native/backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"dev": "next dev",
"build": "next build",
"start": "next start",
"generate:prompt": "npx @openuidev/cli generate ./src/library.ts --out ./src/system-prompt.txt"
"generate:prompt": "npx @openuidev/cli@latest generate ./src/library.ts --out ./src/system-prompt.txt"
},
"dependencies": {
"next": "^15.2.3",
Expand Down
10 changes: 5 additions & 5 deletions packages/openui-cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ It currently supports two workflows:
Run the CLI with your package manager of choice:

```bash
npx @openuidev/cli --help
pnpm dlx @openuidev/cli --help
bunx @openuidev/cli --help
npx @openuidev/cli@latest --help
pnpm dlx @openuidev/cli@latest --help
bunx @openuidev/cli@latest --help
```

## Quick Start
Expand All @@ -31,13 +31,13 @@ npx @openuidev/cli@latest create
Generate a prompt from a library file:

```bash
npx @openuidev/cli generate ./src/library.ts
npx @openuidev/cli@latest generate ./src/library.ts
```

Generate JSON Schema instead:

```bash
npx @openuidev/cli generate ./src/library.ts --json-schema
npx @openuidev/cli@latest generate ./src/library.ts --json-schema
```

## Commands
Expand Down
Loading