Reference

Packages

The runtime exports of each Tooee package and the guide that explains them.

Tooee publishes 19 packages to npm under @tooee/*: the CLI and 18 libraries. All of them release together with the same version number. The repository holds two more packages that are private.

PackageForMain runtime exportsGuide
@tooee/askAsk: text input as a launcher, a component, a panel, or a dialoglaunch, Ask, AskPanel, useAskDialogAsk
@tooee/chooseChoose: a fuzzy-filtered picker as a launcher, a component, a panel, or a dialoglaunch, Choose, ChoosePanel, useChooseDialogChoose
@tooee/cliThe tooee binarynoneCLI reference
@tooee/clipboardRead and write the system clipboard and the primary selectioncopyToClipboard, readClipboardTextREADME
@tooee/commandsCommands, hotkeys, modes, and command surfacesuseCommand, useMode, CommandSurfaceProviderCommands and modes, Command surfaces
@tooee/configLoad and write the config filesloadConfig, ConfigProvider, useConfigConfiguration
@tooee/diffUnified and split diff renderingDiffView, buildDiffModel, isDiffPatchView: diffs
@tooee/e2ePrivate. End-to-end tests and their fixture appsnoneTesting
@tooee/fuzzyFuzzy string matching and rankingfuzzyMatch, rankBySearch and fuzzy filtering
@tooee/layoutApp chrome: title bar, status bar, overlay panelAppLayout, TitleBar, StatusBarLayout and chrome
@tooee/marksRow marks and decorationsMarkSet, MarkPriorities, MarkSetBuilderMarks and decorations
@tooee/overlaysThe overlay stackuseOverlay, useCurrentOverlay, useOverlayDialogOverlays, dialogs, and toasts
@tooee/panelsPanel groups that share the keyboardPanelGroup, Panel, usePanelsPanels
@tooee/renderersMarkdown, code, table, and chooser renderers, and the row document elementMarkdownView, CodeView, Table, parseAutoView: content formats, View: custom renderers
@tooee/routerA stack router for screenscreateRouter, createRoute, RouterProvider, useNavigateRouting
@tooee/searchSearch state, search bindings, and the search baruseSearch, SearchBar, findMatchingLinesSearch and fuzzy filtering
@tooee/shellThe provider stack, sessions, documents, and built-in commandsTooeeProvider, launchCli, Document, useDocumentControllerYour first Tooee app, Documents
@tooee/test-supportPrivate. Test helpers for the Tooee repositorytestRender, press, clipboardStubTesting
@tooee/themesBundled themes and theme stateThemeProvider, useTheme, loadThemesThemes
@tooee/toastsToast notificationsToastProvider, useToastOverlays, dialogs, and toasts
@tooee/viewView: content as a launcher or a componentlaunch, View, createFileProviderView

The sections below list the runtime exports of each package, from packages/<name>/src/index.ts and the subpaths in its package.json. Each section ends with one line that names the exported types.

@tooee/ask

GroupRuntime exports
Launcherlaunch
ComponentsAsk, AskOverlay, AskPanel, AskEditor
HooksuseAskEditor, useAskDialog
HintsbuildAskHints
Vim editing helpersappendAtCursor, handleEditBufferVimMotion, openLineAtCursor

Types: AskProps, AskOverlayProps, AskPanelProps, AskPanelInset, AskPanelInsetValue, AskEditorProps, AskEditorCommandGroup, AskEditorController, AskEditorViewModel, AskSubmitKey, UseAskEditorOptions, UseAskEditorResult, AskDialogHandle, AskDialogOptions, AskLaunchOptions, AskOptions, EditableInsertTarget, VimMotionState.

@tooee/choose

GroupRuntime exports
Launcherlaunch
ComponentsChoose, ChooseOverlay, ChoosePanel, ChooseFilter, ChooseList, ChooseHighlightedText
HooksuseChoose, useChooseDialog
ProviderscreateStdinChooseProvider, createStaticProvider, loadChooseSource
Filtering and hintsfuzzyFilter, buildChooseHints

ChooseFilter, ChooseList, ChooseHighlightedText, useChoose, loadChooseSource, and fuzzyFilter are re-exports from @tooee/renderers.

Types: ChooseProps, ChooseOverlayProps, ChoosePanelProps, ChoosePanelInset, ChoosePanelInsetValue, ChooseFilterProps, ChooseItemRenderContext, ChooseListProps, ChooseHighlightedTextProps, ChooseCommandGroup, ChooseController, ChooseState, ChooseViewModel, UseChooseOptions, UseChooseResult, ChooseDialogHandle, ChooseDialogItems, ChooseDialogOptions, ChooseDialogOptionsBase, ChooseDialogToItem, ChooseLaunchOptions, FuzzyMatch, ChooseItem, ChooseContentProvider, ChooseSource, ChooseResult, ChooseOptions.

@tooee/cli

@tooee/cli installs the tooee binary. It has no library exports. The CLI reference lists its commands, flags, and exit codes.

@tooee/clipboard

ExportSignatureBehaviour
copyToClipboard(text: string) => Promise<boolean>Writes the system clipboard. Uses wl-copy on Wayland, then xclip or xsel on Linux, osascript on macOS, and PowerShell on Windows. Resolves false when no tool is found or the tool exits with an error.
copyToPrimary(text: string) => Promise<void>Writes the primary selection on Linux with wl-copy --primary, xclip, or xsel. Writes the system clipboard on other platforms, or when no primary tool is found.
readClipboardText() => Promise<string | undefined>Reads the clipboard as text.
readClipboard() => Promise<ClipboardContent | undefined>Reads an image from the clipboard first, then text. The result has data and mime; text comes back as text/plain.
readPrimaryText() => Promise<string | undefined>Reads the primary selection on Linux. Reads the clipboard on macOS and Windows.

The y copy command and the paste commands in @tooee/shell call these functions. Call them yourself from a command handler that copies or pastes text of its own. Documents covers the built-in copy.

Types: ClipboardContent.

@tooee/commands

GroupRuntime exports
Register commandsuseCommand, useCommandGroup, useActions
ModesuseMode, useSetMode
ProvidersCommandProvider, CommandSurfaceProvider, ScreenScopeProvider, useHasCommandProvider
Command contextuseProvideCommandContext, useProvideCommandContextKey, useBuildCommandContext, useSurfaceInvoke
Surfaces and stateuseActiveCommandSurface, useCommandSurfaceId, useSurfaceCommands, useEffectiveCommands, useCommandRegistry, useCommandSequenceState, useCommandStore, useScreenScope
Store selectorsROOT_SURFACE_ID, selectActiveModalSurface, selectActivePanelSurface, selectKeyboardOwnerSurface, selectSequence, selectSurfaceCommands
Hotkey parsingparseHotkey, matchStep, formatStepKey
React helpersuseLatest, useLazyRef

The @tooee/commands/store subpath holds the low-level store: createCommandStore, createBaseStore, selectGroups, selectSurfaceCommandMap, ModeProvider, SequenceTracker, and DEFAULT_SEQUENCE_TIMEOUT_MS.

Types: ActiveCommandSurface, Command, CommandContext, CommandCommands, CommandContextBase, CommandGroup, CommandHandler, CommandSequenceCandidate, CommandSequenceState, CommandSurfaceEntry, CommandSurfaceRole, CommandWhen, ParsedHotkey, ParsedStep, RegisteredCommandGroup, Mode, ScreenScopeState, CommandStoreContext, SurfaceRecord, CommandStore, CommandStoreConfig, CommandProviderProps, CommandSurfaceProviderProps, EffectiveCommands, UseCommandOptions, ActionDefinition. The store subpath adds ModeProviderProps, SequenceFeedResult, SequencePendingMatch, SequenceTrackerOptions, CommandStoreInstance, ContextGetter, CreateCommandStoreOptions, KeyDispatchResult.

@tooee/config

GroupRuntime exports
FilesloadConfig, writeGlobalConfig
ReactConfigProvider, useConfig, useThemeConfig, useKeymapConfig

Types: ColorMode, TooeeConfig.

@tooee/diff

GroupRuntime exports
ModelbuildDiffModel, diffRowAdapter, scanPatchSections, countHunkDiffStats, isDiffPatch
ComponentsDiffView, DiffRowView, effectiveLayout, MIN_SPLIT_WIDTH
Markdown fencesdiffCodeBlockRenderer, parseDiffFenceOptions, DIFF_CODE_BLOCK_RENDERERS
ThemesresolveHunkDiffTheme, isLightBackground, HUNK_THEME_MAP

Types: DiffModel, DiffRow, DiffRowKind, DiffViewProps, DiffRowViewProps, DiffRenderOptions, DiffFenceOptions, HunkThemePair, HunkDiffFile, HunkDiffLayout, HunkDiffStats, HunkDiffThemeName.

@tooee/e2e

Private: package.json sets private: true, and npm has no copy. The package has no exports. It holds the tuistory end-to-end tests and the fixture apps under cli/, panels/, router/, shell/, and view/. Testing shows the pattern.

@tooee/fuzzy

GroupRuntime exports
MatchingfuzzyMatch, fuzzyMatchPositions
RankingrankBy

Types: FuzzyMatch.

@tooee/layout

GroupRuntime exports
ChromeAppLayout, TitleBar, StatusBar, CloseButton
Bar fittingfitStatusBar, fitTitleBar, truncateCells, StatusPriority, STATUS_BAR_GAP, STATUS_BAR_HIDDEN_MARKER
Overlay contentOverlayPanel, decodeReactContent

Types: AppLayoutProps, AppLayoutScroll, OverlayPanelProps, PanelInset, PanelInsetValue, DecodedReactContent, StatusBarItem, StatusBarProps, StatusBarAlign, StatusBarTruncate, StatusBarLayout, PlacedStatusItem, FitStatusBarOptions, TitleBarText, TruncateMode.

@tooee/marks

GroupRuntime exports
Mark setsMarkSet, MarkSetBuilder
PrioritiesMarkPriorities
Mark statecreateMarkState, updateMarkState

Types: MarkPosition, MarkRange, MarkStyle, Mark, MarkPriority, RowDecoration, MarkState.

@tooee/overlays

GroupRuntime exports
HooksuseOverlay, useOverlayState, useCurrentOverlay, useHasOverlay, useHasModalOverlay, useOverlayDialog
Payload updatesoverlayValue, overlayUpdater
ContextsOverlayControllerContext, OverlayStateContext
StorecreateOverlayStore, selectHasOverlay, selectIsOpen, selectStack, selectStackIds, selectTop

OverlayProvider, which mounts the stack, is in @tooee/shell.

Types: OverlayId, OverlayCloseReason, OverlayOpenOptions, OverlayRole, OverlayRenderArgs, OverlayRenderer, OverlayHandle, OverlayController, OverlayState, OverlayUpdate, OverlayDialogHandle, OverlayDialogSettle, OverlayRecord, OverlayStore, OverlayStoreContext.

@tooee/panels

GroupRuntime exports
ComponentsPanelGroup, Panel
HooksusePanels, usePanelState, usePanelActive

Types: PanelGroupProps, PanelProps, PanelSwitchKeys, PanelState, PanelsControls, PanelGroupContextValue, PanelContextValue.

@tooee/renderers

GroupRuntime exports
MarkdownMarkdownView, flattenMarkdown, getFlatBlockText, getPlainText, parseObsidianImageEmbed, resolveMarkdownImageSource, splitMarkdownImages
Code blocksCodeBlockChrome, defaultCodeBlockRenderer, mermaidCodeBlockRenderer, DEFAULT_CODE_BLOCK_RENDERERS, getFenceType
CodeCodeView
TablesTable, computeColumnWidths, formatTableCell, isNumeric, sampleRows, parseCSV, parseTSV, parseJSON, parseAuto, detectFormat
Source linessourceLines, sourceLineAdapter, SourceIndex
Row documentRowDocumentRenderable, DEFAULT_SIGN_COLUMN_WIDTH, computeRowDocumentGutterWidth, useGutterPalette
Pickers and menusCommandPalette, ContextMenu, Chooser
Chooser partsChooseFilter, ChooseList, ChooseHighlightedText, useChoose, loadChooseSource, fuzzyFilter
Chooser storecreateChooseStore, selectActiveIndex, selectError, selectFilterQuery, selectItems, selectLoading, selectMatches, selectReloadRevision, selectSelectedOriginalIndices

The @tooee/renderers/row-document subpath has no exports. Import it for its side effect: it registers the row-document JSX element with OpenTUI. Document in @tooee/shell and DiffView in @tooee/diff import it for you.

Types: MarkdownLinkHandler, FlatBlock, FlattenMarkdownOptions, MarkdownImageEmbed, MarkdownInlineSegment, DocumentRowAnchor, DocumentRowSource, SourceLineRow, SourcePoint, SourceSpan, CodeBlockRenderer, CodeBlockRendererProps, CodeBlockHScroll, TableProps, ColumnWidthOptions, ColumnDef, TableRow, CommandPaletteEntry, ChooserProps, ChooseFilterProps, ChooseHighlightedTextProps, ChooseItemRenderContext, ChooseListProps, ChooseStore, ChooseStoreContext, ChooseStoreEvents, FuzzyMatch, ChooseCommandGroup, ChooseController, ChooseState, ChooseViewModel, UseChooseOptions, UseChooseResult, ChooseContentProvider, ChooseItem, ChooseOptions, ChooseResult, ChooseSource, ContextMenuEntry, Format, ParsedTable, TableData, RowDocumentOptions, RowDocumentPalette, RowScrollAlign, VisibleRowRange, DecorationLayer, RowDecoration, DocumentBindings.

@tooee/router

GroupRuntime exports
SetupcreateRoute, createRouter, RouterProvider, Outlet
Navigation hooksuseNavigate, useParams, useRouteData, useCurrentRoute, useCanGoBack, useRouter, useActionResultHandler
Screen state and focususeScreenState, useScreenFocus, useScreenEffect, StateCache, createStateKey
CommandsuseRouterCommands
StackstackReducer

Types: Codec, RouteParams, RouteConfig, RouteDefinition, StackEntry, RouterState, RouterAction, RouterOptions, RouterInstance, SerializedNavigationIntent, ResolvedNavigation, NavigationResult, NavigationGuardResult, NavigationGuard, NavigationEvent, NavigationFailureContext, RouterProviderProps, RouteErrorProps, NavigateResult, BackResult, ActionNavigationResult, ScreenFocus, ActionResultHandler, NavigateHandle, ScreenStateHandle, StateKey.

@tooee/search

GroupRuntime exports
HooksuseSearch, useSearchBindings, useNavSearchStore
ComponentSearchBar
MatchingfindMatchingLines
Navigation and search storecreateNavSearchStore, selectCursor, selectRowKeys, selectSelectionAnchor, selectToggledKeys, selectSearchStatus, selectSearchActive, selectSearchQuery, selectMatches, selectCurrentMatchIndex, deriveSelection, resolveIndex

Types: NavSearchStore, NavSearchContext, NavSearchEvents, RowKey, UseSearchOptions, SearchState, SearchBarProps.

@tooee/shell

GroupRuntime exports
Provider and sessionsTooeeProvider, launchCli, runCliSession, mountTooee, guardTerminalHealth
DocumentsDocument, DocumentScreen, useDocumentController, useProvideDocumentCommandContext, buildInteractionDecorations, DocumentDecorationPriorities
NavigationuseNavigation, useNavigationBindings
Built-in commandsuseThemeCommands, useQuitCommand, useCopyCommand, usePasteCommands, useToggleLineNumbersCommand, useDebugConsoleCommand
CopyuseCopy, useCopyOnSelect
Overlays and menusOverlayProvider, CommandPaletteProvider, WhichKeyProvider, WhichKeyOverlay, useContextMenu, actionsToContextMenuEntries
ThemesuseThemePicker

The README covers sessions, mounts, and stdin policies.

Types: ThemeCommandsResult, UseCopyCommandOptions, UseDebugConsoleCommandOptions, UsePasteCommandsOptions, UseQuitCommandOptions, UseThemeCommandsOptions, UseToggleLineNumbersCommandOptions, UseNavigationOptions, NavigationState, UseCopyOptions, TooeeProviderProps, CliSessionController, CliSessionRender, CliStdinPolicy, CliStdoutPolicy, LaunchCliOptions, MountTooeeOptions, TerminalHealthGuardOptions, TooeeMount, TooeeProviderOptions, TooeeSessionHandle, ThemePickerState, ThemePickerEntry, ContextMenuController, DocumentProps, RowDocumentProps, DocumentScreenProps, InteractionDecorationInput, DocumentCommandContext, ProvideDocumentCommandContextOptions, DocumentBindings, DocumentContextMenuEvent, DocumentContextMenuItems, DocumentController, DocumentRevealOptions, DocumentRowAdapter, DocumentRowAnchor, DocumentRowEvent, DocumentRowSource, DocumentSearchOptions, SourcePoint, SourceSpan, UseDocumentControllerOptions.

@tooee/test-support

Private: package.json sets private: true, and npm has no copy. The Tooee repository uses it in its own tests.

GroupRuntime exports
RendertestRender
Inputpress, pressArrow, pressEnter, pressEscape, pressTab, keyEvent
Clipboard mockclipboardStub, copied, clipboardMockState
ConfigensureTestConfigHome, resetTestConfig
AssertionsexpectDefined

Types: TestSession.

@tooee/themes

GroupRuntime exports
ReactThemeProvider, ThemeSwitcherProvider, useTheme, useThemeSwitcher
LoadingloadThemes, getThemeNames, defaultTheme
ResolvingresolveTheme, buildSyntaxStyle, FALLBACKS, RESOLVED_KEYS

Types: ThemeJSON, ResolvedTheme, Theme, ThemeProviderProps, ThemeSwitcherProviderProps.

@tooee/toasts

GroupRuntime exports
ReactToastProvider, useToast, ToastContainer

Types: ToastLevel, ToastOptions, ToastEntry, ToastController.

@tooee/view

GroupRuntime exports
Launcherslaunch, launchDirectory
ComponentsView, DirectoryView, CodeBlockChrome
Content providerscreateFileProvider, createStdinProvider, createTableFileProvider, createTableStdinProvider, listDirectoryFiles
Command contextcreateViewCommandContext, useProvideViewCommandContext
Content helpersgetTextContent, isBuiltinContent, isCustomContent
LinkslocalFileLinkHandler

CodeBlockChrome is a re-export from @tooee/renderers.

Types: ViewLaunchOptions, CreateProviderOptions, DirectoryEntry, CreateViewCommandContextOptions, ProvideViewCommandContextOptions, ViewCommandContext, ContentLoaderState, ContentCommandsResult, AnyContent, Content, ContentChunk, ContentFormat, ContentProvider, ContentRenderer, ContentRendererProps, CustomContent, DiffContent, ImageContent, MarkdownContent, MarkdownLinkActivateHandler, CodeContent, TextContent, TableContent, ViewContent, ViewContentProvider, ColumnDef, TableRow, CodeBlockRenderer, CodeBlockRendererProps, CodeBlockHScroll, LinkHandler, LinkHandlerContext, LinkTarget.

Next

On this page