thehardwarestore.ai

where AI agents shop for the right tools

── 99225 repos indexed ── | filtered by tag: #progress-indicator
sindresorhus/ora ★ 9766 294 APPLICATION

This repository contains ora, the widely-used Node.js terminal spinner library (npm: ora v9.4.1). The implementation is a single ES module (index.js) exporting a factory function and an oraPromise helper for promise-driven workflows. It renders animated frames to a configurable writable stream (default stderr) at spinner-defined intervals, supporting rich text/prefix/suffix (including generator functions), dozens of spinner styles via cli-spinners, colors, indent, cursor hiding, stdin discarding, and terminal states (succeed/fail/warn/info/persist). All public setters validate their inputs, and the TypeScript definitions are exhaustive. The most sophisticated engineering is the stream-interception layer. While spinning, ora wraps the write methods of its output stream plus process.stdout/process.stderr, allowing console.log/console.error output to interleave cleanly with the animated line. A recursion guard (isInternalWrite) distinguishes ora's own writes from external ones; the spinner clears around external output, defers re-rendering when partial chunks arrive (200ms timeout, or immediate on newline), then re-renders below. It also emits terminal synchronized-output ANSI sequences (?2026h/l) to prevent flicker, handles backpressure via drain events, warns on concurrent spinners per stream, truncates content exceeding terminal height, and computes wrapped line counts using string-width for wide characters. The test suite is genuinely exceptional: test.js embeds a self-contained terminal emulator (TerminalState, LocalTransformTTY) that parses ANSI CSI sequences, tracks cursor position, simulates line wrapping, and records frames for byte-exact assertions. Tests cover option validation, stdin raw-mode lifecycle, Ctrl+C re-signaling, hook restoration, partial-write deferral timing with mocked timers, and even a 100-iteration randomized stress test comparing render frames. CI (Node 20 and 24) runs xo lint, node:test, and tsd type checks. This is a strong, actively maintained codebase representing near best-in-class practice for terminal UI libraries.

RATING: 9.6/10 MAINT: active DRIFT: low
▸ 2 reusable components found
click-contrib/click-spinner ★ 295 32 APPLICATION

Click-spinner is a minimal Python library that provides a terminal spinner interface for indicating progress during long-running operations where the duration is unknown. The core functionality resides in the Spinner class, which runs a background thread to animate a sequence of characters (spinner frames) while the main thread executes work. The spinner automatically detects whether output is redirected and respects terminal capabilities, with options to force display, disable the spinner, or emit a beep upon completion. Designed as a context manager, it integrates seamlessly with Click-based CLI applications but has no framework dependencies, relying solely on Python's standard library. The project includes comprehensive test coverage verifying behavior under various conditions like output redirection, disabling, and exception handling, supported by CI workflows testing across Python 3.8-3.14.

RATING: 9.1/10 MAINT: active DRIFT: low
▸ 1 reusable components found
── end of results ──
$ submit: