@kernlang/terminal
v4.5.0
Published
Kern ANSI terminal rendering transpiler
Maintainers
Readme
@kernlang/terminal
Kern ANSI terminal rendering transpiler with two separate targets:
terminal: pure ANSI / Node.js outputink: React + Ink terminal UI output
Part of the KERN monorepo.
Install
npm install @kernlang/terminalGenerated Ink apps also need runtime dependencies in the consuming project:
npm install react ink @inkjs/uiCurrent upstream runtime baseline:
react19.2.xink7.x- Node.js
22+
Usage
import { transpileTerminal, transpileInk } from '@kernlang/terminal';
const ansiOutput = transpileTerminal(kernSource);
const inkComponent = transpileInk(kernSource);Ink Output
transpileInk() returns the component source in result.code and, when the screen is exported, a runnable entry artifact in result.artifacts.
For the CLI path, kern compile --target=ink now emits:
<name>.tsx— the generated screen/component module<name>.entry.tsx— the runnable Ink entrypoint (render(<Screen />)+waitUntilExit())
Use the companion *.entry.tsx file as the process entry when you want to run the generated Ink app directly.
License
AGPL-3.0
