{"id":20650029,"url":"https://github.com/kc-2001ms/swiftli","last_synced_at":"2026-02-04T17:06:03.449Z","repository":{"id":243269604,"uuid":"810048945","full_name":"KC-2001MS/SwiftLI","owner":"KC-2001MS","description":"Swift framework to easily build CLI (CUI) for command line tools","archived":false,"fork":false,"pushed_at":"2024-12-06T15:26:21.000Z","size":1763,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-21T02:26:48.219Z","etag":null,"topics":["cli","clt","cui","resultbuilder","swift","swift-argument-parser","swiftui-like"],"latest_commit_sha":null,"homepage":"https://iroiro.dev/SwiftLI/documentation/swiftli/","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KC-2001MS.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-06-04T00:24:53.000Z","updated_at":"2024-12-06T15:25:11.000Z","dependencies_parsed_at":"2024-08-06T22:32:19.045Z","dependency_job_id":"9c8106d5-04f0-4b12-a8e0-a52710c8d2fb","html_url":"https://github.com/KC-2001MS/SwiftLI","commit_stats":null,"previous_names":["kc-2001ms/swiftli"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/KC-2001MS/SwiftLI","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KC-2001MS%2FSwiftLI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KC-2001MS%2FSwiftLI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KC-2001MS%2FSwiftLI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KC-2001MS%2FSwiftLI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KC-2001MS","download_url":"https://codeload.github.com/KC-2001MS/SwiftLI/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KC-2001MS%2FSwiftLI/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29091317,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-04T03:31:03.593Z","status":"ssl_error","status_checked_at":"2026-02-04T03:29:50.742Z","response_time":62,"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":["cli","clt","cui","resultbuilder","swift","swift-argument-parser","swiftui-like"],"created_at":"2024-11-16T17:17:42.038Z","updated_at":"2026-02-04T17:06:03.432Z","avatar_url":"https://github.com/KC-2001MS.png","language":"Swift","funding_links":["https://www.buymeacoffee.com/iroiro","https://paypal.me/iroiroWork?country.x=JP\u0026locale.x=ja_JP"],"categories":[],"sub_categories":[],"readme":"# SwiftLI\nSwiftLI is a library aimed at writing command line displays in Swift in a SwiftUI-like manner, and was inspired by SwiftUI and Ignite.  \nJust as SwiftUI is a library that makes it easy to build a GUI in Swift, SwiftLI aims to make it easy to build a CLI in Swift.\n\n## Requirement\nThe following environment is required to use this library.\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/macOS-12.0+-red.svg\" /\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Swift-5.9-DE5D43.svg\" /\u003e\n    \u003ca href=\"https://twitter.com/IroIro1234work\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/Contact-@IroIro1234work-lightgrey.svg?style=flat\" alt=\"Twitter: @IroIro1234work\" /\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n## Demo\nThe library includes a command line tool that allows you to verify its operation. Please use the following method to check the command line tool along with the source code.\n### Using CMake\n1. download this project file\n2. open a terminal\n3. Type the following command\n``` sh\ncd \u003cPath to this project\u003e\nmake install\n```\n### Using Homebrew\n1. Type the following command in a terminal\n``` sh\nbrew install kc-2001ms/tap/sclt\n```\n## Usage\nYou can easily build a command line CUI by constructing your code as follows\n```swift\nimport ArgumentParser\nimport SwiftLI\n\nstruct TextCommand: ParsableCommand {\n    static var configuration = CommandConfiguration(\n        commandName: \"text\",\n        abstract: \"Display of Text structure\",\n        discussion: \"\"\"\n        Command to check the display of Text structure\n        \"\"\",\n        version: \"0.0.2\",\n        shouldDisplay: true,\n        helpNames: [.long, .short]\n    )\n    \n    mutating func run() {\n        let group = Group {\n            Text(\"Text View\")\n                .background(Color.white)\n                .forgroundColor(Color.blue)\n                .bold()\n                .newLine()\n            \n            Group {\n                Group {\n                    Text(\"Text.forgroundColor(_ color: Color)\")\n                        .forgroundColor(.red)\n                    \n                    Spacer()\n                    \n                    Text(\".red\")\n                        .fontWeight(.thin)\n                        .forgroundColor(.red)\n                }\n                .newLine()\n                \n                Group {\n                    Text(\"Text.backgroundColor(_ color: Color)\")\n                        .background(.red)\n                    \n                    Spacer()\n                    \n                    Text(\".red\")\n                        .fontWeight(.thin)\n                        .forgroundColor(.red)\n                }\n                .newLine()\n                \n                Text(\"Text.bold()\")\n                    .bold()\n                    .newLine()\n                \n                Group {\n                    Text(\"Text.bold(_ isActive: Bool)\")\n                        .bold(false)\n                    \n                    Spacer()\n                    \n                    Text(\"false\")\n                        .fontWeight(.thin)\n                        .forgroundColor(.red)\n                }\n                .newLine()\n                \n                Group {\n                    Text(\"Text.fontWeight(_ weight: Weight)\")\n                        .fontWeight(.thin)\n                    \n                    Spacer()\n                    \n                    Text(\".thin\")\n                        .fontWeight(.thin)\n                        .forgroundColor(.red)\n                }\n                .newLine()\n                \n                Text(\"Text.italic()\")\n                    .italic()\n                    .newLine()\n                \n                Group {\n                    Text(\"Text.italic(_ isActive: Bool)\")\n                        .italic(false)\n                    \n                    Spacer()\n                    \n                    Text(\"false\")\n                        .fontWeight(.thin)\n                        .forgroundColor(.red)\n                }\n                .newLine()\n                \n                Text(\"Text.underline()\")\n                    .underline()\n                    .newLine()\n                \n                Group {\n                    Text(\"Text.underline(_ isActive: Bool)\")\n                        .underline(false)\n                    \n                    Spacer()\n                    \n                    Text(\"false\")\n                        .fontWeight(.thin)\n                        .forgroundColor(.red)\n                }\n                .newLine()\n                \n                Group {\n                    Text(\"Text.blink(_ style: BlinkStyle)\")\n                        .blink(.default)\n                    \n                    Spacer()\n                    \n                    Text(\".default\")\n                        .fontWeight(.thin)\n                        .forgroundColor(.red)\n                }\n                .newLine()\n                \n                Text(\"Text.hidden()\")\n                    .hidden()\n                    .newLine()\n                \n                Group {\n                    Text(\"Text.hidden(_ isActive: Bool)\")\n                        .hidden(false)\n                    \n                    Spacer()\n                    \n                    Text(\"false\")\n                        .fontWeight(.thin)\n                        .forgroundColor(.red)\n                }\n                .newLine()\n                \n                Text(\"Text.strikethrough()\")\n                    .strikethrough()\n                    .newLine()\n                \n                Group {\n                    Text(\"Text.strikethrough(_ isActive: Bool)\")\n                        .strikethrough(false)\n                    \n                    Spacer()\n                    \n                    Text(\"false\")\n                        .fontWeight(.thin)\n                        .forgroundColor(.red)\n                }\n                .newLine()\n            }\n        }\n        \n        group.render()\n    }\n}\n```\n\u003cimg src=\"images/SwiftLI_Sample.png\" style=\"height:400px;object-fit: contain;\"\u003e\n\n## Install\nAdd the following files to the Package.swift file for use. For more information, please visit [swift.org](https://www.swift.org/documentation/package-manager/).\n``` swift\n    dependencies: [\n        // Add this code\n        .package(url: \"https://github.com/KC-2001MS/SwiftLI.git\", from: \"0.3.0\"),\n    ],\n```\n\n## Swift-DocC\nSwift-DocC is currently being implemented.\n\n[Documentation](https://kc-2001ms.github.io/SwiftLI/documentation/swiftli)\n\n## Contribution\nSee [CONTRIBUTING.md](https://github.com/KC-2001MS/SwiftLI/blob/main/CONTRIBUTING.md) if you want to make a contribution.\n\n## Licence\n[SwiftLI](https://github.com/KC-2001MS/SwiftLI/blob/main/LICENSE)\n\n## Supporting\nIf you would like to make a donation to this project, please click here. The money you give will be used to improve my programming skills and maintain the application.  \n\u003ca href=\"https://www.buymeacoffee.com/iroiro\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png\" alt=\"Buy Me A Coffee\" style=\"height: 60px !important;width: 217px !important;\" \u003e\n\u003c/a\u003e  \n[Pay by PayPal](https://paypal.me/iroiroWork?country.x=JP\u0026locale.x=ja_JP)\n\n## Author\n[Keisuke Chinone](https://github.com/KC-2001MS)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkc-2001ms%2Fswiftli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkc-2001ms%2Fswiftli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkc-2001ms%2Fswiftli/lists"}