Skip to content

@gluonjs/core / packages/create-gluon/src / CliIo

Interface: CliIo ​

Properties ​

cwd? ​

readonly optional cwd?: string


input? ​

readonly optional input?: Readable


output? ​

readonly optional output?: Writable


prompt? ​

readonly optional prompt?: CliPrompt

Example ​

Redirect CLI output and working-directory access when embedding or testing create-gluon without using the process-wide terminal:

ts
import { PassThrough } from 'node:stream';
import { runCli, type CliIo } from 'create-gluon';

const output = new PassThrough();
output.setEncoding('utf8');
output.on('data', (text: string) => console.log(text));

const io = { output, cwd: '/tmp' } satisfies CliIo;
await runCli(['--help'], io);

Version-matched documentation. Examples are checked against the public package contracts.