cli-progress-bar-setup

Configure cli-progress with custom formatters, multi-bar support, and ETA calculations for CLI progress indication.

509 stars

Best use case

cli-progress-bar-setup is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Configure cli-progress with custom formatters, multi-bar support, and ETA calculations for CLI progress indication.

Teams using cli-progress-bar-setup should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/cli-progress-bar-setup/SKILL.md --create-dirs "https://raw.githubusercontent.com/a5c-ai/babysitter/main/library/specializations/cli-mcp-development/skills/cli-progress-bar-setup/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/cli-progress-bar-setup/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How cli-progress-bar-setup Compares

Feature / Agentcli-progress-bar-setupStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Configure cli-progress with custom formatters, multi-bar support, and ETA calculations for CLI progress indication.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# 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

```typescript
import cliProgress, { SingleBar, MultiBar, Presets } from 'cli-progress';
import chalk from 'chalk';

// Custom format with colors
const defaultFormat = chalk.cyan('{bar}') +
  ' {percentage}% | ETA: {eta}s | {value}/{total} | {filename}';

// Create single progress bar
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);
}

// Multi-bar for parallel tasks
export function createMultiBar(): MultiBar {
  return new MultiBar({
    format: '{name} |' + chalk.cyan('{bar}') + '| {percentage}% | {value}/{total}',
    barCompleteChar: '\u2588',
    barIncompleteChar: '\u2591',
    hideCursor: true,
    clearOnComplete: false,
    stopOnComplete: false,
  }, Presets.shades_grey);
}

// Download progress with speed
export function createDownloadBar(): SingleBar {
  return new SingleBar({
    format: 'Downloading |' + chalk.cyan('{bar}') +
      '| {percentage}% | {speed} MB/s | {value}/{total} MB',
    barCompleteChar: '\u2588',
    barIncompleteChar: '\u2591',
    barsize: 30,
    formatValue: (value, options, type) => {
      if (type === 'value' || type === 'total') {
        return (value / 1024 / 1024).toFixed(2);
      }
      return String(value);
    },
  }, Presets.shades_classic);
}

// Wrapper for async operations
export async function withProgress<T>(
  total: number,
  fn: (update: (current: number, payload?: Record<string, any>) => void) => Promise<T>,
  options?: { format?: string }
): Promise<T> {
  const bar = createProgressBar(options);
  bar.start(total, 0);

  try {
    const result = await fn((current, payload) => {
      bar.update(current, payload);
    });
    bar.stop();
    return result;
  } catch (error) {
    bar.stop();
    throw error;
  }
}

// Batch processing with progress
export async function processBatch<T, R>(
  items: T[],
  processor: (item: T, index: number) => Promise<R>,
  options?: { label?: string }
): Promise<R[]> {
  const bar = createProgressBar({
    format: `${options?.label || 'Processing'} |{bar}| {percentage}% | {value}/{total}`,
  });

  bar.start(items.length, 0);
  const results: R[] = [];

  for (let i = 0; i < items.length; i++) {
    results.push(await processor(items[i], i));
    bar.update(i + 1);
  }

  bar.stop();
  return results;
}

// Parallel processing with multi-bar
export async function processParallel<T, R>(
  tasks: Array<{
    name: string;
    items: T[];
    processor: (item: T) => Promise<R>;
  }>
): Promise<Map<string, R[]>> {
  const multiBar = createMultiBar();
  const bars = new Map<string, SingleBar>();
  const results = new Map<string, R[]>();

  // Create bars for each task
  for (const task of tasks) {
    const bar = multiBar.create(task.items.length, 0, { name: task.name.padEnd(15) });
    bars.set(task.name, bar);
    results.set(task.name, []);
  }

  // Process all tasks in parallel
  await Promise.all(tasks.map(async (task) => {
    const bar = bars.get(task.name)!;
    const taskResults = results.get(task.name)!;

    for (let i = 0; i < task.items.length; i++) {
      taskResults.push(await task.processor(task.items[i]));
      bar.update(i + 1);
    }
  }));

  multiBar.stop();
  return results;
}
```

## Dependencies

```json
{
  "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

Related Skills

visual-regression-setup

509
from a5c-ai/babysitter

Configure visual regression testing with Percy, Chromatic, or custom screenshot comparison

tauri-project-setup

509
from a5c-ai/babysitter

Initialize Tauri project with Rust backend and frontend framework integration

spectron-test-setup

509
from a5c-ai/babysitter

Set up Spectron (deprecated) tests for legacy Electron application testing

sentry-desktop-setup

509
from a5c-ai/babysitter

Configure Sentry for comprehensive desktop application crash reporting, error monitoring, performance tracking, and release health for Electron and native desktop apps

file-watcher-setup

509
from a5c-ai/babysitter

Set up cross-platform file system watching with debouncing and efficient change detection

electron-protocol-handler-setup

509
from a5c-ai/babysitter

Register and handle custom URL protocols (deep linking) across platforms for Electron applications

electron-auto-updater-setup

509
from a5c-ai/babysitter

Configure electron-updater with code signing verification, delta updates, staged rollouts, and multiple update channels for Electron applications

avalonia-ui-setup

509
from a5c-ai/babysitter

Set up Avalonia UI project with cross-platform XAML for Windows, macOS, and Linux

viper-go-setup

509
from a5c-ai/babysitter

Set up Viper for Go configuration management with file, env, and flag binding.

plugin-sandbox-setup

509
from a5c-ai/babysitter

Configure plugin sandboxing with vm2 or isolated-vm for secure plugin execution.

mcp-transport-websocket-setup

509
from a5c-ai/babysitter

Configure WebSocket transport for bidirectional MCP communication with connection management and reconnection handling.

mcp-transport-sse-setup

509
from a5c-ai/babysitter

Configure HTTP/SSE transport for web-based MCP servers with proper endpoints, authentication, and CORS.