cli-progress-footer is a Node.js utility for managing dynamic progress content displayed consistently below the standard output stream in command-line interfaces. The package, currently stable at version 2.3.3, receives maintenance updates and bug fixes (e.g., a fix for `\r` characters in v2.3.3) rather than a fixed release cadence. Its key differentiator is its robust handling of `process.stdout.write` and `process.stderr` by default, ensuring that dynamic progress information remains at the bottom of the terminal, even when other parts of the application or child processes are writing to the console. It also includes a workaround for child processes that might otherwise disrupt the progress display, making it reliable for complex CLI tools. The library is content-agnostic, allowing any string to be used for the progress message.
npm install cli-progress-footerVerified import paths — ran on the pinned version, not inferred.
Initializes a CLI progress footer, displays a dynamic progress message with a custom throbber animation, and demonstrates updating it below standard output while also writing regular log messages and ensuring proper cleanup upon task completion.
Ensure `overrideStdout: true` (default) and use `cliProgressFooter.writeStdout(data)` for all regular output instead of `process.stdout.write(data)`.
Ensure `redirectStderr: true` (default) or, if opting out, ensure no critical output goes to `process.stderr` that could conflict with the footer.
Keep `workaroundChildProcess: true` (default). This setting decorates `child_process` functions to temporarily hide the progress bar during problematic child process execution.
Upgrade to `cli-progress-footer` version `2.3.3` or newer to resolve issues with `\r` characters in progress messages.
For most use cases, keep `discardStdin: true` (default) to mute stdin input and hide the cursor, preventing user input from interfering with the progress display.
Change `const cliProgressFooter = require('cli-progress-footer');` to `const cliProgressFooter = require('cli-progress-footer')();`Ensure `overrideStdout` and `redirectStderr` options are set to `true` (their defaults), and for any custom output, use `cliProgressFooter.writeStdout()` instead of direct `process.stdout.write()`.
Ensure the `workaroundChildProcess` option is set to `true` (its default). This enables internal logic to temporarily hide the progress bar during such child process executions.
Upgrade `cli-progress-footer` to version `2.3.3` or newer, which contains a fix for `\r` character handling.