A Rust crate for building terminal user interfaces (TUIs) with reusable widgets and a simple rendering model.
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
Install Ink and React with npm
npm install ink react - 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
A terminal JSON viewer and processor that lets you browse, fold and transform JSON interactively in the shell.
A library for building terminal user interfaces, written in Zig with TypeScript, React and Solid bindings.
A tiny, fast terminal file manager in C for browsing, batch renaming, disk usage analysis and launching apps.
A Go terminal UI framework built on the Elm Architecture, with Unicode-correct layout, inline and full-screen rendering, and a component library.
A cat(1) clone for the terminal with syntax highlighting, Git change markers, and automatic paging.