TaskProgress

1.1.1

Progress indicators for multiple tasks in the terminal
Jomy10/TaskProgress

What's New

Version 1.1.1

2024-12-31T13:47:53Z
  • Small fix for intermediateMessages not showing up

TaskProgress

Show progress of multiple tasks in the terminal

example gif

Important

Library in early development, feedback is appreciated, expect bugs

Example

ProgressIndicators.global.show()

let main = SpinnerProgressTask("Building module Main")
main.setMessage("waiting on Logging")
ProgressIndicators.global.addTask(main)

Task {
  try await Task.sleep(for: .seconds(1))
  let loggingTask = ProgressBarTask("Building module Logging", total: 100)
  ProgressIndicators.global.addTask(loggingTask)
  for _ in 0..<100 {
    loggingTask.progress()
    try await Task.sleep(for: .seconds(0.1))
  }
  main.finish()
}

You can run this example by cloning this repository and running swift run.

TODO

  • for ansi output: when terminal height is less than what is being outputted, then only print for available height, only at the end, print everything

Description

  • Swift Tools 6.0.0
View More Packages from this Author

Dependencies

  • None
Last updated: Thu May 15 2025 09:00:15 GMT-0900 (Hawaii-Aleutian Daylight Time)