docs: improve OpenTUI skill guidance (#1461)

Document compact layouts and companion packages.

---------

Co-authored-by: Simon Klee <hello@simonklee.dk>
This commit is contained in:
Sebastian
2026-08-28 12:38:20 +02:00
committed by GitHub
parent df2fc1594b
commit 202e1e6a00
+37 -1
View File
@@ -10,6 +10,14 @@ 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
- `/docs` maps to `docs/getting-started.mdx`.
@@ -17,6 +25,33 @@ Inside the OpenTUI repository, this skill root is `packages/web/src/content/`. T
- Every other `/docs/<slug>` URL maps to `docs/<slug>.mdx` relative to this skill root.
- From the repository root, prepend `packages/web/src/content/` to each source path.
## 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`](docs/core-concepts/renderer.mdx): use imperative renderables and events with `createCliRenderer()`.
- [`@opentui/react`](docs/bindings/react.mdx): use React components, JSX, and hooks with `createRoot()`.
- [`@opentui/solid`](docs/bindings/solid.mdx): use Solid components, JSX, and signals with `render()`.
- [`@opentui/keymap`](docs/keymap/overview.mdx): centralize keyboard bindings and named commands across views.
The package supports focus-scoped layers, configurable shortcuts, and multi-key sequences.
Start with `createDefaultOpenTuiKeymap()` from `@opentui/keymap/opentui`.
Use `@opentui/keymap/react` or `@opentui/keymap/solid` for providers and hooks.
[Direct keyboard events](docs/core-concepts/keyboard.mdx) or component-local bindings are enough for simple local input.
- [`@opentui/ssh`](docs/reference/ssh.mdx): serve a terminal UI to standard SSH clients without a local app installation.
Import `createServer()` 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`](docs/reference/qr-encoder.mdx): encode QR matrices, terminal text, or SVG, or display a
`QRCodeRenderable`. For JSX, use `registerQRCode()` from `@opentui/qrcode/react` or `@opentui/qrcode/solid`. See the
[QR code component](docs/components/qr-code.mdx).
- [`@opentui/three`](docs/reference/three.mdx): render Three.js WebGPU scenes in the terminal with `ThreeRenderable`.
This integration supports only Bun. Before you choose it, check its runtime and dependency requirements.
See [Package entry points](docs/reference/package-entrypoints.mdx) for the full list of public imports.
The list includes testing, addons, host adapters, and runtime-module maps.
Use the [API and symbol index](docs/reference/api-index.mdx) 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`
@@ -110,4 +145,5 @@ details, start at `docs/plugins/slots.mdx`, then open the Core, React, or Solid
- Read an entry page first, then read the narrower canonical page for the task.
- Read the sibling `docs/**/*.mdx` files directly. Do not copy their prose into this file.
- Use canonical `/docs` URLs when you cross-reference documentation.
- Use canonical `/docs` URLs for references between documentation pages.
For links in this file, use the corresponding relative `docs/**/*.mdx` paths.