{"id":17323923,"url":"https://github.com/rechsteiner/swift-ansi-picker","last_synced_at":"2025-07-26T00:09:06.790Z","repository":{"id":221848213,"uuid":"755301630","full_name":"rechsteiner/swift-ansi-picker","owner":"rechsteiner","description":"An interactive selection picker for Swift-based CLI applications.","archived":false,"fork":false,"pushed_at":"2024-02-10T13:34:05.000Z","size":12,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-26T20:57:33.348Z","etag":null,"topics":["ansi","cli","swift"],"latest_commit_sha":null,"homepage":"","language":"Swift","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/rechsteiner.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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}},"created_at":"2024-02-09T20:59:24.000Z","updated_at":"2024-11-02T04:40:11.000Z","dependencies_parsed_at":"2024-02-10T15:44:52.281Z","dependency_job_id":null,"html_url":"https://github.com/rechsteiner/swift-ansi-picker","commit_stats":null,"previous_names":["rechsteiner/swift-ansi-picker"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rechsteiner%2Fswift-ansi-picker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rechsteiner%2Fswift-ansi-picker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rechsteiner%2Fswift-ansi-picker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rechsteiner%2Fswift-ansi-picker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rechsteiner","download_url":"https://codeload.github.com/rechsteiner/swift-ansi-picker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245779444,"owners_count":20670684,"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":["ansi","cli","swift"],"created_at":"2024-10-15T14:09:34.963Z","updated_at":"2025-03-27T03:44:06.378Z","avatar_url":"https://github.com/rechsteiner.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Swift ANSI Picker\n\nThis is a simple tool for adding interactive selection to CLI\napplications, designed to use with ANSI-supported terminals. This is a\npretty small and focused package, with no third-party\ndependencies. I'm not planning on extending its functionality\nsignificantly, so if you need further customization, feel free to copy\nthe code into your project and modify it as necessary. Alternatively,\nlook into using a more feature-full package like\n[ConsoleKit](https://github.com/vapor/console-kit).\n\nhttps://github.com/rechsteiner/swift-ansi-picker/assets/1238984/94eeac6c-75c7-4c66-9410-bc6a4b14a50f\n\n## Usage\n\n### Basic usage\n\n```swift\nimport Picker\n\ntry choose([\"Apple\", \"Banana\", \"Orange\", \"Watermelon\"])\n```\n\n```\n➜ Apple\n  Banana\n  Orange\n  Watermelon\n```\n\n### Customization\n\n```swift\nvar picker = Picker()\npicker.itemIndicator = \"  ○\"\npicker.itemColor = .darkGray\npicker.selectionIndicator = \"  ●\"\npicker.selectionColor = .cyan\n\nprint(\"⏵ Choose your favorite fruit:\")\nprint(try picker.choose([\"Apple\", \"Banana\", \"Orange\", \"Watermelon\"]))\n```\n\n```\n⏵ Choose your favorite fruit:\n  ● Apple\n  ○ Banana\n  ○ Orange\n  ○ Watermelon\n```\n\n## Installation\n\nAdd swift-ansi-picker to your Package.swift file:\n\n```swift\n.package(url: \"https://github.com/rechsteiner/swift-ansi-picker.git\", .exact(from: \"0.0.1\"))\n```\n\n## Contributions\n\nWhile I'm not planning on extending its functionality significantly,\ncontributions for bug fixes and minor improvements are very\nwelcome. Please use GitHub Issues to report bugs or suggest\nenhancements.\n\n## License\n\nSwift ANSI Picker is available under the MIT license. See the\n[LICENSE](/LICENSE) file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frechsteiner%2Fswift-ansi-picker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frechsteiner%2Fswift-ansi-picker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frechsteiner%2Fswift-ansi-picker/lists"}