Package Exports
- @flyingrobots/bijou-node
- @flyingrobots/bijou-node/package.json
Readme
@flyingrobots/bijou-node
Node.js adapter for bijou — chalk styling, readline I/O, process runtime.
Install
npm install @flyingrobots/bijou @flyingrobots/bijou-nodeUsage
import { initDefaultContext } from '@flyingrobots/bijou-node';
import { box, headerBox } from '@flyingrobots/bijou';
// Wire up Node.js adapters and set the default context.
// Auto-detects TTY, CI, NO_COLOR, and TERM=dumb.
initDefaultContext();
console.log(headerBox('My CLI', { detail: 'v1.0.0' }));What It Provides
bijou-node implements the three ports that @flyingrobots/bijou requires:
| Port | Implementation | What it does |
|---|---|---|
RuntimePort |
nodeRuntime() |
process.env, setTimeout, exit handling |
IOPort |
nodeIO() |
process.stdout/stdin, readline |
StylePort |
chalkStyle() |
RGB/hex color via chalk, respects NO_COLOR |
API
// Individual port factories
import { nodeRuntime, nodeIO, chalkStyle } from '@flyingrobots/bijou-node';
// All-in-one context (most common)
import { createNodeContext, initDefaultContext } from '@flyingrobots/bijou-node';
// createNodeContext() — returns a BijouContext without setting it as default
const ctx = createNodeContext();
// initDefaultContext() — creates context AND registers it as the global default
initDefaultContext();Related Packages
@flyingrobots/bijou— Zero-dependency core with all components and theme engine@flyingrobots/bijou-tui— TEA runtime for interactive terminal apps
License
MIT