Skip to content

Pipeline

A multi-step process/pipeline visualisation component for Ink 5. Shows sequential steps with individual status, progress, timing, and rollback indication. Perfect for deploy workflows, CI pipelines, and setup wizards.

Install

Terminal window
npm install @matthesketh/ink-pipeline

Peer dependencies: ink 5.2.1 and react 18.3.1.

Usage

import React from 'react';
import { render } from 'ink';
import { Pipeline } from '@matthesketh/ink-pipeline';
function App() {
return (
<Pipeline
title="Deploy Pipeline"
steps={[
{ label: 'Install deps', status: 'success', duration: 1200 },
{ label: 'Build', status: 'running', progress: 0.45 },
{ label: 'Deploy', status: 'pending' },
{ label: 'Health check', status: 'pending' },
]}
/>
);
}
render(<App />);

Output:

Deploy Pipeline
[ok] Install deps (1.2s)
|
[..] Build [==== ] 45%
|
[ ] Deploy
|
[ ] Health check

API

<Pipeline>

PropTypeDefaultDescription
stepsPipelineStep[]-Array of steps to display
titlestring-Optional title shown above the pipeline
showDurationbooleantrueShow elapsed time next to completed steps
showProgressbooleantrueShow progress bar for running steps
compactbooleanfalseCompact mode: one line per step, no connectors

PipelineStep

FieldTypeDescription
labelstringStep name
statusStepStatusCurrent step status
progressnumber0-1, shown as percentage when running
durationnumberMilliseconds, shown as elapsed time
outputstringDetail text shown below the step

StepStatus

'pending' | 'running' | 'success' | 'error' | 'skipped' | 'rolling-back'

Status indicators: (pending) pending, spinner running, (success) success, (error) error, (skipped) skipped, (rolling-back) rolling-back.

License

MIT