{"id":13671314,"url":"https://github.com/jaywcjlove/loading-cli","last_synced_at":"2025-09-01T19:38:23.055Z","repository":{"id":46621055,"uuid":"59776103","full_name":"jaywcjlove/loading-cli","owner":"jaywcjlove","description":"Terminal loading effect.","archived":false,"fork":false,"pushed_at":"2024-01-04T12:43:12.000Z","size":93,"stargazers_count":54,"open_issues_count":3,"forks_count":6,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-29T11:58:21.321Z","etag":null,"topics":["cli","loader","loading","loading-cli","nodejs","spinner","terminal"],"latest_commit_sha":null,"homepage":"https://jaywcjlove.github.io/loading-cli","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jaywcjlove.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null},"funding":{"custom":"https://jaywcjlove.github.io/#/sponsor"}},"created_at":"2016-05-26T19:07:24.000Z","updated_at":"2024-07-21T04:43:18.000Z","dependencies_parsed_at":"2022-09-22T23:00:47.214Z","dependency_job_id":"6435bf74-8f55-4322-9f7d-c956fb49fba6","html_url":"https://github.com/jaywcjlove/loading-cli","commit_stats":{"total_commits":51,"total_committers":2,"mean_commits":25.5,"dds":0.05882352941176472,"last_synced_commit":"cd3225ff1cd528c74b0c053f918c8cad0e800a19"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaywcjlove%2Floading-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaywcjlove%2Floading-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaywcjlove%2Floading-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaywcjlove%2Floading-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jaywcjlove","download_url":"https://codeload.github.com/jaywcjlove/loading-cli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229783304,"owners_count":18123453,"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":["cli","loader","loading","loading-cli","nodejs","spinner","terminal"],"created_at":"2024-08-02T09:01:05.865Z","updated_at":"2024-12-19T07:06:48.882Z","avatar_url":"https://github.com/jaywcjlove.png","language":"JavaScript","readme":"# loading-cli\n\n[![Buy me a coffee](https://img.shields.io/badge/Buy%20me%20a%20coffee-048754?logo=buymeacoffee)](https://jaywcjlove.github.io/#/sponsor)\n[![](https://jaywcjlove.github.io/sb/ico/npm.svg)](https://www.npmjs.com/package/loading-cli)\n[![CI](https://github.com/jaywcjlove/loading-cli/actions/workflows/ci.yml/badge.svg)](https://github.com/jaywcjlove/loading-cli/actions/workflows/ci.yml)\n\nTerminal loading effect.\n\n\u003cimg height=\"26\" src=\"https://user-images.githubusercontent.com/1680273/68320716-70f33600-00fb-11ea-8a78-47b82ab28240.gif\"\u003e\n\n# Install\n\n```bash \n$ npm install --save loading-cli\n```\n\n# Usage\n\n```js \nconst loading =  require('loading-cli');\nconst load = loading(\"loading text!!\").start()\n\nsetTimeout(function(){\n    load.color = 'yellow';\n    load.text = ' Loading rainbows';\n},2000)\n\n// stop\nsetTimeout(function(){\n    load.stop()\n},3000)\n```\n\nCustom text color [colors-cli](https://github.com/jaywcjlove/colors-cli)\n\n```js\nconst color = require('colors-cli/toxic');\nconst loading = require('loading-cli');\n\nconst load = loading(\"loading text!!\".blue).start();\n// stop\nsetTimeout(function(){\n  load.stop()\n},3000)\n```\n\n# API\n\n## loading([options|text])\n\n### options \n\n```js\nload({\n  \"text\":\"loading text!!\",\n  \"color\":\"yellow\",\n  \"interval\":100,\n  \"stream\": process.stdout,\n  \"frames\":[\"◰\", \"◳\", \"◲\", \"◱\"]\n})\n```\n\n### text\n\nType: string\nText to display after the spinner.\n\n```js\nloading(\"loading text!!\")\n```\n\n## color\n\nValues:`black` `red` `green` `yellow` `blue` `magenta` `cyan` `white` `gray`   \n\n\n## frames\n\n```bash\n[\"◰\", \"◳\", \"◲\", \"◱\"]\n[\"◐\", \"◓\", \"◑\", \"◒\"]\n[\".\", \"o\", \"O\", \"°\", \"O\", \"o\", \".\"]\n[\"⊶\", \"⊷\"]\n[\"ဝ\", \"၀\"]\n[\"←\", \"↖\", \"↑\", \"↗\", \"→\", \"↘\", \"↓\", \"↙\"]\n[\"🕐 \", \"🕑 \", \"🕒 \", \"🕓 \", \"🕔 \", \"🕕 \", \"🕖 \", \"🕗 \", \"🕘 \", \"🕙 \", \"🕚 \"]\n```\n\n# Instance\n\n## .start([text])\n\nStart the spinner. Returns the instance.\n\n## .stop()\n\nStop and clear the spinner. Returns the instance.\n\n## .clear()\n\nClear the spinner. Returns the instance.\n\n## .succeed([text])\n\nStop the spinner, change it to a green `✔` and persist the current text, or text if provided. Returns the instance. See the GIF below.\n\n## .fail([text])\n\nStop the spinner, change it to a red `✖` and persist the current text, or text if provided. Returns the instance. See the GIF below.\n\n## .warn([text])\n\nStop the spinner, change it to a yellow `⚠` and persist the current text, or text if provided. Returns the instance.\n\n## .info([text])\n\nStop the spinner, change it to a blue `ℹ` and persist the current text, or text if provided. Returns the instance.\n\n## .render()\n\nManually render a new frame. Returns the instance.\n\n## .frame()\n\nGet a new frame.\n\n```js\nconst loading = require('loading-cli');\nconst load = loading(\"loading text!!\");\nload.frame([\"◰\", \"◳\", \"◲\", \"◱\"]);\nload.start();\n```\n\n## .text\n\nChange the text.\n\n## .color\n\nChange the spinner color.\n\n## Contributors\n\nAs always, thanks to our amazing contributors!\n\n\u003ca href=\"https://github.com/jaywcjlove/loading-cli/graphs/contributors\"\u003e\n  \u003cimg src=\"https://jaywcjlove.github.io/loading-cli/CONTRIBUTORS.svg\" /\u003e\n\u003c/a\u003e\n\nMade with [contributors](https://github.com/jaywcjlove/github-action-contributors).\n\n## License\n\nLicensed under the MIT License.\n","funding_links":["https://jaywcjlove.github.io/#/sponsor"],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaywcjlove%2Floading-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaywcjlove%2Floading-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaywcjlove%2Floading-cli/lists"}