Terminal micro-apps built on OpenTUI, published under the @tooee npm org.
bun install # Install dependencies
bun run check # Type check packages and every examples/* package (TypeScript 7, local tsc)
bun test # Run tests
bun run lint # Lint with oxlintLefthook (lefthook.yml) runs lint:staged and check before each commit. After a checkout, merge, or rebase changes bun.lock or a package.json, it runs bun install in worktrees that already have node_modules. A new worktree needs one bun install first.
User-facing changes should include a Tegami release note. See docs/releasing.md for the format and release flow; do not edit package versions or tags manually.
- Runtime: Bun
- UI: OpenTUI (
@opentui/core,@opentui/react) β Zig native TUI renderer with React reconciler - Language: TypeScript 7 native compiler (strict,
noEmit,allowImportingTsExtensions). Editors need TypeScript 7 language support; the package ships notsserver. - JSX:
react-jsxwithjsxImportSource: @opentui/react
- Each app package (
view,ask,choose) exports a React component, alaunch()function, and TypeScript interfaces - Actions use
ActionDefinition[]from@tooee/commandsβ no per-app action types useCommand()registers commands;useModalNavigationCommands()provides vim-style navigation- Config: three-tier resolution (global
~/.config/tooee/, project.tooee/, overrides) - Themes: OpenCode-compatible JSON with
ui,syntax,diff,markdowncolor groups @tooee/shellis the composition layer βTooeeProviderwraps all providers,launchCli()creates renderers- Hotkey format:
ctrl+x, sequencesg g, leader keys<leader>n - Raw
useKeyboardpolicy: app-leveluseKeyboardhandlers MUST guard withuseHasOverlay()(from@tooee/overlays) or be ported touseCommand. Raw handlers subscribe before the command dispatcher (child effects run first), so modal command surfaces cannot suspend them andkey.preventDefault()does not protect them β an unguarded handler double-handles keys while an overlay is open. See the@tooee/commandsREADME. - Diff rendering:
@tooee/diffis the only package allowed to importhunkdiff(pinned exactly, pre-1.0). It owns thediffcontent format, theDiffViewrow document, and the```diff/```patchMarkdown fence renderer β see its README for the row model and known limits. - Mermaid rendering:
@tooee/renderersregisters the beautiful-mermaid ASCII renderer for```mermaidfences by default.@tooee/mermaid-peleis an opt-in image renderer (Pele SVG rasterized with resvg) that apps register throughcodeBlockRenderers. No other package may depend onpeleor@resvg/resvg-js, and@tooee/viewmust not register the Pele renderer by default. - Store conventions: stateful interaction systems use
@xstate/storeevent stores with thin React adapters β see docs/store-conventions.md for when to use a store vsuseStatevs an effect, file layout, testing, and selector discipline.
- docs/testing.md β Testing guide (component tests with testRender, e2e tests with tuistory)
- docs/store-conventions.md β Store conventions (
@xstate/storeusage, selectors, testing pattern)