Skip to content

Releases: Arindam200/termui

v1.5.0 — Accessibility Hooks, AI Components & MCP Server

11 Apr 08:58

Choose a tag to compare

What's New

Accessibility Hooks

  • useFocusTrap — trap Tab/Shift+Tab focus within overlays. Wire into any Modal, Drawer, or Dialog via focusableIds prop
  • useKeyboardNavigation — standardized ↑↓/Home/End/PgUp/PgDn navigation for all list-style components

New AI Components

  • StreamOutput — standalone streaming display; accepts a pre-buffered text prop (animated char-by-char) or a live stream: AsyncIterable<string> from any LLM SDK
  • ConversationHistory — scrollable wrapper for ChatMessage history with ↑↓ keyboard navigation and bottom-anchored default
  • ErrorRetry — error state with keyboard retry/dismiss, retry counter, and maxRetries guard

Overlay Accessibility

  • Modal and Drawer now accept focusableIds?: string[] — focus is automatically trapped within the overlay when open

MCP Server

  • npx termui mcp — stdio MCP server exposing 5 tools to Claude Code, Claude Desktop, Cursor, and Copilot:
    • list_components, add_component, get_component_docs, search_components, get_theme_tokens
  • npx termui add mcp — interactive installer (local .mcp.json, global Claude Code, or global Claude Desktop)

Docs

  • New docs/accessibility.md — full reference for focus management, ARIA annotations, reduced motion, and keyboard conventions

Stats

  • 1,332 tests passing across 5 packages
  • 11 AI components total
  • 14 core hooks total

v1.4.3

03 Apr 14:50

Choose a tag to compare

Windows Compatibility Fixes

This release resolves several CLI compatibility issues on Windows.

Fixes

  • Build script: Replaced chmod +x with a cross-platform fs.chmodSync call so pnpm build no longer fails on Windows
  • Process termination: Replaced c.kill('SIGTERM') with c.kill() which uses TerminateProcess on Windows instead of an unsupported POSIX signal
  • SIGTERM listener: Guarded process.on('SIGTERM') behind a process.platform !== 'win32' check in dev and preview commands
  • Raw mode: Wrapped all setRawMode(true) calls in try/catch across clack.ts, ui.ts, dev.ts, and preview.ts so prompts gracefully fall back to defaults on Windows terminals that report isTTY=true but do not support raw mode (e.g. MinTTY, Git Bash)
  • Shell completion: Added PowerShell completion script support via termui completion powershell

v1.4.2

31 Mar 09:45

Choose a tag to compare

Bug Fixes

Fixed 404 npm install errors caused by internal package references being exposed in user-facing files.

The packages @termui/core, @termui/components, and @termui/adapters are internal monorepo workspace packages and are not published to npm. Only the root termui package is published. Previous versions incorrectly referenced these internal packages in templates, registry components, examples, and documentation, causing npm install to fail with a 404 error.

