{"id":26473767,"url":"https://github.com/greysquirr3l/spun","last_synced_at":"2026-07-02T04:31:20.484Z","repository":{"id":277996902,"uuid":"934181548","full_name":"greysquirr3l/spun","owner":"greysquirr3l","description":"Powershell Module that adds a myriad of spinners and progress bars to enhance any old boring Powershell script.","archived":false,"fork":false,"pushed_at":"2025-02-17T17:40:55.000Z","size":5366,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-19T22:17:13.008Z","etag":null,"topics":["decorators","fun","powershell","powershell-module"],"latest_commit_sha":null,"homepage":"https://github.com/greysquirr3l/spun","language":"PowerShell","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/greysquirr3l.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","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":"2025-02-17T12:08:43.000Z","updated_at":"2025-02-17T17:42:35.000Z","dependencies_parsed_at":"2025-02-17T13:24:11.606Z","dependency_job_id":"47aa5eaa-7171-4b21-8d19-cecc7679510a","html_url":"https://github.com/greysquirr3l/spun","commit_stats":null,"previous_names":["greysquirr3l/spun"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/greysquirr3l/spun","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/greysquirr3l%2Fspun","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/greysquirr3l%2Fspun/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/greysquirr3l%2Fspun/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/greysquirr3l%2Fspun/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/greysquirr3l","download_url":"https://codeload.github.com/greysquirr3l/spun/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/greysquirr3l%2Fspun/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35033488,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-02T02:00:06.368Z","response_time":173,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["decorators","fun","powershell","powershell-module"],"created_at":"2025-03-19T22:17:14.246Z","updated_at":"2026-07-02T04:31:20.398Z","avatar_url":"https://github.com/greysquirr3l.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# spun\n\nA minimalist PowerShell spinner module for displaying progress during long-running operations.\n\n## Overview\n\n**spun** provides a variety of animated progress indicators for PowerShell scripts. You can choose from:\n\n- **Simple Spinners:** Display a continuously updating icon using either \"Braille\" (default) or \"Classic\" characters.\n- **Standard Progress Bar:** Uses built-in Write-Progress.\n- **Gradient Progress Bar:** A custom progress bar with a gradient (using ANSI 256 colors).\n- **Textual Progress Bar:** A progress bar rendered as text in the format:  \n  `27% [========----------------------] 62.7s`\n\nAdditionally, the module offers styling options such as prefix/suffix text, elapsed time display, and ANSI styling (bold, underline, and foreground/background colors). You can also supply a complete theme preset via a hashtable.\n\n## Demo\n\nBelow is a rendered GIF demonstrating several of the module’s features in action:\n\n![spun Demo](render1739811188813.gif)\n\n*Note: The demo GIF shows all options sequentially, including simple spinners with styling, various progress bars (standard, gradient, textual), and theme presets.*\n\n## Installation\n\nClone the repository and import the module:\n\n```powershell\nImport-Module \"path\\to\\spun.psd1\" -Force\n```\n\nOr install from the repository if published.\n\n## Usage\n\n### Basic Example\n\n```powershell\nInvoke-SpinningActivity -Action { Start-Sleep -Seconds 5 } -Text \"Loading...\"\n```\n\n### Detailed Options\n\n#### Spinner Options:\n- **-Action**: *[scriptblock]* – The long-running action to execute.\n- **-Text**: *[string]* – Text to display alongside the spinner.\n- **-UpdateIntervalMs**: *[int]* – Milliseconds between frame updates (default: 50).\n- **-Prefix / -Suffix**: *[string]* – Optional text displayed before/after the spinner.\n- **-ShowElapsed**: *[switch]* – Display elapsed time alongside the spinner.\n- **-Bold, -Underline**: *[switch]* – Render text in bold or underlined via ANSI codes.\n- **-ForegroundColor**: *[string]* – Spinner text color.\n- **-BackgroundColor**: *[int]* – ANSI 256 background color code.\n- **-SpinnerType**: *[string]* – \"Braille\" (default) or \"Classic\" (i.e. |, /, -, \\).\n- **-SpinnerChars**: *[string[]]* – Custom spinner characters.\n- **-Theme**: *[hashtable]* – Predefined styling (keys: SpinnerChars, ForegroundColor, BackgroundColor, Prefix, Suffix, Bold, Underline).\n\n#### Progress Bar Options (used with -ProgressBar):\n- **-ProgressBar**: *[switch]* – Enable progress bar mode.\n- **-TextualProgress**: *[switch]* – Display a textual progress indicator in the format:  \n  `27% [========----------------------] 62.7s`\n- **-GradientProgress**: *[switch]* – Use a gradient for the progress bar.\n- **-BarLength**: *[int]* – Length (in characters) of the progress bar (default: 30).\n- **-CustomGradient**: *[int[]]* – An array of ANSI 256 color codes (e.g., @(160,226,46)) used for the gradient.\n\n## Supported Colors\n\nFor the **-ForegroundColor** parameter, valid values are:\n- Black  \n- DarkBlue  \n- DarkGreen  \n- DarkCyan  \n- DarkRed  \n- DarkMagenta  \n- DarkYellow  \n- Gray  \n- DarkGray  \n- Blue  \n- Green  \n- Cyan  \n- Red  \n- Magenta  \n- Yellow  \n- White  \n\n## Examples\n\n### Example 1: Simple Spinner with Styling\n\n```powershell\nInvoke-SpinningActivity -Action { Start-Sleep -Seconds 5 } `\n    -Text \"Loading...\" -Prefix \"[ \" -Suffix \" ]\" -ShowElapsed -Bold -Underline -ForegroundColor Green\n```\n\n### Example 2: Standard Progress Bar\n\n```powershell\nInvoke-SpinningActivity -Action { Start-Sleep -Seconds 5 } -Text \"Downloading files...\" -ProgressBar\n```\n\n### Example 3: Gradient Progress Bar\n\n```powershell\nInvoke-SpinningActivity -Action { Start-Sleep -Seconds 5 } -Text \"Processing data...\" `\n    -ProgressBar -GradientProgress -BarLength 30 -CustomGradient @(160,226,46)\n```\n\n### Example 4: Textual Progress Bar\n\n```powershell\nInvoke-SpinningActivity -Action { Start-Sleep -Seconds 5 } -Text \"Transferring...\" `\n    -ProgressBar -TextualProgress -BarLength 40\n```\n\n### Example 5: Using a Theme Preset\n\n```powershell\n$myTheme = @{\n    SpinnerChars    = @(\"◐\", \"◓\", \"◑\", \"◒\")\n    ForegroundColor = \"Cyan\"\n    BackgroundColor = 236\n    Prefix          = \"{ \"\n    Suffix          = \" }\"\n    Bold            = $true\n    Underline       = $false\n}\nInvoke-SpinningActivity -Action { Start-Sleep -Seconds 5 } -Text \"Applying theme...\" -Theme $myTheme\n```\n\n## Helper Functions\n\nIn addition to **Invoke-SpinningActivity**, the module also includes basic spinner functions:\n- **Start-Spinner**\n- **Stop-Spinner**\n- **Write-SpinnerText**\n\n## Development and Testing\n\n- **Tests:** Run Pester tests in the `tests` directory:\n  ```powershell\n  Invoke-Pester -Path ./tests/Invoke-SpinningActivity.Tests.ps1\n  ```\n- **Build Script:** Use the build scripts in the `build` folder to analyze, test, and validate module structure.\n- **CI:** GitHub Actions CI pipeline is configured in `.github/workflows/ci.yml`.\n\n## Changelog\n\nSee [CHANGELOG.md](./CHANGELOG.md) for version history.\n\n## License\n\nThis project is licensed under the terms in [LICENSE](./LICENSE).\n\n## Contributing\n\nPlease refer to [CONTRIBUTING.md](./CONTRIBUTING.md) for guidelines on how to contribute.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgreysquirr3l%2Fspun","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgreysquirr3l%2Fspun","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgreysquirr3l%2Fspun/lists"}