Files
Rohit Ghumare 0210556634 feat(tui): migrate to OpenTUI with monochromatic design (#11)
* feat(tui): migrate to OpenTUI with monochromatic design

## Summary
- Migrate TUI from Ink to OpenTUI framework (requires Bun >=1.2.0)
- Implement monochromatic B&W design with colored accents
- Add Help screen accessible via `/` key
- Fix terminal cleanup on exit (no more escape code garbage)
- Clean up code: remove unnecessary comments, simplify components
- Add 9 unit tests for TUI state, theme, and utilities

## Breaking Changes
- TUI now requires Bun runtime (>=1.2.0) for OpenTUI
- Help moved from `?` (requires Shift) to `/` key

## Changes
- **index.tsx**: Clean exit handler with ANSI terminal restore
- **App.tsx**: Simplified screen routing with switch statement
- **Help.tsx**: New help screen with keyboard shortcuts reference
- **Home.tsx**: Extract FEATURES constant, simplified agent width logic
- **Sidebar.tsx**: Removed unused onNavigate prop usage
- **state/types.ts**: Consolidated type definitions, added help screen
- **README.md**: Updated with Bun requirement and new architecture

## Test Coverage
- 757 tests passing (664 core + 80 agents + 9 tui + 1 cli + 3 app)

## Code Quality
- Removed all JSDoc comments describing obvious code
- Extracted reusable ShortcutSection component
- Replaced nested ternaries with clearer if/else
- Moved static data outside components to prevent recreation

* fix: address CodeRabbit review issues

- AgentGrid: prevent infinite loop when columns <= 0
- Splash: clamp progress width to prevent negative repeat
- StatsCard: reset animation state when items change
- Help: clamp contentWidth to minimum 1
- Browse: add useKeyboard handler for navigation and search
- Installed: add useKeyboard handler for toggle functionality
- Marketplace: add useKeyboard handler and clamp contentWidth
- Recommend: fix spinner interval, add keyboard handler
- Settings: add keyboard handler, fix SETTINGS -> settings state
- Sync: add keyboard handler and sync flow implementation
- Workflow: add keyboard handler and clamp contentWidth
- skills.ts: add path validation to prevent directory traversal

* fix: address additional CodeRabbit review issues

Splash.tsx:
- Change generateParticles from useMemo to useCallback for fresh random rows

Browse.tsx:
- Clamp maxLen to avoid negative slicing
- Add Enter/Return handler to open selected repo

Installed.tsx:
- Wire up 'd' key to toggle handler
- Update shortcuts label from "delete" to "disable"

Marketplace.tsx:
- Add handleInstall callback for Enter key
- Add 'b' key handler to navigate to browse

Recommend.tsx:
- Add handleInstall callback for Enter key

Settings.tsx:
- Update shortcuts label from "enter edit" to "enter toggle"

Sync.tsx:
- Add useRef for timeout cleanup on unmount
- Clamp selectedIndex when agents list shrinks

Workflow.tsx:
- Remove unimplemented shortcuts from display string

* fix: address performance and stale closure issues

Splash.tsx:
- Cache getVersion() with useMemo to avoid repeated sync file I/O

Installed.tsx:
- Wrap keyboard handler in useCallback to prevent stale closures

Settings.tsx:
- Wrap keyboard handler in useCallback with proper dependencies

Workflow.tsx:
- Remove "Press 'n' to create one" text since 'n' key isn't implemented
2026-01-26 12:35:30 +00:00
..

@skillkit/tui

npm version License

Interactive terminal UI for SkillKit - browse, install, translate, and manage skills visually in your terminal.

Requirements

  • Bun runtime (>=1.2.0) - Required for OpenTUI rendering
  • Terminal with 80x24 minimum (120x40 recommended)

Install Bun: https://bun.sh

Installation

npm install -g skillkit

Quick Start

# Launch TUI with Bun
bun skillkit ui

# Or via pnpm in monorepo
pnpm ui

Features

  • Monochromatic Design - Clean B&W theme with colored accents
  • Animated UI - Smooth entrance animations and transitions
  • Browse Skills - Explore skill repositories with search and filtering
  • Smart Recommendations - AI-powered skill suggestions with match scores
  • Cross-Agent Translation - Convert skills between 17+ agent formats
  • Team Collaboration - Share and sync skills across teams
  • Responsive Design - Adapts to any terminal size

Keyboard Shortcuts

Navigation

Key Screen
h Home
b Browse skills
m Marketplace
r Recommendations
i Installed skills
s Sync settings

Actions

Key Screen
t Translate skills
w Workflows
x Execute
n Plan
y History

Team & Config

Key Screen
a Team
c Context
e Memory
p Plugins
o Methodology
, Settings

Global

Key Action
/ Help screen
esc Go back / Home
q Quit
j/k Navigate lists
enter Select item

Screens Overview

  • Home - Dashboard with stats, detected agents, and features
  • Browse - Search and explore skill repositories
  • Marketplace - Curated skill marketplace with popularity metrics
  • Recommend - AI-powered suggestions based on your project
  • Installed - Manage installed skills (enable/disable/remove)
  • Sync - Sync skills across multiple agents
  • Translate - Convert skills between agent formats
  • Workflow - Manage and execute automation workflows
  • Execute - Run skills with checkpoints
  • Plan - Structured plan creation and execution
  • Team - Share skills and bundles with team members
  • Context - View detected stack and project context
  • Memory - Session memory and learnings
  • Plugins - Plugin management
  • Methodology - Development methodology frameworks
  • Settings - Configure SkillKit preferences

Programmatic Usage

import { startTUI } from '@skillkit/tui';

await startTUI();

Architecture

Built with:

  • OpenTUI - High-performance terminal UI framework
  • React - Component architecture
  • @skillkit/core - Core functionality
src/
├── index.tsx         # Entry point and startTUI
├── App.tsx           # Main app component
├── screens/          # Screen components
│   ├── Home.tsx
│   ├── Browse.tsx
│   ├── Help.tsx
│   └── ...
├── components/       # Reusable UI components
│   ├── Sidebar.tsx
│   ├── Splash.tsx
│   └── ...
├── state/            # State types and navigation
├── theme/            # Colors and symbols
└── utils/            # Helper functions

Documentation

Full documentation: https://github.com/rohitg00/skillkit

License

Apache-2.0