src/ink Custom Fork
- Entity ID:
ent-20260420-b01a00000008 - Type:
directory - Scope:
shared - Status:
active - Aliases: embedded Ink, custom Ink fork, in-tree Ink
Description
Custom fork of the Ink terminal UI framework embedded directly in src/ink/ rather than consumed as an npm dependency. Contains root.ts (root renderer), ink.tsx (core component), reconciler.ts (React reconciler for terminal output), dom.ts (terminal DOM implementation), renderer.ts (virtual-DOM to terminal strings), and components/ (built-in Box/Text/etc.). Exposed via src/ink.ts which re-exports render()/createRoot() and wraps the tree with a ThemeProvider. Enables claude-code-specific patches (React 19 compat, custom layout, embedded Yoga) without waiting on upstream.
Key claims
- Claude Code embeds a custom fork of Ink rather than using the upstream package
- Ink render pipeline has five sequential stages from src/ink.ts to terminal strings
- Claude Code uses React 19 in a custom reconciler targeting terminal output
- Ink rendering requires Yoga for flexbox layout
Relations
- src/ink Custom Fork --[is_same_as]--> src/ink Directory
- Ink Render Pipeline --[implemented_by]--> src/ink Custom Fork
- ThemeProvider Component --[wraps]--> src/ink Custom Fork
- src/components Directory --[depends_on]--> src/ink Custom Fork
- src/entrypoints/cli.tsx --[mounts]--> src/ink Custom Fork