explaingit

vadimdemedes/ink

Analysis updated 2026-06-20

38,214TypeScriptAudience · developerComplexity · 2/5LicenseSetup · easy

TLDR

A TypeScript library that lets you build interactive command-line tools using React components, the same patterns you use for web UIs, with flexbox layout for the terminal.

Mindmap

mindmap
  root((Ink))
    What it does
      React for terminal
      Flexbox layout
      Dynamic re-render
    Tech Stack
      TypeScript
      React
      Node.js
      Yoga layout
    Use Cases
      Progress spinners
      Interactive wizards
      Live dashboards
    Audience
      React developers
      CLI tool authors
    Notable Users
      Claude Code
      GitHub Copilot CLI
      Cloudflare Wrangler
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Build a CLI tool with a live-updating progress display, spinner, and status lines using React components.

USE CASE 2

Create a multi-step interactive wizard in the terminal that manages its own state with useState.

USE CASE 3

Add a real-time dashboard to a command-line tool that re-renders only changed sections without flickering.

USE CASE 4

Port React knowledge to terminal tooling to ship a polished CLI without learning a separate framework.

What is it built with?

TypeScriptReactNode.jsYoga

How does it compare?

vadimdemedes/inkrssnext/foloant-design/ant-design-pro
Stars38,21438,23238,169
LanguageTypeScriptTypeScriptTypeScript
Setup difficultyeasymoderatemoderate
Complexity2/53/53/5
Audiencedevelopergeneraldeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 30min

Requires Node.js and a basic understanding of React hooks, no browser or bundler setup needed.

MIT, use freely for any purpose, including commercial, with no restrictions beyond keeping the copyright notice.

In plain English

Ink is a library that lets you build interactive command-line applications using React, the same JavaScript framework normally used for building web user interfaces. The core insight is that a terminal's output is just text laid out in a grid, which is not so different from a web page. Ink maps React's component model onto the terminal so you can write CLI tools using familiar patterns: components, props, state, hooks like useState and useEffect, and the same declarative rendering approach you would use in a browser app. Under the hood, Ink uses Yoga, Facebook's implementation of the Flexbox layout algorithm, to position elements in the terminal. This means you can use CSS-like properties such as padding, margins, and flex direction to arrange text and boxes in your CLI output. It supports all standard React features including context, refs, suspense, and concurrent rendering. When state changes, Ink re-renders only the parts of the terminal output that changed rather than clearing and rewriting everything. You would use Ink when building a CLI tool that needs dynamic, interactive output, for example, a spinner showing download progress, a multi-step configuration wizard, a live dashboard updating in real time, or an interactive prompt. It is a particularly good fit if you already know React and want to apply that knowledge to terminal interfaces. The README notes it is used by several well-known tools including Claude Code, Gemini CLI, GitHub Copilot CLI, Cloudflare's Wrangler, Shopify CLI, and Prisma. The library is written in TypeScript, runs on Node.js, and is installed via npm.

Copy-paste prompts

Prompt 1
Using the Ink library, write a React component that shows a CLI spinner while an async task runs, then displays a success or error message when it finishes.
Prompt 2
How do I build a multi-step CLI form with Ink where each step waits for user input and the final step summarizes their answers?
Prompt 3
I want to show a live-updating table in the terminal using Ink. Write a React component that re-renders every second with new data.
Prompt 4
How do I use flexbox layout in Ink to position two text columns side-by-side in a terminal output, similar to CSS flex direction row?

Frequently asked questions

What is ink?

A TypeScript library that lets you build interactive command-line tools using React components, the same patterns you use for web UIs, with flexbox layout for the terminal.

What language is ink written in?

Mainly TypeScript. The stack also includes TypeScript, React, Node.js.

What license does ink use?

MIT, use freely for any purpose, including commercial, with no restrictions beyond keeping the copyright notice.

How hard is ink to set up?

Setup difficulty is rated easy, with roughly 30min to a first successful run.

Who is ink for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Scan in gitsafehub Deploy in gitdeployhub vadimdemedes on gitmyhub

Verify against the repo before relying on details.