ink

Build terminal user interfaces with Ink React components and flexbox layout.

Updated Feb 6, 2026
One-click install
npx skills add https://github.com/kellymears/agents --skill ink-kellymears
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: ink
Source: https://github.com/kellymears/agents/tree/main/plugins/ink/skills/ink
Command: npx skills add https://github.com/kellymears/agents --skill ink-kellymears

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Building interactive terminal UIs requires managing raw ANSI output, cursor positioning, and keyboard input by hand. This Skill provides best practices for building terminal interfaces with Ink, the React renderer for CLIs, covering layout, input handling, performance, and testing. ## Core Features & Use Cases - Component Architecture: Guides the Static/dynamic split, Box flexbox layout, Text styling, and border/spacing patterns for stable terminal rendering. - Input and Lifecycle Management: Covers useInput with isActive scoping, useApp exit control, useFocus tab navigation, and non-TTY/CI environment handling. - Performance and Testing: Explains incremental rendering, Static for frozen output, stale-closure pitfalls, and testing with ink-testing-library. - Use Case: When building a CLI that streams progress for hundreds of tasks, use this Skill to structure the UI with Static for completed items and a dynamic area for live spinners, avoiding full-screen redraws on every update. ## Quick Start Use the ink skill to scaffold a new Ink CLI project with a Box layout, keyboard input handling, and a spinner for the running task.

Frequently Asked Questions about ink

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a terminal UI with React and Ink?▼

Use Ink components where Box replaces div and Text replaces span, laid out with Yoga flexbox. Call render() with your root component, handle keys with useInput, and await instance.waitUntilExit() before post-render cleanup.

How do I prevent Ink from redrawing the whole screen on every update?▼

Move immutable output like completed tasks and log lines into the Static component, which renders once and never re-renders. Also enable incrementalRendering in render options so only changed lines are redrawn.

Why does my Ink app crash in CI or piped environments?▼

Ink crashes when calling setRawMode on non-TTY stdin. Check isRawModeSupported from useStdin before rendering interactive prompts, and fall back to plain output or default values in non-interactive mode.

Why do all my useInput handlers fire on every keypress in Ink?▼

Every useInput hook in the tree fires unless you pass the isActive option. Set isActive conditionally, such as isActive: isFocused, so only the relevant component responds to keyboard input.

How do I test Ink components without a terminal?▼

Use ink-testing-library, which provides render with lastFrame() for asserting output and stdin.write() for simulating input. For snapshot-style tests, use renderToString from ink with a fixed column width.

Does Ink support TypeScript and ESM projects?▼

Ink 6.x requires ESM and pairs with React 19. Set module and moduleResolution to NodeNext in tsconfig, use the react-jsx automatic runtime, and add .js extensions to local imports even for .tsx source files.