What changed

  • CLI scaffolder (termui create): generated package.json no longer lists @termui/core as a dependency
  • Templates (all 5): removed @termui/* deps, all imports now use termui and termui/* subpaths
  • Registry components (95+ files): from '@termui/core' replaced with from 'termui'
  • Examples (10 packages): fixed package.json deps and source imports
  • Docs and README: all code examples and install commands updated to use the correct public package name
  • JSDoc comments: fixed misleading import examples in core, adapters, and testing packages

Upgrade

npm install termui@latest

No API changes. This is a pure fix release.

v1.4.0

27 Mar 21:40

Choose a tag to compare

What's Changed

CLI Improvements

  • termui/args integration (createCLI) -- the CLI now uses createCLI from termui/args for command routing, --help, and unknown-command handling; dogfooding the product instead of hand-rolled switch logic
  • Raw-mode TTY prompt utilities -- new packages/cli/src/utils/clack.ts with text, confirm, select, multiselect, spinner, tasks, group, log backed by raw-mode keyboard input
  • Prettier formatting on add -- installed components are automatically formatted with the project's Prettier config when Prettier is present; dry-run mode now shows an 8-line source preview

termui/clack Adapter

  • Raw-mode TTY support -- text, confirm, select, and multiselect now use raw-mode keyboard input (arrow keys, single-key confirm) with graceful readline fallback for non-TTY environments
  • NO_COLOR / FORCE_COLOR / CLICOLOR respect -- all ANSI output checks environment flags before emitting color codes
  • select and multiselect added to the adapter public API

Components

  • ChatMessage -- new stream, streamText, streamSpeed, onStreamComplete, inline, prefix, showSeparator, and maxLines props; uses StreamingText for live streaming and animation
  • Pagination -- current prop is now optional (uncontrolled mode)

Themes

  • highContrastTheme -- WCAG 2.1 AA contrast ratios annotated and enforced; adjusted error, info, muted, and mutedForeground colors
  • highContrastLightTheme -- new light variant for terminals with a white background

Infrastructure

  • .github/workflows/validate-registry.yml -- CI workflow that validates registry manifests on every push and pull request

Full Changelog: https://github.com/Arindam200/termui/blob/main/CHANGELOG.md

v1.3.0 — Adapter Ecosystem, Registry Expansion & New CLI Commands

26 Mar 06:21

Choose a tag to compare

What's New in v1.3.0

8 New Library Adapters

Drop-in wrappers that route popular CLI libraries through the TermUI theme engine:

Adapter Wraps
termui/chalk chalk
termui/commander commander
termui/inquirer @inquirer/prompts
termui/meow meow
termui/ora ora
termui/imperative imperative prompt API
termui/svelte Svelte actions & stores
termui/vue Vue composables & plugin

3 New Components

  • MultiProgress — stacked progress bars with per-item labels and dynamic add/remove
  • NotificationBadge — inline unread-count badge with dot variant
  • NotificationCenter — scrollable notification overlay with mark-as-read and dismiss

2 New CLI Commands

  • npx termui docs <component> — fetch and render component docs inline
  • npx termui publish — validate and submit a component to the community registry

13 New Registry Components

chat-message · chat-thread · diff-view · file-change · model-selector · multi-progress · notification-center · streaming-text · thinking-block · token-usage · tool-approval · tool-call

New @termui/types Package

Centralised TypeScript types for themes, components, hooks, registry manifests, and adapter contracts.

7 New Examples

with-chalk · with-commander · with-inquirer · with-meow · with-ora · with-github · with-keychain · ai-demo

Infrastructure

  • Changeset tooling for automated version management
  • GitHub Actions release workflow on version tag push
  • CONTRIBUTING_COMPONENTS.md and GOVERNANCE.md
  • Comprehensive test suite added across all packages

Full changelog: CHANGELOG.md

v1.2.0 - Phase 6: AI CLI Builder

24 Mar 20:36

Choose a tag to compare

Phase 6: AI CLI Builder

TermUI v1.2.0 adds first-class primitives for building AI-powered terminal applications. Three new package exports, 13 new components and hooks, and a conversation persistence utility.

New exports

Export Contents
termui/components/ai All AI UI components
termui/ai useChat, useCompletion hooks
termui/conversation-store createConversationStore

Tier 1 - Core Primitives

StreamingText
Renders LLM token streams token-by-token. Accepts a controlled text prop, an AsyncIterable<string> via stream, a blinking cursor, and a animate/speed typing mode for pre-buffered responses.

<StreamingText stream={tokenStream} cursor="▌" onComplete={(full) => save(full)} />

Markdown streaming mode
New streaming and cursor props on the existing component. Partial code fences are closed gracefully so the component never crashes mid-stream.

<Markdown streaming cursor="▌">{partialMarkdownFromLLM}</Markdown>

DiffView
Unified, split, and inline diff views with an internal LCS algorithm (no added dependency). Supports context lines, showLineNumbers, coloured +/- lines, and @@ hunk headers.

<DiffView oldText={original} newText={modified} filename="src/index.ts" mode="unified" showLineNumbers />

Tier 2 - Chat UI Components

ChatThread + ChatMessage — Role-based message styling, animated ... typing indicator, collapsible system messages, autoScroll.

ToolCall — Status icons for pending/running/success/error, live elapsed timer, collapsible args and result.

ThinkingBlock — Collapsible chain-of-thought with token count and streaming indicator.

ToolApproval — Risk-level border colour (green/yellow/red), y/n/a keybindings, countdown auto-deny.


Tier 3 - AI Integration Layer

useChat + useCompletion — Provider-agnostic streaming hooks. Supports Anthropic, OpenAI, Ollama, and a custom fetchFn. tokenUsage is populated from each provider's native usage events.

import { useChat } from 'termui/ai';

const { messages, sendMessage, isStreaming, tokenUsage } = useChat({
  provider: 'anthropic',
  model: 'claude-sonnet-4-6',
  apiKey: process.env.ANTHROPIC_API_KEY,
});

TokenUsage + ContextMeter — Compact cost display with warn/critical colour thresholds.

ModelSelector — Provider grouping, context window size display, built on Select.

FileChange — File list with M/A/D icons, keyboard navigation, and inline DiffView per file.


Tier 4 - Ecosystem

createConversationStore — JSONL/JSON persistence with save/load/list/delete/search. Auto-titles from the first user message.

import { createConversationStore } from 'termui/conversation-store';

const store = createConversationStore({ dir: '~/.myapp/conversations', format: 'jsonl' });
await store.save(id, messages);

Bug Fixes

  • useChat history: replaced the setMessages functional-updater capture pattern with a messagesRef updated synchronously; correct message list is sent on every turn including the first
  • tokenUsage never populated: wired setTokenUsage into all three provider streams via native usage events
  • DiffView inline mode was identical to unified; implemented a proper InlineView
  • DTS build TS2307 for optional peer SDKs: dynamic imports now use a variable specifier so tsc skips static module resolution
  • tsconfig.json missing path entries for new subpaths fixed

v1.1.8 - termui create command

24 Mar 17:56

Choose a tag to compare

What's new

termui create command

Scaffold a new TermUI project in seconds with an interactive setup wizard:

```bash
npx termui create my-app
```

Choose from 4 starter templates:

  • Minimal - Hello World with Text + Spinner
  • CLI - Multi-command CLI with add/remove/list
  • Dashboard - Tabs + Table + ProgressBar layout
  • Wizard - Multi-step prompt flow with clack

Other changes

  • Refactored adapter modules (args, clack, completion, conf)
  • Updated init, add, update, diff, and list commands
  • Added MIT License
  • Improved registry client
  • Added .tmp/ and _tmp*/ to .gitignore

