tuiparts.sh
The primitive and recipe ecosystem for .
Parts for terminal interfaces. Some assembly encouraged.
tuiparts.sh ships in two halves:
- Primitives — npm packages that own the difficult, unstyled behavior: state, focus, keyboard and pointer handling, overlays, collections. Every Primitive exposes independently composable public Parts (Root, Indicator, and so on) — the diagram above is not a metaphor.
- Recipes — styled component source you copy into your repo and own outright. Recipes compose Parts and own every glyph, color, and layout decision.
Package the difficult behavior. Copy the opinionated layer.
Architecture references: for the product architecture, for the primitive contract, and the to choose packaged Primitives or editable Recipes.
(Pronounced "too-ee parts." That is the only time we will bring it up.)
Foundation
The Foundation is the linked-version release line: core, react, and solid version together.
Button, Checkbox, Dialog, Input, RadioGroup, Switch, Tabs, Textarea, Toggle, and ToggleGroup expose Primitive behavior. Badge is distributed only as editable Recipe source because it has no reusable interaction behavior.
The distributes consumer-owned Core, React, and Solid Recipes with their install and update lifecycle.
and are Companion packages: independently versioned convenience products with higher-level APIs outside the Foundation release line.
Install an Adapter
Add one Adapter to an existing OpenTUI application. The React and Solid
Adapters install @tuiparts/core; your application already owns its OpenTUI
runtime and framework peers.
See the package READMEs for exact peer ranges and usage.
Install a Recipe
Recipes are installed with the official shadcn CLI and become
application-owned source. The Catalog contains Checkbox, Switch, Button,
RadioGroup/Radio, Tabs, Toggle, ToggleGroup, Input, Textarea, Dialog, and Badge
Recipes; every Recipe targets exactly one Adapter, so choose the core/*,
react/*, or solid/* item for your runtime:
Recipes are universal Registry items with explicit targets. The shadcn
Registry Directory resolves @tuiparts, so installation needs no
components.json, Tailwind configuration, or framework initialization.
Editing the copied source is not a workaround — it is the intended maintenance model. See the for the starter Catalog and the for safe update commands.
Development
The repository uses pnpm and Bun. Versions are pinned in package.json and CI.
validate:packages packs the Foundation and changed Companion packages, runs
publint and Are the Types Wrong, installs the tarballs in a clean consumer,
typechecks every exported subpath, and executes representative runtime imports.
Release Workflow
- Add changesets for publishable changes.
- Merge the generated version PR after CI passes.
- Publish with npm provenance through the release workflow.
- Validate packed packages in clean consumers before publishing.
Attribution
tuiparts.sh is an independent project built for OpenTUI. It is not affiliated with, or endorsed by, the OpenTUI project.
License
MIT