| name | cli-progress-bar-setup |
| description | Configure cli-progress with custom formatters, multi-bar support, and ETA calculations for CLI progress indication. |
| allowed-tools | Read, Write, Edit, Bash, Glob, Grep |
| graph | {"domains":["domain:software-engineering"],"specializations":["specialization:cli-mcp-development"],"skillAreas":["skill-area:cli-design","skill-area:command-line-interface-tools"],"roles":["role:backend-engineer","role:platform-engineer"],"workflows":["workflow:feature-development"],"topics":["topic:developer-experience"]} |
CLI Progress Bar Setup
Configure cli-progress for advanced progress indication.
Capabilities
- Configure single and multi-bar progress
- Create custom bar formatters
- Set up ETA calculations
- Implement payload data display
- Create progress bar presets
- Generate progress utilities
Usage
Invoke this skill when you need to:
- Show download/upload progress
- Display multi-task progress
- Create custom progress formats
- Implement ETA calculations
Inputs
| Parameter | Type | Required | Description |
|---|
| language | string | Yes | Target language |
| format | string | No | Bar format template |
| presets | array | No | Progress bar presets |
Generated Patterns
TypeScript Progress Utilities
import cliProgress, { SingleBar, MultiBar, Presets } from 'cli-progress';
import chalk from 'chalk';
const defaultFormat = chalk.cyan('{bar}') +
' {percentage}% | ETA: {eta}s | {value}/{total} | {filename}';
export function createProgressBar(options?: {
format?: string;
barSize?: number;
}): SingleBar {
return new SingleBar({
format: options?.format || defaultFormat,
barCompleteChar: '\u2588',
barIncompleteChar: '\u2591',
barsize: options?.barSize || 40,
hideCursor: true,
clearOnComplete: false,
stopOnComplete: true,
}, Presets.shades_classic);
}
export function createMultiBar(): MultiBar {
return ({
: + chalk.() + ,
: ,
: ,
: ,
: ,
: ,
}, .);
}
(): {
({
: + chalk.() +
,
: ,
: ,
: ,
: {
( === || === ) {
(value / / ).();
}
(value);
},
}, .);
}
withProgress<T>(
: ,
: <T>,
?: { ?: }
): <T> {
bar = (options);
bar.(total, );
{
result = ( {
bar.(current, payload);
});
bar.();
result;
} (error) {
bar.();
error;
}
}
processBatch<T, R>(
: T[],
: <R>,
?: { ?: }
): <R[]> {
bar = ({
: ,
});
bar.(items., );
: R[] = [];
( i = ; i < items.; i++) {
results.( (items[i], i));
bar.(i + );
}
bar.();
results;
}
processParallel<T, R>(
: <{
: ;
: T[];
: <R>;
}>
): <<, R[]>> {
multiBar = ();
bars = <, >();
results = <, R[]>();
( task tasks) {
bar = multiBar.(task.., , { : task..() });
bars.(task., bar);
results.(task., []);
}
.(tasks.( (task) => {
bar = bars.(task.)!;
taskResults = results.(task.)!;
( i = ; i < task..; i++) {
taskResults.( task.(task.[i]));
bar.(i + );
}
}));
multiBar.();
results;
}
Dependencies
{
"dependencies": {
"cli-progress": "^3.12.0",
"chalk": "^5.0.0"
},
"devDependencies": {
"@types/cli-progress": "^3.11.0"
}
}
Target Processes
- progress-status-indicators
- cli-output-formatting
- cli-application-bootstrap