{"id":20058389,"url":"https://github.com/buresdv/swiftyterminalcolors","last_synced_at":"2026-05-13T09:31:34.065Z","repository":{"id":235801967,"uuid":"791284680","full_name":"buresdv/SwiftyTerminalColors","owner":"buresdv","description":"Colorize our Terminal applications the Swift way","archived":false,"fork":false,"pushed_at":"2024-04-24T15:10:42.000Z","size":9,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-02T09:45:20.492Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Swift","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/buresdv.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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,"dei":null}},"created_at":"2024-04-24T12:45:09.000Z","updated_at":"2024-12-07T18:50:34.000Z","dependencies_parsed_at":"2024-04-24T16:26:28.191Z","dependency_job_id":"6347d178-9c98-454e-86db-eac4ff033ba6","html_url":"https://github.com/buresdv/SwiftyTerminalColors","commit_stats":null,"previous_names":["buresdv/swiftyterminalcolors"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/buresdv/SwiftyTerminalColors","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buresdv%2FSwiftyTerminalColors","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buresdv%2FSwiftyTerminalColors/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buresdv%2FSwiftyTerminalColors/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buresdv%2FSwiftyTerminalColors/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/buresdv","download_url":"https://codeload.github.com/buresdv/SwiftyTerminalColors/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buresdv%2FSwiftyTerminalColors/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32976277,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T06:31:55.726Z","status":"ssl_error","status_checked_at":"2026-05-13T06:31:51.336Z","response_time":115,"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":[],"created_at":"2024-11-13T13:01:21.743Z","updated_at":"2026-05-13T09:31:34.049Z","avatar_url":"https://github.com/buresdv.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Colorize your CLIs the Swift way\n\nSwiftyTerminalColors allows you to change colors and fonts of your CLI outputs in a familiar, SwiftUI-like way.\n\n## Quick Example\n\n```swift\nprint(\"I will be bright green, bold and in italics\".color(.greenBright).font([.bold, .italic]))\n```\n\n## How to Install\n\nThe only tested way of using this package is through Xcode. To do so:\n\n1. Copy the address of this repository\n2. In Xcode, click  `File → Add Package Dependencies…`\n3. In the top right of the sheet that opens, paste the address you copied in step 1 into the field called `Search or Enter Package URL`. Xcode will find this package, called `swiftyterminalcolors`\n4. Click `Add Package`\n\nAnd it's done!\n\n## Overview\n\nThe package provides three extensions on `String`, called `.color()`, `.background()` and `.font()`. As their names suggest, `.color()` lets you change the color of a particular string, `.background()` the background, and `.font()` accepts a set of possible fonts.\n\n## Usage\n\n### Basic Usage\n\nTo change the formatting of a particular string, add `.color()`, `.background()` or `.font()` (in any order) to the end of it:\n\n```swift\nprint(\"I will be green\".color(.green))\n```\n\n```swift\nprint(\"I will be blue\".background(.blue))\n```\n\n```swift\nprint(\"I will be bold\".font([.bold, .italic]).background(.red))\n```\n\n### Advanced Usage\n\nThis package also supports formatting only portions of strings. To do so, you can use either string interpolation or concatenation.\n\n#### Interpolation\n\n```swift\nprint(\"\\(\"I will be bold\".font([.bold])) \\(\"And I will be in italics\")\".font([.italics]))\n```\n\n#### Concatenation\n\n```swift\nprint(\"I will be bold\".font([.bold]) + \" And I will be in italics\".font([.italics]))\n```\n\n### Production Usage\n\nHere is how I'm using this package in my app [RenameEverything](https://github.com/buresdv/RenameEverything) to display a colorful help:\n\n```swift\nextension String\n{\n    static let helpText: String = \"\"\"\n\\(\"\\(\"Rename\".color(.cyan))\\(\"Everything\".color(.blue))\"): A tool for randomly mass-renaming files in a folder\n\n\\(\"Usage:\".font([.bold]))\n  renameEverything [optional arguments] [folder location]\n\n\\(\"Optional Arguments:\".font([.bold]))\n  --renameType: Specify how files should be renamed\n    \\(\"Possible types:\".font([.italic]).color(.blue))\n      randomUUID: Rename files to random UUIDs\n      randomWord: Rename files to random words\n    \\(\"Example usage:\".font([.italic]).color(.blue))\n      renameEverything --renameType randomUUID [folder location]\n        \\(\"Will rename all files in the specified folder to random UUIDs\".font([.italic]))\n      renameEverything --renameType randomWord [folder location]\n        \\(\"Will rename all files in the specified folder to random English words\".font([.italic]))\n\n\\(\"Options:\".font([.bold]))\n  --help: Show this help\n\"\"\"\n}\n```\n\n![Colorful help example](https://files.catbox.moe/gyuk5v.png)\n\n## Roadmap\n\nThese features will be added in the future:\n\n- [ ] Support for RGB colors\n- [ ] Any other ideas you might have :)\n\n## License\n\nThis library is licensed under [CC BY-ND 4.0 DEED](https://creativecommons.org/licenses/by-nd/4.0/)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fburesdv%2Fswiftyterminalcolors","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fburesdv%2Fswiftyterminalcolors","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fburesdv%2Fswiftyterminalcolors/lists"}