{"id":37188037,"url":"https://github.com/pdevine/progressbar","last_synced_at":"2026-01-14T21:52:12.822Z","repository":{"id":182425104,"uuid":"668466960","full_name":"pdevine/progressbar","owner":"pdevine","description":"A really basic thread-safe progress bar for Golang applications","archived":false,"fork":true,"pushed_at":"2023-07-19T22:45:25.000Z","size":810,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2023-09-05T03:07:48.965Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/schollz/progressbar/v3?tab=doc","language":"Go","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"schollz/progressbar","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pdevine.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null},"funding":{"github":"schollz"}},"created_at":"2023-07-19T22:03:52.000Z","updated_at":"2023-07-19T22:39:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"cd12f178-4410-4e66-8f79-472d23620c69","html_url":"https://github.com/pdevine/progressbar","commit_stats":null,"previous_names":["pdevine/progressbar"],"tags_count":0,"template":null,"template_full_name":null,"purl":"pkg:github/pdevine/progressbar","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pdevine%2Fprogressbar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pdevine%2Fprogressbar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pdevine%2Fprogressbar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pdevine%2Fprogressbar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pdevine","download_url":"https://codeload.github.com/pdevine/progressbar/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pdevine%2Fprogressbar/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28436229,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T21:32:52.117Z","status":"ssl_error","status_checked_at":"2026-01-14T21:32:33.442Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-14T21:52:11.800Z","updated_at":"2026-01-14T21:52:12.799Z","avatar_url":"https://github.com/pdevine.png","language":"Go","readme":"# progressbar\n\n[![CI](https://github.com/schollz/progressbar/actions/workflows/ci.yml/badge.svg?branch=main\u0026event=push)](https://github.com/schollz/progressbar/actions/workflows/ci.yml)\n[![go report card](https://goreportcard.com/badge/github.com/schollz/progressbar)](https://goreportcard.com/report/github.com/schollz/progressbar) \n[![coverage](https://img.shields.io/badge/coverage-84%25-brightgreen.svg)](https://gocover.io/github.com/schollz/progressbar)\n[![godocs](https://godoc.org/github.com/schollz/progressbar?status.svg)](https://godoc.org/github.com/schollz/progressbar/v3) \n\nA very simple thread-safe progress bar which should work on every OS without problems. I needed a progressbar for [croc](https://github.com/schollz/croc) and everything I tried had problems, so I made another one. In order to be OS agnostic I do not plan to support [multi-line outputs](https://github.com/schollz/progressbar/issues/6).\n\n\n## Install\n\n```\ngo get -u github.com/schollz/progressbar/v3\n```\n\n## Usage \n\n### Basic usage\n\n```golang\nbar := progressbar.Default(100)\nfor i := 0; i \u003c 100; i++ {\n    bar.Add(1)\n    time.Sleep(40 * time.Millisecond)\n}\n```\n\nwhich looks like:\n\n![Example of basic bar](examples/basic/basic.gif)\n\n\n### I/O operations\n\nThe `progressbar` implements an `io.Writer` so it can automatically detect the number of bytes written to a stream, so you can use it as a progressbar for an `io.Reader`.\n\n```golang\nreq, _ := http.NewRequest(\"GET\", \"https://dl.google.com/go/go1.14.2.src.tar.gz\", nil)\nresp, _ := http.DefaultClient.Do(req)\ndefer resp.Body.Close()\n\nf, _ := os.OpenFile(\"go1.14.2.src.tar.gz\", os.O_CREATE|os.O_WRONLY, 0644)\ndefer f.Close()\n\nbar := progressbar.DefaultBytes(\n    resp.ContentLength,\n    \"downloading\",\n)\nio.Copy(io.MultiWriter(f, bar), resp.Body)\n```\n\nwhich looks like:\n\n![Example of download bar](examples/download/download.gif)\n\n\n### Progress bar with unknown length\n\nA progressbar with unknown length is a spinner. Any bar with -1 length will automatically convert it to a spinner with a customizable spinner type. For example, the above code can be run and set the `resp.ContentLength` to `-1`.\n\nwhich looks like:\n\n![Example of download bar with unknown length](examples/download-unknown/download-unknown.gif)\n\n\n### Customization\n\nThere is a lot of customization that you can do - change the writer, the color, the width, description, theme, etc. See [all the options](https://pkg.go.dev/github.com/schollz/progressbar/v3?tab=doc#Option).\n\n```golang\nbar := progressbar.NewOptions(1000,\n    progressbar.OptionSetWriter(ansi.NewAnsiStdout()),\n    progressbar.OptionEnableColorCodes(true),\n    progressbar.OptionShowBytes(true),\n    progressbar.OptionSetWidth(15),\n    progressbar.OptionSetDescription(\"[cyan][1/3][reset] Writing moshable file...\"),\n    progressbar.OptionSetTheme(progressbar.Theme{\n        Saucer:        \"[green]=[reset]\",\n        SaucerHead:    \"[green]\u003e[reset]\",\n        SaucerPadding: \" \",\n        BarStart:      \"[\",\n        BarEnd:        \"]\",\n    }))\nfor i := 0; i \u003c 1000; i++ {\n    bar.Add(1)\n    time.Sleep(5 * time.Millisecond)\n}\n```\n\nwhich looks like:\n\n![Example of customized bar](examples/customization/customization.gif)\n\n\n## Contributing\n\nPull requests are welcome. Feel free to...\n\n- Revise documentation\n- Add new features\n- Fix bugs\n- Suggest improvements\n\n## Thanks\n\nThanks [@Dynom](https://github.com/dynom) for massive improvements in version 2.0!\n\nThanks [@CrushedPixel](https://github.com/CrushedPixel) for adding descriptions and color code support!\n\nThanks [@MrMe42](https://github.com/MrMe42) for adding some minor features!\n\nThanks [@tehstun](https://github.com/tehstun) for some great PRs!\n\nThanks [@Benzammour](https://github.com/Benzammour) and [@haseth](https://github.com/haseth) for helping create v3!\n\nThanks [@briandowns](https://github.com/briandowns) for compiling the list of spinners.\n\n## License\n\nMIT\n","funding_links":["https://github.com/sponsors/schollz"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpdevine%2Fprogressbar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpdevine%2Fprogressbar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpdevine%2Fprogressbar/lists"}