{"id":13697528,"url":"https://github.com/adhocore/chin","last_synced_at":"2025-04-15T06:17:46.326Z","repository":{"id":62865109,"uuid":"556552709","full_name":"adhocore/chin","owner":"adhocore","description":"A Go lang library to show a spinner as user waits for any long running jobs to finish.","archived":false,"fork":false,"pushed_at":"2024-01-10T13:28:15.000Z","size":61,"stargazers_count":37,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-15T06:17:41.320Z","etag":null,"topics":["adhocore","cli","golang","spin","spinner","terminal"],"latest_commit_sha":null,"homepage":"https://github.com/adhocore/chin","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/adhocore.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},"funding":{"github":"adhocore","custom":["https://paypal.me/ji10"]}},"created_at":"2022-10-24T04:05:46.000Z","updated_at":"2025-02-11T07:06:21.000Z","dependencies_parsed_at":"2024-06-19T01:55:02.400Z","dependency_job_id":null,"html_url":"https://github.com/adhocore/chin","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adhocore%2Fchin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adhocore%2Fchin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adhocore%2Fchin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adhocore%2Fchin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adhocore","download_url":"https://codeload.github.com/adhocore/chin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249016647,"owners_count":21198833,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["adhocore","cli","golang","spin","spinner","terminal"],"created_at":"2024-08-02T18:00:59.765Z","updated_at":"2025-04-15T06:17:46.309Z","avatar_url":"https://github.com/adhocore.png","language":"Go","funding_links":["https://github.com/sponsors/adhocore","https://paypal.me/ji10","https://www.paypal.me/ji10/15usd","https://www.paypal.me/ji10/25usd","https://www.paypal.me/ji10/50usd"],"categories":["Uncategorized"],"sub_categories":["Uncategorized"],"readme":"# adhocore/chin\n\n[![Go Report](https://goreportcard.com/badge/github.com/adhocore/chin)](https://goreportcard.com/report/github.com/adhocore/chin)\n[![Lint](https://github.com/adhocore/chin/actions/workflows/lint-action.yml/badge.svg)](https://github.com/adhocore/chin/actions/workflows/lint-action.yml)\n[![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=Golang+spinner+library+for+the+terminal\u0026url=https://github.com/adhocore/chin\u0026hashtags=golang,terminal,spinner,spin)\n[![Support](https://img.shields.io/static/v1?label=Support\u0026message=%E2%9D%A4\u0026logo=GitHub)](https://github.com/sponsors/adhocore)\n\u003c!-- [![Donate 15](https://img.shields.io/badge/donate-paypal-blue.svg?style=flat-square\u0026label=donate+15)](https://www.paypal.me/ji10/15usd)\n[![Donate 25](https://img.shields.io/badge/donate-paypal-blue.svg?style=flat-square\u0026label=donate+25)](https://www.paypal.me/ji10/25usd)\n[![Donate 50](https://img.shields.io/badge/donate-paypal-blue.svg?style=flat-square\u0026label=donate+50)](https://www.paypal.me/ji10/50usd) --\u003e\n\n\nA Golang command line tool to show a spinner as you wait for some long running jobs to finish.\n\n\u003e This is a simple project but carries a tremendous value to me [❤️].\n\n## Usage\n\nInstall `chin`:\n```sh\ngo get -u github.com/adhocore/chin\n```\n\nUse in Go code with `WaitGroup`:\n\n```go\nvar wg sync.WaitGroup\n\ns := chin.New().WithWait(\u0026wg)\ngo s.Start()\n\n// invoke some long running task\n// (you can also call s.Stop() from that task)\nlongTask(\u0026wg)\n\ns.Stop()\nwg.Wait()\n```\n\u003e Refer and run working [examples](./examples/main.go) with: `go run examples/main.go`\n\n### Custom Spinner\n\nYou can choose from provided spinner sets `chin.Default`, `chin.Arrows` and `chin.Dots`:\n```go\ns := chin.New(chin.Arrows)\n// or\ns := chin.New(chin.Dots)\n\ngo s.Start()\n```\n\u003e `chin.Default` is selected by default so you don't have to specify it.\n\nYou can also define your own spinner set with delay and animation chars like so:\n```go\n// Animates 0 to 4 in a gap of 50ms:\ns := chin.New(chin.Set{50*time.Millisecond, []string{\"0\", \"1\", \"2\", \"3\", \"4\", \"3\", \"2\", \"1\"}})\ngo s.Start()\n```\n\n## Screen\n\n![CHIN](./assets/chin.gif)\n\n---\n### Other projects\nMy other golang projects you might find interesting and useful:\n\n- [**gronx**](https://github.com/adhocore/gronx) - Lightweight, fast and dependency-free Cron expression parser (due checker), task scheduler and/or daemon for Golang (tested on v1.13 and above) and standalone usage.\n- [**urlsh**](https://github.com/adhocore/urlsh) - URL shortener and bookmarker service with UI, API, Cache, Hits Counter and forwarder using postgres and redis in backend, bulma in frontend; has [web](https://urlssh.xyz) and cli client.\n- [**fast**](https://github.com/adhocore/fast) - Check your internet speed with ease and comfort right from the terminal. (It uses `adhocore/chin`.)\n- [**goic**](https://github.com/adhocore/goic) - Go Open ID Connect, is OpenID connect client library for Golang, supports the Authorization Code Flow of OpenID Connect specification.\n- [**jsonc**](https://github.com/adhocore/jsonc) - Golang JSON parser supporting comments, trailing commas and literal newlines.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadhocore%2Fchin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadhocore%2Fchin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadhocore%2Fchin/lists"}