{"id":46189772,"url":"https://github.com/tkolleh/roda.lua","last_synced_at":"2026-04-19T06:13:04.288Z","repository":{"id":341665937,"uuid":"1165802395","full_name":"tkolleh/roda.lua","owner":"tkolleh","description":"Elegant terminal spinners","archived":false,"fork":false,"pushed_at":"2026-04-05T03:17:30.000Z","size":492,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-05T03:25:48.809Z","etag":null,"topics":["ansi","cli","lua","lux","progress","spinner","terminal"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"eupl-1.2","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tkolleh.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-24T15:03:46.000Z","updated_at":"2026-04-05T02:57:29.000Z","dependencies_parsed_at":null,"dependency_job_id":"e9e13700-ada7-44fd-afba-1442a6181e56","html_url":"https://github.com/tkolleh/roda.lua","commit_stats":null,"previous_names":["tkolleh/roda.lua"],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/tkolleh/roda.lua","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkolleh%2Froda.lua","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkolleh%2Froda.lua/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkolleh%2Froda.lua/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkolleh%2Froda.lua/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tkolleh","download_url":"https://codeload.github.com/tkolleh/roda.lua/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkolleh%2Froda.lua/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31580507,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"ssl_error","status_checked_at":"2026-04-08T14:31:17.202Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["ansi","cli","lua","lux","progress","spinner","terminal"],"created_at":"2026-03-03T00:03:33.058Z","updated_at":"2026-04-19T06:13:04.278Z","avatar_url":"https://github.com/tkolleh.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Roda\n\n\u003e Elegant terminal spinners for bash scripts and Lua\n\n[![CI](https://github.com/tkolleh/roda.lua/actions/workflows/tests.yml/badge.svg)](https://github.com/tkolleh/roda.lua/actions/workflows/tests.yml)\n[![LuaRocks](https://img.shields.io/luarocks/v/tkolleh/roda)](https://luarocks.org/modules/tkolleh/roda)\n[![License: EUPL 1.2](https://img.shields.io/badge/License-EUPL--1.2-blue.svg)](https://opensource.org/licenses/EUPL-1.2)\n\n**Roda** (Portuguese for \"wheel\") is an elegant terminal spinner utility. It can be used as a standalone executable in bash scripts to show progress for long-running commands, or as a pure Lua library.\n\n## Features\n\n![Demo](./assets/demo.gif)\n*(Want to create a demo like this? Check out the [recording documentation](demo/recording-demo.md))*\n\n- **Standalone Executable** - perfect for wrapping slow commands in bash scripts\n- **16 built-in spinner styles** - dots, line, arc, bounce, and more\n- **Colorized output**     - 9 terminal colors supported\n- **Terminal states**      - succeed, fail, warn, info with symbols\n- **Dynamic text updates** - change text while spinning\n- **Highly configurable**  - intervals, colors, prefixes, suffixes\n- **Minimal dependencies** - only requires `luasystem` and `luv`\n- **Asynchronous**         - non-blocking execution\n\n## Installation\n\n### Homebrew (macOS and Linux)\n\n```bash\nbrew install tkolleh/tap/roda\n```\n\nOr tap first, then install:\n\n```bash\nbrew tap tkolleh/tap\nbrew install roda\n```\n\n### Standalone Binary (no Lua required)\n\nDownload a prebuilt binary from the [latest release](https://github.com/tkolleh/roda.lua/releases/latest). Binaries are available for **macOS ARM64**, **macOS Intel**, **Linux x86\\_64**, and **Linux ARM64**.\n\n#### macOS (Apple Silicon)\n\n```bash\ncurl -fSLO https://github.com/tkolleh/roda.lua/releases/latest/download/roda-macos-arm64.tar.gz\ncurl -fSLO https://github.com/tkolleh/roda.lua/releases/latest/download/roda-macos-arm64.tar.gz.sha256\nshasum -a 256 -c roda-macos-arm64.tar.gz.sha256\ntar xzf roda-macos-arm64.tar.gz\nchmod +x roda\nsudo mv roda /usr/local/bin/\n```\n\n#### macOS (Intel)\n\n```bash\ncurl -fSLO https://github.com/tkolleh/roda.lua/releases/latest/download/roda-macos-x86_64.tar.gz\ncurl -fSLO https://github.com/tkolleh/roda.lua/releases/latest/download/roda-macos-x86_64.tar.gz.sha256\nshasum -a 256 -c roda-macos-x86_64.tar.gz.sha256\ntar xzf roda-macos-x86_64.tar.gz\nchmod +x roda\nsudo mv roda /usr/local/bin/\n```\n\n#### Linux (x86\\_64)\n\n```bash\ncurl -fSLO https://github.com/tkolleh/roda.lua/releases/latest/download/roda-linux-x86_64.tar.gz\ncurl -fSLO https://github.com/tkolleh/roda.lua/releases/latest/download/roda-linux-x86_64.tar.gz.sha256\nshasum -a 256 -c roda-linux-x86_64.tar.gz.sha256\ntar xzf roda-linux-x86_64.tar.gz\nchmod +x roda\nsudo mv roda /usr/local/bin/\n```\n\n#### Linux (ARM64)\n\n```bash\ncurl -fSLO https://github.com/tkolleh/roda.lua/releases/latest/download/roda-linux-aarch64.tar.gz\ncurl -fSLO https://github.com/tkolleh/roda.lua/releases/latest/download/roda-linux-aarch64.tar.gz.sha256\nshasum -a 256 -c roda-linux-aarch64.tar.gz.sha256\ntar xzf roda-linux-aarch64.tar.gz\nchmod +x roda\nsudo mv roda /usr/local/bin/\n```\n\n### Lua Library\n\nIf you want to use Roda as a Lua library in your own scripts or applications:\n\n#### Using Lux (recommended)\n\n```bash\nlx add roda\n```\n\n#### Using LuaRocks\n\n```bash\nluarocks install roda\n```\n\n## Usage (CLI)\n\nUse Roda to add elegant loading indicators to your bash scripts. Simply wrap your long-running commands with `roda`:\n\n```bash\n# Basic usage\nroda --title \"Installing dependencies...\" -- npm install\n\n# Custom spinner style\nroda --title \"Waiting for database...\" --spinner \"dots2\" -- sleep 5\n\n# Show output of the command (by default output is hidden while spinning)\nroda --show-output --title \"Building project...\" -- make build\n```\n\n### CLI Options\n\n| Option | Description |\n|--------|-------------|\n| `--title TEXT` | Text to display next to the spinner |\n| `--spinner NAME` | Spinner style to use (e.g., `dots`, `line`, `arc`) |\n| `--show-output` | Display the command's stdout/stderr after it finishes |\n| `--` | Separates roda options from the command to execute |\n\n## Usage (Lua Library)\n\nRoda is compatible with Lua 5.1, 5.2, 5.3, 5.4, and LuaJIT.\n\n```lua\nlocal roda = require(\"roda\")\n\n-- Basic usage\nlocal spinner = roda(\"Loading...\"):start()\n-- do work\nspinner:succeed(\"Done!\")\n\n-- With options\nlocal spinner = roda({\n  text = \"Processing...\",\n  spinner = \"dots2\",\n  color = \"yellow\",\n})\nspinner:start()\n-- do work\nspinner:succeed()\n```\n\n### Async Command Execution\n\nRoda supports running child processes asynchronously without blocking the Lua runtime.\n\n```lua\nlocal roda = require(\"roda\")\n\nlocal spinner = roda(\"Installing dependencies...\")\n\n-- Execute a command asynchronously\nspinner:execute(\"npm\", {\"install\"})(function(exit_code, output)\n  if exit_code == 0 then\n    print(\"\\nOutput:\\n\" .. output)\n  end\nend)\n\n-- Run the event loop to wait for async tasks\nroda.run()\n```\n\n### API Reference\n\n#### `roda(opts)` / `roda.new(opts)`\n\nCreate a new spinner instance.\n\n**Parameters:**\n\n| Option | Type | Default | Description |\n|--------|------|---------|-------------|\n| `text` | `string` | `\"\"` | Text to display next to spinner |\n| `prefixText` | `string` | `\"\"` | Text before spinner |\n| `suffixText` | `string` | `\"\"` | Text after spinner text |\n| `spinner` | `string\\|table` | `\"dots\"` | Spinner style name or custom frames |\n| `color` | `string\\|boolean` | `\"cyan\"` | Spinner color, `false` to disable |\n| `interval` | `number` | varies | Milliseconds between frames |\n| `stream` | `file` | `io.stderr` | Output stream |\n| `hideCursor` | `boolean` | `true` | Hide cursor while spinning |\n| `indent` | `number` | `0` | Spaces to indent |\n\n**Returns:** `Spinner` instance\n\n#### Instance Methods\n\n- `:start(text?)` - Start the spinner. Optionally set new text.\n- `:stop()` - Stop and clear the spinner from the terminal.\n- `:succeed(text?)` - Stop with green checkmark.\n- `:fail(text?)` - Stop with red X.\n- `:warn(text?)` - Stop with yellow warning.\n- `:info(text?)` - Stop with blue info.\n- `:spin()` - Render next frame. Call this in a loop for manual animation control.\n- `:setText(text)` - Update spinner text while spinning.\n- `:setColor(color)` - Change spinner color.\n- `:isSpinning()` - Check if spinner is currently active.\n- `:stopAndPersist(opts)` - Stop with custom symbol and text.\n- `:execute(command, args)` - Execute a child process asynchronously while spinning. Returns a Thunk that expects an `on_complete` callback.\n\n#### Module Methods\n\n- `roda.run()` - Run the libuv event loop. Blocks until all async tasks finish.\n\n## License\n\nEUPL-1.2 (c) TJ Kolleh\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftkolleh%2Froda.lua","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftkolleh%2Froda.lua","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftkolleh%2Froda.lua/lists"}