{"id":16844179,"url":"https://github.com/comandeer/cli-spinner","last_synced_at":"2025-11-08T12:30:37.762Z","repository":{"id":46016164,"uuid":"391423163","full_name":"Comandeer/cli-spinner","owner":"Comandeer","description":"Simple CLI spinner","archived":false,"fork":false,"pushed_at":"2023-08-02T18:16:18.000Z","size":1017,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-03T16:52:28.205Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/Comandeer.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-07-31T17:34:06.000Z","updated_at":"2023-07-28T19:43:02.000Z","dependencies_parsed_at":"2022-08-27T00:41:52.405Z","dependency_job_id":null,"html_url":"https://github.com/Comandeer/cli-spinner","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Comandeer%2Fcli-spinner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Comandeer%2Fcli-spinner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Comandeer%2Fcli-spinner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Comandeer%2Fcli-spinner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Comandeer","download_url":"https://codeload.github.com/Comandeer/cli-spinner/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239554750,"owners_count":19658275,"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":[],"created_at":"2024-10-13T12:54:52.448Z","updated_at":"2025-11-08T12:30:37.654Z","avatar_url":"https://github.com/Comandeer.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @comandeer/cli-spinner\n\n[![Build Status](https://github.com/Comandeer/cli-spinner/workflows/CI/badge.svg)](https://github.com/Comandeer/cli-spinner/actions) [![codecov](https://codecov.io/gh/Comandeer/cli-spinner/branch/main/graph/badge.svg)](https://codecov.io/gh/Comandeer/cli-spinner) [![npm (scoped)](https://img.shields.io/npm/v/@comandeer/cli-spinner.svg)](https://npmjs.com/package/@comandeer/cli-spinner)\n\nSuper simple CLI spinner.\n\n## Installation\n\n```bash\nnpm install @comandeer/cli-spinner --save\n```\n\n## Usage\n\n```javascript\nimport Spinner from '@comandeer/cli-spinner';\n\nconst spinner = new Spinner( {\n\tlabel: 'Working…'\n} );\n\nawait spinner.show();\n\n//do something\n\nawait spinner.hide();\n```\n\n## Configuration\n\nYou can configure the spinner by passing options via `options` object in the constructor:\n\n```javascript\nconst spinner = new Spinner( options );\n```\n\nThe list of available options is presented below:\n\n| Name       | Type                                                  | Default value                                                | Description                                                  |\n| ---------- | ----------------------------------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ |\n| `stdout`   | [`Stream`](https://nodejs.org/api/stream.html#stream) | [`process.stderr`](https://nodejs.org/api/process.html#processstderr) | Stream to which the spinner will be outputted.               |\n| `label`    | `string`                                              | `''`                                                         | Additional text label that will be displayed next to the spinner. |\n| `spinner`  | `Array\u003cstring\u003e`                                       | See [`src/defaultSpinner.js`](https://github.com/Comandeer/cli-spinner/blob/main/src/defaultSpinner.js) | An array containing frames that will be used to animate the spinner. |\n| `interval` | `number`                                              | 80                                                           | Indicates how often frames of the spinner should be changed. |\n\n## Why should I use it instead of x?\n\nThe truth is: you probably shouldn't. This package was created because I couldn't stand the API of [`gauge`](https://github.com/npm/gauge) and [`ora`](https://github.com/sindresorhus/ora) didn't work for me for some reason. As I have quite severe [NIH syndrome](https://en.wikipedia.org/wiki/Not_invented_here), I decided to create my own, very naive implementation of a CLI spinner.\n\nSo if you look for a battle-tested solution and don't mind more convoluted API, use `gauge`. If you prefer a battle-tested solution but with really user-friendly API, use `ora`. If for some reason these solutions don't work for you, you probably still shouldn't use this package.\n\n## License\n\nSee [LICENSE](./LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcomandeer%2Fcli-spinner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcomandeer%2Fcli-spinner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcomandeer%2Fcli-spinner/lists"}