{"id":18447682,"url":"https://github.com/koki-develop/v-spinner","last_synced_at":"2026-03-19T04:25:55.493Z","repository":{"id":200063244,"uuid":"704741635","full_name":"koki-develop/v-spinner","owner":"koki-develop","description":"🌀 A library for V to display customizable spinners on the command line.","archived":false,"fork":false,"pushed_at":"2023-10-14T03:31:18.000Z","size":120,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-15T20:07:40.345Z","etag":null,"topics":["v","vlang"],"latest_commit_sha":null,"homepage":"https://vpm.vlang.io/packages/koki-develop.spinner","language":"V","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/koki-develop.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-14T00:48:49.000Z","updated_at":"2024-08-24T02:13:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"5bf9d756-8370-4f65-bdaa-29b6d1476494","html_url":"https://github.com/koki-develop/v-spinner","commit_stats":null,"previous_names":["koki-develop/v-spinner"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/koki-develop/v-spinner","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koki-develop%2Fv-spinner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koki-develop%2Fv-spinner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koki-develop%2Fv-spinner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koki-develop%2Fv-spinner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/koki-develop","download_url":"https://codeload.github.com/koki-develop/v-spinner/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koki-develop%2Fv-spinner/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28732601,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-24T10:24:43.181Z","status":"ssl_error","status_checked_at":"2026-01-24T10:24:36.112Z","response_time":89,"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":["v","vlang"],"created_at":"2024-11-06T07:14:08.043Z","updated_at":"2026-01-24T17:32:21.364Z","avatar_url":"https://github.com/koki-develop.png","language":"V","readme":"# v-spinner\n\n🌀 A library for V to display customizable spinners on the command line.\n\n![](./assets/demo.gif)\n\n## Installation\n\nAdd v-spinner to the `dependencies` in your `v.mod`.\n\n```v\n// v.mod\nModule {\n\t// ...\n\tdependencies: [\n\t\t// Install from VPM\n\t\t'koki-develop.spinner'\n\t\t// To install from GitHub\n\t\t// 'https://github.com/koki-develop/v-spinner.git'\n\t]\n}\n```\n\nBy running v install in this state, v-spinner will be installed.\n\n```console\n$ v install\n```\n\n## Usage\n\nThe following program is an example of the simplest usage.\n\n```v\nmodule main\n\nimport time\n\nimport koki_develop.spinner // When installed from VPM\n// import spinner // When installed from GitHub\n\nfn main() {\n\tmut spin := spinner.new(spinner.slash_1)\n\n\tspin.start() // Display the spinner\n\ttime.sleep(3 * time.second)\n\tspin.stop()\n}\n```\n\n![](./assets/basic.gif)\n\n### Customizing the Character Set\n\nSeveral character sets are provided by v-spinner. For details, please refer to \"[Character Sets Provided by v-spinner](#character-sets-provided-by-v-spinner)\".\n\nBy passing an array of arbitrary strings to the first argument of spinner.new, you can use a custom character set.\n\n```v\nmut spin := spinner.new(['.  ', '.. ', '...'])\n```\n\n![](./assets/character_set.gif)\n\n### Setting Prefixes and Suffixes\n\nYou can customize prefixes and suffixes by setting the `prefix` and `suffix` attributes.\n\n```v\nmodule main\n\nimport time\nimport koki_develop.spinner // When installed from VPM\n// import spinner // When installed from GitHub\n\nfn main() {\n\tmut spin := spinner.new(spinner.slash_1,\n\t\tprefix: '[PREFIX] ', // optional\n\t\tsuffix: ' starting up...' // optional\n\t)\n\n\tspin.start() // Display the spinner\n\ttime.sleep(2 * time.second)\n\n\t// It's also possible to change in the middle\n\tspin.suffix = ' shutting down...'\n\n\ttime.sleep(2 * time.second)\n\tspin.stop()\n}\n```\n\n![](./assets/prefix_suffix.gif)\n\n### Setting the Speed\n\nYou can set the interval at which the spinner characters change using the `duration`.\n\n```v\nmodule main\n\nimport time\nimport koki_develop.spinner // When installed from VPM\n// import spinner // When installed from GitHub\n\nfn main() {\n\tmut spin := spinner.new(spinner.slash_1,\n\t\tduration: 500 * time.millisecond // Default is 100ms\n\t)\n\n\tspin.start() // Display the spinner\n\ttime.sleep(2 * time.second)\n\n\t// It's also possible to change in the middle\n\tspin.duration = 50 * time.millisecond\n\n\ttime.sleep(2 * time.second)\n\tspin.stop()\n}\n```\n\n![](./assets/duration.gif)\n\n## Character Sets Provided by v-spinner\n\nSeveral character sets are provided by v-spinner as constants.\n\n| Index              | Character Set                                        |\n| ------------------ | ---------------------------------------------------- |\n| `spinner.slash_1`  | `['\\|', '/', '-', '\\']`                              |\n| `spinner.circle_1` | `['◐', '◓', '◑', '◒']`                               |\n| `spinner.circle_2` | `['◴', '◷', '◶', '◵']`                               |\n| `spinner.dots_1`   | `['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏']` |\n\n## LICENSE\n\n[MIT](./LICENSE)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkoki-develop%2Fv-spinner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkoki-develop%2Fv-spinner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkoki-develop%2Fv-spinner/lists"}