{"id":13410046,"url":"https://github.com/schollz/progressbar","last_synced_at":"2026-01-14T15:55:31.938Z","repository":{"id":37336467,"uuid":"108450241","full_name":"schollz/progressbar","owner":"schollz","description":"A really basic thread-safe progress bar for Golang applications","archived":false,"fork":false,"pushed_at":"2025-12-26T21:17:10.000Z","size":1301,"stargazers_count":4624,"open_issues_count":12,"forks_count":246,"subscribers_count":23,"default_branch":"main","last_synced_at":"2026-01-04T21:15:53.532Z","etag":null,"topics":["command-line","go","golang","hacktoberfest","library","progress-bar","progressbar","terminal"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/schollz/progressbar/v3?tab=doc","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/schollz.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"schollz"}},"created_at":"2017-10-26T18:28:10.000Z","updated_at":"2026-01-04T15:27:04.000Z","dependencies_parsed_at":"2023-02-03T12:46:55.469Z","dependency_job_id":"bbf699cf-365e-4236-94ac-1f828e57dffd","html_url":"https://github.com/schollz/progressbar","commit_stats":{"total_commits":264,"total_committers":62,"mean_commits":4.258064516129032,"dds":0.5075757575757576,"last_synced_commit":"fe6592da9212ef27796a59d2382fba02acabc9e9"},"previous_names":[],"tags_count":95,"template":false,"template_full_name":null,"purl":"pkg:github/schollz/progressbar","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schollz%2Fprogressbar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schollz%2Fprogressbar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schollz%2Fprogressbar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schollz%2Fprogressbar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/schollz","download_url":"https://codeload.github.com/schollz/progressbar/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schollz%2Fprogressbar/sbom","scorecard":{"id":804263,"data":{"date":"2025-08-11","repo":{"name":"github.com/schollz/progressbar","commit":"1a5d48397714b88f8a54612e40514f2fb5e44127"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4,"checks":[{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":6,"reason":"Found 11/17 approved changesets -- score normalized to 6","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/schollz/progressbar/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/schollz/progressbar/ci.yml/main?enable=pin","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 24 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-23T11:20:54.551Z","repository_id":37336467,"created_at":"2025-08-23T11:20:54.552Z","updated_at":"2025-08-23T11:20:54.552Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28425571,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T15:24:48.085Z","status":"ssl_error","status_checked_at":"2026-01-14T15:23:41.940Z","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":["command-line","go","golang","hacktoberfest","library","progress-bar","progressbar","terminal"],"created_at":"2024-07-30T20:01:04.701Z","updated_at":"2026-01-14T15:55:31.919Z","avatar_url":"https://github.com/schollz.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()), //you should install \"github.com/k0kubun/go-ansi\"\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":["命令行","Command Line","开源类库","Go","Development","Open source library","高级控制台UI","Go 🐹","Uncategorized","Build Automation","\u003cspan id=\"命令行-command-line\"\u003e命令行 Command Line\u003c/span\u003e","Repositories","高级控制台UI`用于构建控制台应用程序和控制台用户界面的库.`"],"sub_categories":["高级控制台用户界面","Advanced Console UIs","命令行","Programming","Command Line","标准 CLI","Uncategorized","\u003cspan id=\"高级控制台用户界面-advanced-console-uis\"\u003e高级控制台用户界面 Advanced Console UIs\u003c/span\u003e"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschollz%2Fprogressbar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fschollz%2Fprogressbar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschollz%2Fprogressbar/lists"}