Download the PHP package kas-cor/console-progress-bar without Composer

On this page you can find all versions of the php package kas-cor/console-progress-bar. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package console-progress-bar

Console progress bar

CI Latest Version Total Downloads PHP Version

Русская версия: README_ru.md

A lightweight, customizable progress bar for PHP CLI applications. Supports spinners, time tracking, percentage display, and pluggable output handlers (console, PSR-3 logger, callback).

Screenshots

In process

In process

Finish report

Finish report

Features

Install

Requirements

Quick start

Usage

Default config

Custom config

Custom output handler

The progress bar supports pluggable output handlers via OutputInterface. Three built-in handlers are available:

Handler Description
ConsoleOutput Default — writes directly to STDOUT via echo
CallbackOutput Delegates output to a user-provided callback
LoggerOutput Routes output to a PSR-3 logger

Callback output

PSR-3 logger output

Changing output at runtime

Custom log level

Without parameters

output() keeps the previous position when called without a position argument — it does not advance automatically. Pass the position explicitly to advance the bar:

To print a message without changing the position, use output(null, 'message').

Manual finish report

Config reference

Property Type Description Default
showTimeMessage boolean Show timestamp before message true
showBar boolean Show progress bar [###...] true
showCurrentPosition boolean Show current position 005/100 true
showSpinner boolean Show spinner animation true
showPercent boolean Show percentage 50.00% true
showPassedTime boolean Show passed time true
showEstimatedTime boolean Show estimated remaining time true
showFinishReport boolean Show finish report on completion true
timeMessageFormat string PHP date format for timestamps d.m.Y H:i:s
progressBarSize int Width of the progress bar in characters 50
progressBarFullChar string Character for filled portion #
progressBarEmptyChar string Character for empty portion .
spinnerChars array Spinner animation frames ['-', '\\', '\|', '/']
separator string Separator between elements -
orderElements array Element order ['spinner', 'progress_bar', 'current_position', 'percent', 'passed_time', 'estimated_time']

Methods reference

Method Description
output(?int $position, ?string $message) Update and display the progress bar
getProgressData(): array Get current progress data (percent, times, position)
finishReport(): void Print the finish report manually
setOutput(OutputInterface $output): void Set a custom output handler
getOutput(): OutputInterface Get the current output handler

getProgressData() return value

Contributing

Contributions are welcome! See CONTRIBUTING.md for guidelines on development workflow, coding standards, and pull request process.

Changelog

See CHANGELOG.md.

License

MIT


All versions of console-progress-bar with dependencies

PHP Build Version
Package Version
Requires php Version >=8.4
ext-mbstring Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package kas-cor/console-progress-bar contains the following files

Loading the files please wait ...