Build beautiful terminal UIs with Vue — a Rust rendering engine (native cell buffer, truecolor, unicode, taffy flexbox, images) driven from Bun via FFI, with a Vue 3 custom renderer and a component library on top.
Runtime: Bun (the engine loads a native library through
bun:ffi).
| Package | What it is |
|---|---|
@vui-rs/core |
Native terminal rendering engine (Rust cdylib + FFI bindings). |
@vui-rs/vue |
Vue 3 custom renderer — elements, layout, input, overlays, rich text, animation, theming. |
@vui-rs/ui |
App-level components — dialogs, command palette, toasts, autocomplete, status bars, virtual list. |
@vui-rs/vite-plugin |
Compile .vue SFCs for the custom renderer in Vite builds. |
@vui-rs/rolldown |
Compile .vue SFCs for the custom renderer in rolldown/tsdown builds. |
bun add @vui-rs/vueAuthor components either with the h render function (no build step) or as .vue Single File Components (needs the SFC compiler plugin — see below).
import { createApp, h, ref } from "@vui-rs/vue";
const App = {
setup() {
const n = ref(0);
return () => h("box", { border: "rounded", padding: 1 }, h("text", {}, `count: ${n.value}`));
},
};
createApp(App).mount();Prefer <template> + <script setup>? Write the same app as an SFC:
<!-- App.vue -->
<template>
<box border="rounded" :padding="1">
<text>count: {{ n }}</text>
</box>
</template>
<script setup lang="ts">
import { ref } from "@vui-rs/vue";
const n = ref(0);
</script>// main.ts
import { createApp } from "@vui-rs/vue";
import App from "./App.vue";
createApp(App).mount();SFCs need a build step to compile .vue files for the custom renderer: add @vui-rs/vite-plugin (plugins: [vuiVitePlugin()]) for Vite, or @vui-rs/rolldown for rolldown/tsdown builds. See examples/ — every demo is SFC-based.
See examples/ for runnable demos (bun run dev:gallery, dev:dialogs, dev:virtual-list, …) and docs/ for the API reference.
bun install # also installs vp git hooks (vp config)
bun run build:native # build the Rust engine for your platform
bun run test # cargo + bun test suites + ABI probe
bun run lint # oxlint (via vite-plus / vp)
bun run fmt # oxfmt — single quotes, no semicolons, 120 cols
bun run build # cached package builds (vp run)Versioning is managed with Changesets; publishing runs on CI via bun publish (resolves workspace:/catalog: protocols). Add a changeset with bun run changeset. See .github/workflows/release.yml.
MIT © evann (open-ai-sdk)