Full changelog

  • feat(cli): add termui create command with 4 starter templates
  • Add MIT License to the project
  • perf: bundle size optimisations and refactoring (v1.1.7)

v1.1.7 — Bundle size optimisations & refactoring

24 Mar 07:44

Choose a tag to compare

What's Changed

Performance

  • Tree-shaking — added "sideEffects": false to all four packages; bundlers can now safely drop unused modules
  • Component category sub-exports — 12 new granular entry points (termui/components/layout, /typography, /input, etc.) for importing only what you need
  • BigText font encoding — replaced verbose nested arrays with packed 3-bit row integers; font data is ~60% smaller before gzip

Build

  • tsconfig.build.json — new production tsconfig eliminating ~232 unnecessary .d.ts.map files from published dist
  • Adapter sourcemaps removed — corrected packages/adapters/tsup.config.ts to match the rest of the build
  • "files" field added to packages/core, packages/components, and packages/cli — npm now only publishes dist/ and README.md

Refactoring

  • QRCode encoder extracted to utility/qrEncoder.ts — ~420 lines of pure GF(256)/Reed-Solomon/matrix logic separated from the React component; GF lookup tables are now lazy-initialised
  • Shared chart utilitiesnormalize, clamp, padEnd, padStart extracted to charts/utils.ts; used by LineChart, Sparkline, Gauge, and BarChart
  • Shared time formattersformatElapsed and formatTime extracted to utility/formatters.ts; used by Stopwatch and Timer

Installation

npm install termui
# or
npx termui init

Full changelog: https://github.com/Arindam200/termui/blob/main/CHANGELOG.md

v1.1.6 — Enhanced package.json & CLI creator

24 Mar 07:45

Choose a tag to compare

What's Changed

Added

  • CLI project creation skill and component reference

Changed

  • Enhanced package.json with improved metadata and exports

v1.1.5 — Package improvements

24 Mar 07:45

Choose a tag to compare

What's Changed

Changed

  • Package.json improvements and dependency updates