opentui README

The project's README from github.com/anomalyco/opentui. As one markdown file: README.md.

OpenTUI logo

npm version Core build status

OpenTUI is a library to build terminal user interfaces.

OpenCode uses OpenTUI in production for millions of users.

Website | Documentation | Packages

Packages

Private packages

AI agent skill

Install the OpenTUI documentation as a skill for your AI coding assistant with npx skills:

npx skills add anomalyco/opentui --skill opentui

Add -g to install the skill globally.

Development

Development requires Bun 1.4.1 or later and Zig 0.16.0.

See AGENTS.md for engineering, tooling, and verification conventions.

bun install

Run package scripts from their package directory. Run bun run build from the repository root after you change native code or cross-package build outputs. Ordinary TypeScript changes do not require a root build.

Run repository tests and static checks from the repository root:

bun run test
bun run fmt:check
bun run lint

To link the source packages into a Bun-managed project, install that project's dependencies, then run ./scripts/link-opentui-dev.sh /path/to/project from the repository root. Add --react or --solid when needed.

Contributing

OpenTUI is open for contributions.

License

OpenTUI is licensed under the MIT License.

opentui (anomalyco/opentui)

Searching Database…

13.6K ·GitHub
这是什么?OpenTUI 是一个用来构建终端用户界面的库——也就是在终端里运行的交互式文本界面应用,用 TypeScript 编写。
那我是用它自己写应用——直接写纯 TypeScript,还是用框架?它是一个库,不是做好的成品应用。你可以直接用 TypeScript 面向核心来写,也可以用它自带的 React 和 Solid 渲染器来开发。
我怎么用它开始开发 TUI?先从 npm 安装 @opentui/core;如果想要框架渲染器,再加上 @opentui/react 或 @opentui/solid。keymap、qrcode、three 和 ssh 这几个包是可选的附加组件。
核心是用 Zig 写的——我需要学 Zig 才能用吗?不需要。Zig 只用于底层的原生核心,应用代码是 TypeScript;只有在参与贡献、构建原生部分时才会接触 Zig。
它是经过生产环境验证的,还是仍处于试验阶段?它经过了实战检验:OpenCode 在生产环境中使用 OpenTUI,服务数百万用户。
我的 TUI 可以不本地运行,而是通过 SSH 提供给用户使用吗?可以——@opentui/ssh 包提供了 SSH 服务器集成,OpenTUI 应用可以通过 SSH 连接开放给用户使用。
AI 编程助手能学会 OpenTUI 的 API 吗?可以——文档以可安装的 agent skill 形式提供:运行 npx skills 即可添加,加 -g 则进行全局安装。
keymap 包只能用于 OpenTUI 应用吗?不是——@opentui/keymap 是一个独立的按键绑定和命令路由库,终端应用和浏览器应用都能使用。
What are similar projects?ink, hqtui, canvas-ui, editor, tokscale, react-bits, shaders, hntui
Creator
anomalyco
Size
82 MB
Stars
13.6K
Age
1y
Commits · 90 Days