项目
在 GitHub 查看
vue-terminal/vue-termui
关于
现代终端 UI 框架
开发工具实测星标增长
- 24小时
- 0
- 7天
- -1
- 15天
- -1
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文vue-termui
Build terminal apps with Vue 3, powered by OpenTUI.
[!IMPORTANT] vue-termui renders through OpenTUI's native engine, which requires FFI. Run your app with Node ≥ 26.3 and
--experimental-ffi(add--disable-warning=ExperimentalWarningto silence the notice), or use Bun, which supports FFI natively.
Install
Scaffold a new app:
npm create vue-termui@latest
Or add it to an existing project:
pnpm add vue-termui
Usage
<!-- App.vue -->
<script setup lang="ts">
import { Box, Text, onKeyDown, useExit } from 'vue-termui'
const exit = useExit()
onKeyDown((key) => key.name === 'q' && exit())
</script>
<template>
<Box border>
<Text>Hello from the terminal! Press <Text bold>q</Text> to quit.</Text>
</Box>
</template>
// main.ts
import { createApp } from 'vue-termui'
import App from './App.vue'
const app = await createApp(App)
app.mount()
Compile .vue files with the Vite plugin:
// vite.config.ts
import { defineConfig } from 'vite'
import vueTermui from 'vue-termui/vite'
export default defineConfig({
plugins: [vueTermui()],
})
TODO
- Add focus management guidance to the
vue-termuiskill. - Add keyboard handling guidance to the
vue-termuiskill.
License
探索相关项目
加载中…