jutsu-ink
Skill pack for building Ink terminal UIs with React components, hooks, and Flexbox layouts.
- CCM score
- 50 of 100
- GitHub stars
- 201
Own this plugin? Claim it
What it does
- Adds 3 skills:
ink-component-patterns,ink-hooks-state, andink-layout-stylingfor React-based CLI apps - Covers Box, Text, Newline, and Spacer components, plus lists, progress indicators, and collapsible sections
- Includes useInput, useApp, useStdout, and useFocus hooks, with async state and keyboard input handling
- Provides Flexbox layout guidance for spacing, borders, grids, and responsive terminal layouts in TypeScript
Add marketplace
/plugin marketplace add TheBushidoCollective/hanRun it inside Claude Code once, then install the plugin below.
Install
/plugin install jutsu-ink@hanRun it inside Claude Code after adding the marketplace.
Files
Discovered from sourceInk Component Patterns
You are an expert in building terminal UIs with Ink, React for the terminal.
Core Principles
- Use functional components with TypeScript for type safety
- Leverage Ink's built-in components (Box, Text, Newline, Spacer)
- Keep components focused and composable
- Use proper prop types and interfaces
- Handle terminal resizing gracefully
Component Structure
Basic Component
import { Box, Text } from 'ink';
import React from 'react';
interface MyComponentProps {
title: string;
items: string[];
}
export const MyComponent: React.FC<MyComponentProps> = ({ title, items }) => {
return (
<Box flexDirection="column">
<Text bold color="cyan">
{title}
</Text>
{items.map((item, index) => (
<Box key={index} marginLeft={2}>
<Text>• {item}</Text>
</Box>
))}
</Box>
);
};
Layout Patterns
Vertical Stack
<Box flexDirection="column">
<Text>First item</Text>
<Text>Second item</Text>
</Box>
Horizontal Row
<Box>
<Text>Left</Text>
<Spacer />
<Text>Right</Text>
</Box>
Centered Content
<Box justifyContent="center" alignItems="center" height={10}>
<Text>Centered content</Text>
</Box>
Padded Container
<Box padding={1} borderStyle="round" borderColor="cyan">
<Text>Content with border and padding</Text>
</Box>
Common Patterns
List with Icons
interface ListItem {
icon: string;
label: string;
value: string;
}
const List: React.FC<{ items: ListItem[] }> = ({ items }) => (
<Box flexDirection="column">
{items.map((item, i) => (
<Box key={i}>
<Text color="yellow">{item.icon} </Text>
<Text bold>{item.label}: </Text>
<Text>{item.value}</Text>
</Box>
))}
</Box>
);
Status Messages
const StatusMessage: React.FC<{ type: 'success' | 'error' | 'warning'; message: string }> = ({
type,
message,
}) => {
const config = {
success: { icon: '✅', color: 'green' },
error: { icon: '❌', color: 'red' },
warning: { icon: '⚠️', color: 'yellow' },
};
const { icon, color } = config[type];
return (
<Box>
<Text color={color}>
{icon} {message}
</Text>
</Box>
);
};
Progress Indicator
const ProgressIndicator: React.FC<{ current: number; total: number; label: string }> = ({
current,
total,
label,
}) => (
<Box>
<Text color="blue">
{label}: {current}/{total}
</Text>
</Box>
);
Collapsible Section
const CollapsibleSection: React.FC<{ title: string; isOpen: boolean; children: React.ReactNode }> = ({
title,
isOpen,
children,
}) => (
<Box flexDirection="column">
<Text bold>
{isOpen ? '▼' : '▶'} {title}
</Text>
{isOpen && <Box marginLeft={2}>{children}</Box>}
</Box>
);
Best Practices
- Type Safety: Always define prop interfaces
- Performance: Use React.memo for expensive renders
- Accessibility: Use semantic structure and clear labels
- Error Boundaries: Wrap components in error boundaries
- Testing: Test components with ink-testing-library
Anti-Patterns to Avoid
- Don't use DOM-specific APIs (document, window)
- Don't use CSS classes or inline styles (use Ink props)
- Don't mutate terminal state directly
- Don't forget to handle edge cases (empty arrays, null values)
- Don't create deeply nested component trees (keep it flat)
Readme
Ink
Advanced Ink skills for building beautiful, interactive terminal UIs with React.
Overview
Ink is React for the terminal - it lets you build interactive command-line apps using React components. This plugin provides comprehensive skills for creating production-quality terminal interfaces.
Skills Included
ink-component-patterns
Master component architecture and common patterns for terminal UIs:
- Functional components with TypeScript
- Built-in components (Box, Text, Newline, Spacer)
- Layout patterns (vertical stack, horizontal row, centered content)
- Common UI patterns (lists, status messages, progress indicators)
- Collapsible sections and interactive components
- Best practices and anti-patterns
ink-hooks-state
Advanced state management and React hooks for Ink applications:
- Core hooks (useState, useEffect, useRef)
- Ink-specific hooks (useInput, useApp, useStdout, useFocus)
- Custom hooks for common patterns
- Async state management
- Promise-based flow control
- Keyboard input handling
- Terminal dimension detection
ink-layout-styling
Create beautiful layouts with Flexbox and styling:
- Flexbox-based layout with Box component
- Spacing (margin, padding, directional spacing)
- Alignment and justification
- Dimensions (width, height, min/max constraints)
- Borders and border styles
- Text styling (colors, formatting, wrapping)
- Layout patterns (cards, split layouts, headers/footers, grids)
- Responsive layouts
- Utility components
Use Cases
- CLI Tools: Build interactive command-line applications
- Developer Tools: Create rich terminal interfaces for development workflows
- Build Systems: Display build progress and status
- Package Managers: Show installation progress and package information
- Testing Frameworks: Display test results with beautiful formatting
- Monitoring Tools: Real-time dashboards in the terminal
Example: Simple Status Display
import { Box, Text } from 'ink';
import React, { useState, useEffect } from 'react';
interface StatusProps {
onComplete: () => void;
}
const Status: React.FC<StatusProps> = ({ onComplete }) => {
const [phase, setPhase] = useState<'loading' | 'complete'>('loading');
useEffect(() => {
setTimeout(() => {
setPhase('complete');
onComplete();
}, 2000);
}, [onComplete]);
return (
<Box flexDirection="column" padding={1}>
<Box marginBottom={1}>
<Text bold color="cyan">
🚀 My CLI App
</Text>
</Box>
{phase === 'loading' && (
<Text color="yellow">⏳ Loading...</Text>
)}
{phase === 'complete' && (
<Box flexDirection="column">
<Text color="green">✅ Complete!</Text>
<Box marginTop={1}>
<Text color="blue">💡 Next steps here</Text>
</Box>
</Box>
)}
</Box>
);
};
Integration with TypeScript
All skills emphasize TypeScript best practices:
- Proper prop type definitions
- Interface-based component APIs
- Type-safe event handlers
- Generic hooks for reusable logic
Resources
Real-World Examples
This plugin's patterns are used in production tools like:
npx create-next-app- Next.js project scaffoldingnpm- Package manager outputgatsby- Build progress and development server@anthropic-ai/claude-agent-sdk- Claude agent development
Installation
Install via the han CLI:
han plugin install ink
Details
- Marketplace
- TheBushidoCollective/han
- Source
- plugins/frameworks/ink
- Category
- Framework
- Keywords
- ink, terminal, cli, react, ui, skill
- Listed since
- Apr 7, 2026
More from TheBushidoCollective/han
All 340Similar to jutsu-ink
More CLI & TerminalinkPluginTheBushidoCollective/han201 starsAdvanced Ink skills for building beautiful terminal UIs with React components, hooks, and Flexbox layouts.
jutsu-reactPluginTheBushidoCollective/han201 starsAdvanced React skills for hooks, context, and performance optimization.
terminal-uiSkillpproenca/dot-skills873 installsPractical TUI performance and UX rules for TypeScript CLIs built with Ink and Clack, covering rendering, input, and prompts.
textual-tuiPluginaperepel/textual-tui-skill37 starsComprehensive skill for Claude Code to build professional terminal user interfaces with Textual. Includes 40+ widgets, layouts, styling, reactive programming, a
frontend-skillsPluginoikon48/cc-frontend-skills71 starsDistinctive frontend design skills and agents for professional UI implementation