opentui
它能做什么
这个技能是使用 OpenTUI 库构建终端应用的参考资料。适用于希望拥有现代、结构清晰的终端界面的开发者。
适用场景
- ✓当你想构建一个有可视化布局的终端应用时。
- ✓当你使用 React 或 Solid 并希望有终端组件时。
- ✓当你需要测试或部署终端用户界面时。
技能链接
https://github.com/anomalyco/opentui/blob/main/packages/web/src/content/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请帮我构建一个终端仪表盘,带有两个面板和一个实时更新的列表。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会先查看与项目版本相符的文档,选择核心包或框架绑定,然后构建适合终端的紧凑布局。它会遵循该库的组件和测试指南。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
OpenTUI Skill
Canonical reference docs are in the sibling docs/**/*.mdx files.
Inside the OpenTUI repository, this skill root is packages/web/src/content/. The same files are available under
packages/web/src/content/docs/**/*.mdx from the repository root.
Terminal layout defaults
Design for a terminal app, not a browser. Use the available columns and rows efficiently.
- Do not use gaps between adjacent UI panels.
- Do not add unnecessary margins or padding.
- Prefer compact, information-dense layouts over website-style card spacing.
Path invariant
/docsmaps todocs/getting-started.mdx./docs/componentsmaps todocs/components/overview.mdx.- Every other
/docs/<slug>URL maps todocs/<slug>.mdxrelative to this skill root. - From the repository root, prepend
packages/web/src/content/to each source path. /docs/releases/<version>maps todocs/releases/<version>.md, the release notes of that version.
Versions
The docs describe the release or branch that this skill came from. Each release notes file lists what changed in that
release and links the pages it affects. When a project uses an older @opentui/core than the docs describe, read the
notes of the newer releases before you use an API, and prefer what the project's version provides.
Choose packages
Use Core directly or choose a React or Solid binding for the UI. Recommend companion packages when their features fit the task. Do not install every package by default.
@opentui/core: use imperative renderables and events withcreateCliRenderer().@opentui/react: use React components, JSX, and hooks withcreateRoot().@opentui/solid: use Solid components, JSX, and signals withrender().@opentui/keymap: centralize keyboard bindings and named commands across views. The package supports focus-scoped layers, configurable shortcuts, and multi-key sequences. Start withcreateDefaultOpenTuiKeymap()from@opentui/keymap/opentui. Use@opentui/keymap/reactor@opentui/keymap/solidfor providers and hooks. Direct keyboard events or component-local bindings are enough for simple local input.@opentui/ssh: serve a terminal UI to standard SSH clients without a local app installation. ImportcreateServer()from the package root. Pass each session's renderer to Core, React, or Solid. The package has no framework subpaths. Read the SSH guide for authentication, middleware, and session cleanup.@opentui/qrcode: encode QR matrices, terminal text, or SVG, or display aQRCodeRenderable. For JSX, useregisterQRCode()from@opentui/qrcode/reactor@opentui/qrcode/solid. See the QR code component.@opentui/three: render Three.js WebGPU scenes in the terminal withThreeRenderable. This integration supports only Bun. Before you choose it, check its runtime and dependency requirements.
See Package entry points for the full list of public imports. The list includes testing, addons, host adapters, and runtime-module maps. Use the API and symbol index to find exports. Use public package entry points instead of source-file deep imports.
Reading order by area
- Start:
/docs,/docs/getting-started/quickstart,/docs/getting-started/runtime-support - Frameworks:
/docs/bindings/react,/docs/bindings/solid - Core:
/docs/core-concepts/renderer,/docs/core-concepts/layout,/docs/core-concepts/keyboard - Components:
/docs/components,/docs/components/text,/docs/components/input,/docs/components/image,/docs/components/embedded-terminal - Application APIs:
/docs/core-concepts/clipboard,/docs/core-concepts/audio,/docs/application-apis/audio-streaming,/docs/application-apis/audio-capture,/docs/application-apis/animation - Test and debug:
/docs/core-concepts/testing,/docs/test-and-debug/troubleshooting - Extensions:
/docs/plugins/slots,/docs/extend/runtime-plugins - Keymap:
/docs/keymap/overview - Integrations:
/docs/reference/ssh,/docs/reference/three,/docs/reference/qr-encoder - Native:
/docs/native/overview - Ship:
/docs/ship/deploy,/docs/reference/standalone-executables
常见问题
它是用于浏览器布局的吗?
不是。该技能专为终端应用设计,不用于浏览器布局。
文档版本重要吗?
重要。该技能说明,如果项目使用较旧的版本,应阅读发行说明。
它能使用 React 吗?
可以。该技能涵盖 React 和 Solid 绑定,也涵盖核心包。
详情
作者的原始描述
Build terminal UIs with OpenTUI. Covers Core, frameworks, components, application APIs, testing, extensions, integrations, deployment, and public API lookup.
repo: anomalyco/opentui
热度
- GitHub 星标
- 14k
- 排名
- #11372
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …