Repolode
vadimdemedes

vadimdemedes/ink

React renderer for building interactive command-line apps with components and Flexbox layouts in the terminal.

Stars
40,136
Forks
1,062
Open issues
33
Last commit
19 days ago

What is it?

Ink lets developers build command-line interfaces the same way they build React web UIs, using components, props, and hooks. Each element is laid out as a Flexbox container using the Yoga layout engine, so familiar CSS-like properties such as padding, margin, flexGrow, and justifyContent work in the terminal.

The package provides built-in components like Text, Box, Newline, Spacer, Static, and Transform, along with hooks for keyboard input (useInput), app lifecycle (useApp), stdin/stdout access, and focus management. Since it is a React renderer, all standard React features are available, and the documentation covers only Ink's own API.

Ink is used by several agentic coding tools, cloud provider CLIs, and interactive developer tools such as Gatsby's and Tap's progress output.

Key features

  • 01Renders React components to terminal output.
  • 02Supports Flexbox layout through Yoga, with CSS-like properties.
  • 03Provides Text styling such as colors, bold, italic, and truncation.
  • 04Includes hooks for keyboard input, focus management, and window size.
  • 05Offers Static rendering for logs and completed items that stay above live output.

Use cases

  • Building interactive CLI tools with live-updating progress views.
  • Creating terminal dashboards that respond to keyboard input.
  • Writing test runners or build tools that show streaming status.
  • Developing AI agent or chat interfaces that run in the terminal.

Quick start

  1. 1

    Install Ink and React with npm

    npm install ink react
  2. 2

    Scaffold a new Ink CLI project with create-ink-app

    npx create-ink-app my-ink-cli

Things to know

  • The README documents the upcoming version, not the latest stable release on npm.

Topics

FAQ

What is ink?
React renderer for building interactive command-line apps with components and Flexbox layouts in the terminal. Ink lets developers build command-line interfaces the same way they build React web UIs, using components, props, and hooks. Each element is laid out as a Flexbox container using the Yoga layout engine, so familiar CSS-like properties such as padding, margin, flexGrow, and justifyContent work in the terminal.
Is ink free to use? What license does it have?
ink is open source under the MIT license. Check the license terms before using it in commercial products.
Is ink still maintained?
Actively maintained. The last commit to ink was on Oct 3, 2026.
What can I use ink for?
Building interactive CLI tools with live-updating progress views. Creating terminal dashboards that respond to keyboard input. Writing test runners or build tools that show streaming status. Developing AI agent or chat interfaces that run in the terminal.
How do I install ink?
Install Ink and React with npm: npm install ink react Scaffold a new Ink CLI project with create-ink-app: npx create-ink-app my-ink-cli
Where can I get ink?
The source code and installation instructions are on GitHub: https://github.com/vadimdemedes/ink

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects