{"id":37203394,"url":"https://github.com/pyed/pb","last_synced_at":"2026-01-14T23:27:38.052Z","repository":{"id":34299437,"uuid":"38204381","full_name":"pyed/pb","owner":"pyed","description":"Console progress bar for Golang","archived":false,"fork":true,"pushed_at":"2015-06-28T15:46:59.000Z","size":161,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-06-21T09:56:29.673Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"cheggaaa/pb","license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pyed.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-06-28T15:45:39.000Z","updated_at":"2024-06-21T09:56:29.675Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/pyed/pb","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pyed/pb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyed%2Fpb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyed%2Fpb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyed%2Fpb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyed%2Fpb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pyed","download_url":"https://codeload.github.com/pyed/pb/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyed%2Fpb/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28438192,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T22:37:52.437Z","status":"ssl_error","status_checked_at":"2026-01-14T22:37:31.496Z","response_time":107,"last_error":"SSL_read: 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-14T23:27:37.317Z","updated_at":"2026-01-14T23:27:38.037Z","avatar_url":"https://github.com/pyed.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Terminal progress bar for Go  \n\nSimple progress bar for console programms. \n    \n\n### Installation\n```\ngo get github.com/cheggaaa/pb\n```   \n\n### Usage   \n```Go\npackage main\n\nimport (\n\t\"github.com/cheggaaa/pb\"\n\t\"time\"\n)\n\nfunc main() {\n\tcount := 100000\n\tbar := pb.StartNew(count)\n\tfor i := 0; i \u003c count; i++ {\n\t\tbar.Increment()\n\t\ttime.Sleep(time.Millisecond)\n\t}\n\tbar.FinishPrint(\"The End!\")\n}\n```   \nResult will be like this:\n```\n\u003e go run test.go\n37158 / 100000 [================\u003e_______________________________] 37.16% 1m11s\n```\n\n\nMore functions?  \n```Go  \n// create bar\nbar := pb.New(count)\n\n// refresh info every second (default 200ms)\nbar.SetRefreshRate(time.Second)\n\n// show percents (by default already true)\nbar.ShowPercent = true\n\n// show bar (by default already true)\nbar.ShowBar = true\n\n// no need counters\nbar.ShowCounters = false\n\n// show \"time left\"\nbar.ShowTimeLeft = true\n\n// show average speed    \nbar.ShowSpeed = true\n\n// sets the width of the progress bar\nbar.SetWidth(80)\n\n// sets the width of the progress bar, but if terminal size smaller will be ignored\nbar.SetMaxWidth(80)\n\n// convert output to readable format (like KB, MB)     \nbar.SetUnits(pb.U_BYTES)\n\n// and start\nbar.Start()\n``` \n\nWant handle progress of io operations?    \n```Go\n// create and start bar\nbar := pb.New(myDataLen).SetUnits(pb.U_BYTES)\nbar.Start()\n\n// my io.Reader\nr := myReader\n\n// my io.Writer\nw := myWriter\n\n// create multi writer\nwriter := io.MultiWriter(w, bar)\n\n// and copy\nio.Copy(writer, r)\n\n// show example/copy/copy.go for advanced example\n\n```\n\nNot like the looks?\n```Go\nbar.Format(\"\u003c.- \u003e\")\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpyed%2Fpb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpyed%2Fpb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpyed%2Fpb/lists"}