{"id":13908765,"url":"https://github.com/JohnSundell/Xgen","last_synced_at":"2025-07-18T08:31:35.225Z","repository":{"id":56156936,"uuid":"87715349","full_name":"JohnSundell/Xgen","owner":"JohnSundell","description":"A Swift package for generating Xcode workspaces \u0026 playgrounds","archived":false,"fork":false,"pushed_at":"2020-11-23T17:32:45.000Z","size":668,"stargazers_count":193,"open_issues_count":3,"forks_count":19,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-06-22T06:35:22.730Z","etag":null,"topics":["generation","playground","swift","xcode","xcodeproj"],"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/JohnSundell.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-04-09T14:42:27.000Z","updated_at":"2025-02-11T21:55:49.000Z","dependencies_parsed_at":"2022-08-15T13:50:15.375Z","dependency_job_id":null,"html_url":"https://github.com/JohnSundell/Xgen","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/JohnSundell/Xgen","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JohnSundell%2FXgen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JohnSundell%2FXgen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JohnSundell%2FXgen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JohnSundell%2FXgen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JohnSundell","download_url":"https://codeload.github.com/JohnSundell/Xgen/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JohnSundell%2FXgen/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265728814,"owners_count":23818729,"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":["generation","playground","swift","xcode","xcodeproj"],"created_at":"2024-08-06T23:02:58.132Z","updated_at":"2025-07-18T08:31:34.808Z","avatar_url":"https://github.com/JohnSundell.png","language":"Swift","funding_links":[],"categories":["HarmonyOS","Swift"],"sub_categories":["Windows Manager"],"readme":"\u003cp align=\"center\"\u003e\r\n    \u003cimg src=\"Logo.png\" width=\"491\" max-width=\"50%\" alt=\"Xgen\" /\u003e\r\n\u003c/p\u003e\r\n\r\nEasily generate Xcode workspaces \u0026 playgrounds from a Swift script or command line tool.\r\n\r\n## Usage\r\n\r\nGenerate workspaces:\r\n\r\n```swift\r\nimport Xgen\r\n\r\nlet workspace = Workspace(path: \"~/MyWorkspace\")\r\nworkspace.addProject(at: \"~/MyProject.xcodeproj\")\r\ntry workspace.generate()\r\n```\r\n\r\nGenerate playgrounds:\r\n\r\n```swift\r\nimport Xgen\r\n\r\nlet code = \"import Foundation\\n\\n\" +\r\n           \"print(\\\"Hello world\\\")\"\r\nlet playground = Playground(path: \"~/MyPlayground\", platform: .iOS, code: code)\r\ntry playground.generate()\r\n```\r\n\r\n## Installation\r\n\r\n### For scripts\r\n\r\n- Install [Marathon](https://github.com/johnsundell/marathon).\r\n- Add Xgen to Marathon using `$ marathon add git@github.com:JohnSundell/Xgen.git`.\r\n- Alternatively, add `git@github.com:JohnSundell/Xgen.git` to your `Marathonfile`.\r\n- Write your script, then run it using `$ marathon run yourScript.swift`.\r\n\r\n### For command line tools\r\n\r\n- Add `.Package(url: \"git@github.com:johnsundell/xgen.git\", majorVersion: 1)` to your `Package.swift` file.\r\n- Update your packages using `$ swift package update`.\r\n\r\n## Help, feedback or suggestions?\r\n\r\n- [Open an issue](https://github.com/JohnSundell/Xgen/issues/new) if you need help, if you found a bug, or if you want to discuss a feature request.\r\n- [Open a PR](https://github.com/JohnSundell/Xgen/pull/new/master) if you want to make some change to Xgen.\r\n- Contact [@johnsundell on Twitter](https://twitter.com/johnsundell) for discussions, news \u0026 announcements about Xgen \u0026 other projects.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJohnSundell%2FXgen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FJohnSundell%2FXgen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJohnSundell%2FXgen/lists"}