Skip to content
Merged
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
71 changes: 30 additions & 41 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# OpenUI

[Docs](https://www.openui.com) · [Example App](./examples/openui-chat) · [Contributing](./CONTRIBUTING.md) · [License](./LICENSE)
[Docs](https://openui.com) · [Example App](./examples/openui-chat) · [Discord](https://discord.com/invite/Pbv5PsqUSv) · [Contributing](./CONTRIBUTING.md) · [License](./LICENSE)

Build **LLM-powered user interfaces** with OpenUI Lang, streaming rendering, and generative UI.

Expand All @@ -19,20 +19,22 @@ At the center of OpenUI is **OpenUI Lang**: a compact, streaming-first language

**Core capabilities:**

- **OpenUI Lang** - A compact language for structured UI generation that is designed for streaming output.
- **Prompt generation from your component library** - Generate model instructions directly from the components you allow.
- **Streaming renderer** - Parse and render model output progressively in React as tokens arrive.
- **Generative UI** - Turn model output into real UI components instead of plain text responses.
- **OpenUI Lang** A compact language for structured UI generation designed for streaming output.
- **Built-in component libraries** — Charts, forms, tables, layouts, and more — ready to use or extend.
- **Prompt generation from your component library** — Generate model instructions directly from the components you allow.
- **Streaming renderer** — Parse and render model output progressively in React as tokens arrive.
- **Chat and app surfaces** - Use the same foundation for assistants, copilots, and broader interactive product flows.


<!-- Product overview video placeholder -->
<!-- https://openui.com/assets/readme/overview-demo.mp4 -->

## Quick Start

```bash
npx @openuidev/cli@latest create
npx @openuidev/cli@latest create --name genui-chat-app
cd genui-chat-app
echo "OPENAI_API_KEY=sk-your-key-here" > .env
npm run dev
```

Expand Down Expand Up @@ -65,54 +67,41 @@ This creates a direct path from model output to UI without relying on brittle te
<!-- Architecture diagram placeholder -->
<!-- ![OpenUI Architecture](./docs/static/readme/architecture.png) -->

## Why OpenUI Lang

OpenUI Lang is designed for model-generated UI that needs to be both structured and streamable.

It is built for:
## Packages

- **Streaming output** - Emit UI incrementally as tokens arrive.
- **Token efficiency** - Use a compact representation instead of verbose JSON payloads.
- **Controlled rendering** - Restrict output to the components you define and register.
- **Typed component contracts** - Define component props and structure up front.
| Package | Description |
| :--- | :--- |
| [`@openuidev/react-lang`](./packages/react-lang) | Core runtime — component definitions, parser, renderer, prompt generation |
| [`@openuidev/react-headless`](./packages/react-headless) | Headless chat state, streaming adapters, message format converters |
| [`@openuidev/react-ui`](./packages/react-ui) | Prebuilt chat layouts and two built-in component libraries |
| [`@openuidev/cli`](./packages/openui-cli) | CLI for scaffolding apps and generating system prompts |

## Built for real product surfaces

OpenUI is intended for more than demo chat windows.

Use it to build:
```bash
npm install @openuidev/react-lang @openuidev/react-ui
```

- structured AI interfaces
- assistants that render forms, charts, tables, and actions
- embedded copilots inside existing products
- full-page AI workflows
- custom applications backed by your own model APIs
## Why OpenUI Lang

## Chat is one application layer
OpenUI Lang is designed for model-generated UI that needs to be both structured and streamable.

OpenUI also includes ready-made chat surfaces and integration patterns, but chat is only one way to use the platform.
- **Streaming output** — Emit UI incrementally as tokens arrive.
- **Token efficiency** — Up to 67% fewer tokens than equivalent JSON.
- **Controlled rendering** — Restrict output to the components you define and register.
- **Typed component contracts** — Define component props and structure up front with Zod schemas.

If you want a complete starting point with backend wiring, streaming, and a built-in UI, use:
## Built for real product surfaces

```bash
npx @openuidev/cli@latest create
```
OpenUI is intended for more than demo chat windows. Use it to build:

From there, you can keep the built-in experience or move toward more custom OpenUI Lang-driven interfaces.
- Assistants that render forms, charts, tables, and actions
- Embedded copilots inside existing products
- Full-page AI workflows
- Custom applications backed by your own model APIs

## Documentation

Detailed documentation is available at [openui.com](https://openui.com).

The docs cover:

- OpenUI Lang quick start
- component definitions and library design
- prompt generation and customization
- renderer behavior and streaming semantics
- end-to-end app setup
- backend connection patterns and API contracts

## Explore the repo

This repository contains the OpenUI monorepo, including the implementation, example app, and documentation source.
Expand Down
2 changes: 1 addition & 1 deletion docs/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ yarn-error.log*
# others
.env*.local
.vercel
next-env.d.ts
next-env.d.ts
4 changes: 2 additions & 2 deletions docs/app/(home)/components/BuildChatSection.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"use client";

import { useEffect, useRef, useState } from "react";
import Image from "next/image";
import dashboardImg from "@/public/images/home/d67b5e94653944c1d0d4998c6b169c37f98060ad.png";
import Image from "next/image";
import { useEffect, useRef, useState } from "react";
import { CopyIcon } from "./shared";

// ---------------------------------------------------------------------------
Expand Down
9 changes: 7 additions & 2 deletions docs/app/(home)/components/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ const SOCIAL_LINKS: SocialLink[] = [
href: "https://discord.com/invite/Pbv5PsqUSv",
viewBox: "0 0 21.9611 17",
path: svgPaths.p3885cd00,

},
{
label: "YouTube",
Expand Down Expand Up @@ -76,7 +75,13 @@ function SocialIcon({ link }: { link: SocialLink }) {
);

return (
<a href={link.href} target="_blank" rel="noopener noreferrer" className="size-6 relative" aria-label={link.label}>
<a
href={link.href}
target="_blank"
rel="noopener noreferrer"
className="size-6 relative"
aria-label={link.label}
>
{link.wrapperClass ? (
<div className={`absolute ${link.wrapperClass}`}>{svgContent}</div>
) : (
Expand Down
2 changes: 1 addition & 1 deletion docs/app/(home)/components/StepsSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const STEPS: Step[] = [
number: 2,
title: "OpenUI generates system prompt",
description:
"Generate a system prompt from your library with OpenUI SDK and send it to the LLM.",
"Generate a system prompt from your library with the OpenUI CLI or library.prompt() and send it to the LLM.",
details: [],
},
{
Expand Down
Loading