API Reference
@gridland/bun
Bun-native runtime for Gridland CLI apps
@gridland/bun is the Bun-native runtime package for building Gridland CLI
apps. It re-exports everything from @gridland/utils
plus native-only exports that require the Bun runtime.
Installation
bun add @gridland/bunNative Exports
These exports are only available in Bun and are not included in @gridland/utils:
import {
createCliRenderer,
CliRenderer,
TerminalConsole,
NativeSpanFeed,
setRenderLibPath,
} from "@gridland/bun"| Export | Description |
|---|---|
createCliRenderer(options?) | Create a CLI renderer that renders to the terminal |
CliRenderer | The underlying renderer class |
TerminalConsole | Terminal-aware console implementation |
NativeSpanFeed | Native span feed for styled text rendering |
setRenderLibPath(path) | Set the path to the native rendering library |
Re-exported from @gridland/utils
All exports from @gridland/utils are re-exported, including hooks
(useKeyboard, useTerminalDimensions), headless rendering utilities
(HeadlessRenderer, createHeadlessRoot, bufferToText), and helpers
(isBrowser, calculateGridSize).
See the @gridland/utils API reference for details.
Usage
See the Compile to Binary guide for a full
walkthrough of building CLI apps with @gridland/bun.