{"id":18308501,"url":"https://github.com/heroesofcode/cli-table-swift","last_synced_at":"2025-08-01T21:10:35.220Z","repository":{"id":245287672,"uuid":"817994091","full_name":"heroesofcode/CLI-Table-Swift","owner":"heroesofcode","description":"Build Table for command line tools for macOS written in Swift","archived":false,"fork":false,"pushed_at":"2024-09-12T02:46:38.000Z","size":698,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-16T05:07:52.928Z","etag":null,"topics":[],"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/heroesofcode.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT","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":"2024-06-20T21:54:58.000Z","updated_at":"2024-09-12T02:41:41.000Z","dependencies_parsed_at":"2024-06-21T05:57:25.662Z","dependency_job_id":"a86cfcb5-94ee-4c31-97c5-b98495b02461","html_url":"https://github.com/heroesofcode/CLI-Table-Swift","commit_stats":null,"previous_names":["heroesofcode/cli-table-swift"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/heroesofcode/CLI-Table-Swift","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heroesofcode%2FCLI-Table-Swift","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heroesofcode%2FCLI-Table-Swift/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heroesofcode%2FCLI-Table-Swift/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heroesofcode%2FCLI-Table-Swift/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/heroesofcode","download_url":"https://codeload.github.com/heroesofcode/CLI-Table-Swift/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heroesofcode%2FCLI-Table-Swift/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268297398,"owners_count":24228124,"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","status":"online","status_checked_at":"2025-08-01T02:00:08.611Z","response_time":67,"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":[],"created_at":"2024-11-05T16:08:14.554Z","updated_at":"2025-08-01T21:10:35.191Z","avatar_url":"https://github.com/heroesofcode.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"## CLI-Table-Swift\n\n[![CI](https://github.com/heroesofcode/CLI-Table-Swift/actions/workflows/CI.yml/badge.svg)](https://github.com/heroesofcode/CLI-Table-Swift/actions/workflows/CI.yml)\n[![codecov](https://codecov.io/gh/heroesofcode/CLI-Table-Swift/graph/badge.svg?token=DRwwBttVQh)](https://codecov.io/gh/heroesofcode/CLI-Table-Swift)\n![GitHub Release](https://img.shields.io/github/v/release/heroesofcode/CLI-Table-Swift)\n[![Platform Compatibility](https://img.shields.io/badge/Platforms-%20macOS%20-orange)]()\n[![GitHub License](https://img.shields.io/github/license/heroesofcode/CLI-Table-Swift)](https://github.com/heroesofcode/CLI-Table-Swift/blob/main/LICENSE)\n\nBuild Table for command line tools for macOS written in Swift\n\n\u003cimg src=\"https://github.com/heroesofcode/CLI-Table-Swift/blob/main/assets/example.gif?raw=true\"\u003e\n\n```\n┌─────────┬─────┬────────────────┐\n│ Name    │ Age │ City           │\n├─────────┼─────┼────────────────┤\n│ Matheus │ 23  │ São Paulo      │\n├─────────┼─────┼────────────────┤\n│ Alice   │ 30  │ Rio de Janeiro │\n└─────────┴─────┴────────────────┘\n```\n\n## Usage\n\nDefault with terminal color\n```swift\nimport CLITable\n\nlet headers = [\"Name\", \"Age\", \"City\"]\n        \nvar table = CLITable(headers: headers)\n\nlet rows = [\n    [\"Matheus\", \"23\", \"São Paulo\"],\n    [\"Alice\", \"30\", \"Rio de Janeiro\"]\n]\n        \ntable.addRows(rows)\ntable.showTable()\n```\nIf you prefer, you can add the row like this\n```swift\nlet headers = [\"Name\", \"Age\", \"City\"]\n        \nvar table = CLITable(headers: headers)\n        \ntable.addRow([\"Matheus\", \"23\", \"São Paulo\"])\ntable.addRow([\"Matheus\", \"23\", \"São Paulo\"])\n        \ntable.showTable()\n```\n\nTo customize the table you can add color to the line and text or just some of them\n```swift\nvar table = CLITable(headers: headers, tableColor: .blue, textColor: .green)\nvar table = CLITable(headers: headers, tableColor: .hex(\"#FF5733\"), textColor: .hex(\"#2ECC71\"))\n\nor\n\nvar table = CLITable(headers: headers, tableColor: .blue)\nvar table = CLITable(headers: headers, tableColor: .hex(\"#FF5733\"))\n\nor\n\nvar table = CLITable(headers: headers, textColor: .green)\nvar table = CLITable(headers: headers, textColor: .hex(\"#2ECC71\"))\n```\n\n## Installing\n\n```swift\ndependencies: [\n  .package(\n    url: \"https://github.com/heroesofcode/CLI-Table-Swift\",\n    from: \"1.1.0\"\n  ),\n]\n```\n\n```swift\ntargets: [\n  .target(name: \"MyApp\"),\n  .testTarget(\n    name: \"MyAppTests\",\n    dependencies: [\n      \"MyApp\",\n      .product(name: \"CLITable\", package: \"CLI-Table-Swift\"),\n    ]\n  )\n]\n```\n\n## Contributing\n\nTo contribute, just fork this project and then open a pull request, feel free to contribute, bring ideas and raise any problem in the issue tab.\n\n## License\n\nCLITable is released under the MIT license. See [LICENSE](https://github.com/heroesofcode/CLI-Table-Swift/blob/main/LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheroesofcode%2Fcli-table-swift","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fheroesofcode%2Fcli-table-swift","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheroesofcode%2Fcli-table-swift/lists"}