40,253
stars
+1+42+172
1,062
forks
124
watchers
557
prs
460
issues
82
releases
46
discussions
README
---
React for CLIs. Build and test your CLI output using components.
Ink provides the same component-based UI building experience that React offers in the browser, but for command-line apps.
It uses Yoga to build Flexbox layouts in the terminal, so most CSS-like properties are available in Ink as well.
If you are already familiar with React, you already know Ink.
Since Ink is a React renderer, all features of React are supported.
Head over to the React website for documentation on how to use it.
Only Ink's methods are documented in this readme.
Fully AI-generated pull requests are not accepted. You can use AI, but should be verified and cleaned up by a human. Only Opus 4.6+ (high-effort) and Codex 5.4+ (extra high) are accepted models. Preferably created with Opus and verified by Codex.
---
My open source work is supported by the community ❤️
Install
sh
npm install ink react
[!NOTE]
This readme documents the upcoming version of Ink. For the latest stable release, see Ink on npm.
Usage
jsx
import React, {useState, useEffect} from 'react';
import {render, Text} from 'ink';
const Counter = () = {
const [counter, setCounter] = useState(0);
useEffect(() = {
const timer = setInterval(() = {
setCounter(previousCounter = previousCounter + 1);
}, 100);
return () = {
clearInterval(timer);
};
}, []);
return {counter} tests passed;
};
render();
Who's Using Ink?
- Claude Code - An agentic coding tool made by Anthropic.
- Gemini CLI - An agentic coding tool made by Google.
- GitHub Copilot CLI - Just say what you want the shell to do.
- Canva CLI - CLI for creating and managing Canva Apps.
- Cloudflare's Wrangler - The CLI for Cloudflare Workers.
- Linear - Linear built an internal CLI for managing deployments, configs, and other housekeeping tasks.
- Gatsby - Gatsby is a modern web framework for blazing-fast websites.
- tap - A Test-Anything-Protocol library for JavaScript.
- Terraform CDK - Cloud Development Kit (CDK) for HashiCorp Terraform.
- Specify CLI - Automate the distribution of your design tokens.
- Twilio's SIGNAL - CLI for Twilio's SIGNAL conference. Blog post.
- Typewriter - Generates strongly-typed Segment analytics clients from arbitrary JSON Schema.
- Prisma - The unified data layer for modern applications.
- Blitz - The Fullstack React Framework.
- New York Times - NYT uses Ink's kyt - a toolkit that encapsulates and manages the configuration for web apps.
- tink - A next-generation runtime and package manager.
- Inkle - A Wordle game.
- loki - Visual regression testing tool for Storybook.
- Bit - Build, distribute, and collaborate on components.
- Remirror - Your friendly, world-class editor toolkit.
- Prime - Open-source GraphQL CMS.
- emoj - Find relevant emojis.
- emma - Find and install npm packages easily.
- npm-check-extras - Check for outdated and unused dependencies, and run update/delete actions on selected ones.
- swiff - Multi-environment commaTop issues
#222Scrolling23 comments · 2019-08-29#973<Static> commit taller than the viewport overwrites its own last line (incremental path ignores static-chunk height)8 comments · 2026-06-24#676Feature request: Multi-line input element6 comments · 2024-10-24#251Add cursor support5 comments · 2019-12-16#1032Output caches are rebuilt on every render, so each frame re-tokenizes and re-measures the whole screen4 comments · 2026-09-24#978Native (external) memory leak on repeated render/unmount of a component using useStdin().setRawMode()3 comments · 2026-07-18#921Deprecate pasted-text fallback in `useInput` and make `usePaste` the only paste API3 comments · 2026-03-30#870useCursor requires component to know the position it's displayed at3 comments · 2026-02-10
Discussions
#993ink-cartridge - A terminal application framework built on Ink0 comments · 2026-08-16#983Can the React Compiler have any effect on Ink?1 comments · 2026-08-02#977Ink for Golang0 comments · 2026-07-18#959Pilates — pure-TypeScript layout engine inspired by Ink's space0 comments · 2026-05-23#939@real-router/react/ink — a packaged alternative to the MemoryRouter routing recipe0 comments · 2026-04-20#924Claude code third party license2 comments · 2026-04-02#903ORCH — AI agent team orchestrator TUI built with Ink + React (1493 tests)0 comments · 2026-03-17#897Question: Place element on last line of terminal1 comments · 2026-03-08
Latest release
v8.0.0 v8.0.0 2026-10-03Breaking - Require React 19.3+ 7829102 - minWidth and maxWidth on now only accept numbers (1029) 7cd7fd9 - Percentage strings were never documented as supported, and Yoga resolved them against the wrong ancestor - stdin, stdout, and stderr are now typed as generic Node.js streams (981) eb82d8f - This applies to the render() options and to useStdin(), useStdout(), and useStderr(). TTY-only properties like stdout.columns are no longer part of the types - useInput no longer receives unrecognized terminal control sequences (1014) c76893e - Mouse reports, focus in/out events, cu