npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@rezi-ui/ink-compat

v0.1.0-alpha.63

Published

Drop-in Ink compatibility layer powered by Rezi's rendering engine.

Readme

@rezi-ui/ink-compat

@rezi-ui/ink-compat is an Ink API compatibility layer powered by Rezi.

It keeps the Ink component/hook model, but replaces Ink's renderer backend with Rezi's deterministic layout + draw pipeline.

Why use it

  • Keep existing Ink app code and mental model.
  • Migrate incrementally (explicit import swap or package aliasing).
  • Get deterministic, env-gated diagnostics for parity and performance triage.

Install

npm install @rezi-ui/ink-compat

If your app uses ink-gradient or ink-spinner, install matching shims:

npm install ink-gradient-shim ink-spinner-shim

Migration options

Option A: explicit import swap

// Before
import { render, Box, Text } from "ink";

// After
import { render, Box, Text } from "@rezi-ui/ink-compat";

Option B: no-source-change package aliasing

Keep import "ink" in app code and alias dependencies:

npm install \
  ink@npm:@rezi-ui/ink-compat@latest \
  ink-gradient@npm:ink-gradient-shim@latest \
  ink-spinner@npm:ink-spinner-shim@latest

Equivalent with pnpm:

pnpm add \
  ink@npm:@rezi-ui/ink-compat@latest \
  ink-gradient@npm:ink-gradient-shim@latest \
  ink-spinner@npm:ink-spinner-shim@latest

Equivalent with yarn:

yarn add \
  ink@npm:@rezi-ui/ink-compat@latest \
  ink-gradient@npm:ink-gradient-shim@latest \
  ink-spinner@npm:ink-spinner-shim@latest

Verify wiring (avoid silent fallback to real Ink)

Run this in the app root:

node -e "const p=require('ink/package.json'); if(p.name!=='@rezi-ui/ink-compat') throw new Error('ink resolves to '+p.name); console.log('ink-compat active:', p.version);"

And confirm resolved path:

node -e "const fs=require('node:fs'); const path=require('node:path'); const pkg=require.resolve('ink/package.json'); console.log(fs.realpathSync(path.dirname(pkg)));"

How it works

At runtime, ink-compat runs this pipeline:

  1. React reconciles to an InkHostNode tree (compat host config).
  2. Translation maps Ink props/components to Rezi VNodes.
  3. Rezi layout + render generate draw ops, then ANSI output is serialized to terminal streams.

Key behavior:

  • <Static> is handled as a dedicated scrollback-oriented channel.
  • Input/focus/cursor are bridged through compat context/hooks.
  • Diagnostics and heavy instrumentation are env-gated.

For full architecture details, see https://rezitui.dev/docs/architecture/ink-compat/. For a practical migration workflow, see https://rezitui.dev/docs/migration/ink-to-ink-compat/.

Supported API surface

Components

  • Box
  • Text
  • Newline
  • Spacer
  • Static
  • Transform

Hooks

  • useApp
  • useInput
  • useFocus
  • useFocusManager
  • useStdin
  • useStdout
  • useStderr
  • useIsScreenReaderEnabled
  • useCursor

Runtime APIs

  • render
  • renderToString
  • measureElement
  • ResizeObserver
  • getBoundingBox
  • getInnerHeight
  • getScrollHeight

Keyboard helpers

  • kittyFlags
  • kittyModifiers

Testing entrypoint

  • @rezi-ui/ink-compat/testing

render(element, options) options

  • stdout, stdin, stderr
  • exitOnCtrlC
  • patchConsole
  • debug
  • maxFps
  • concurrent (compatibility flag; not an upstream-concurrency semantic toggle)
  • kittyKeyboard
  • isScreenReaderEnabled
  • onRender
  • alternateBuffer
  • incrementalRendering

Diagnostics

Trace output is env-gated:

  • INK_COMPAT_TRACE=1
  • INK_COMPAT_TRACE_FILE=/path/log
  • INK_COMPAT_TRACE_STDERR=1
  • INK_COMPAT_TRACE_DETAIL=1
  • INK_COMPAT_TRACE_DETAIL_FULL=1
  • INK_COMPAT_TRACE_ALL_FRAMES=1
  • INK_COMPAT_TRACE_IO=1
  • INK_COMPAT_TRACE_RESIZE_VERBOSE=1
  • INK_GRADIENT_TRACE=1

Debugging runbook:

  • https://rezitui.dev/docs/dev/ink-compat-debugging/

Known boundaries

  • Minor visual differences can occur across terminal emulators / OS TTY behavior.
  • App/version-specific messaging differences are expected and are not renderer bugs.
  • Gradient interpolation can differ slightly while preserving overall behavior.

Documentation

  • Porting guide: https://rezitui.dev/docs/migration/ink-to-ink-compat/
  • Architecture and internals: https://rezitui.dev/docs/architecture/ink-compat/
  • Debugging and parity runbook: https://rezitui.dev/docs/dev/ink-compat-debugging/