{"id":31828431,"url":"https://github.com/dfed/swift-package-generator","last_synced_at":"2025-10-11T19:48:27.079Z","repository":{"id":312635953,"uuid":"500503448","full_name":"dfed/swift-package-generator","owner":"dfed","description":"A command line tool that generates a Package.swift from distributed definition files","archived":false,"fork":false,"pushed_at":"2025-09-01T05:52:29.000Z","size":66,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-10-04T08:44:06.523Z","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/dfed.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,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-06-06T16:09:56.000Z","updated_at":"2025-09-01T21:10:34.000Z","dependencies_parsed_at":"2025-09-01T04:34:31.496Z","dependency_job_id":"3625ce5d-1b8e-48dc-a198-e7f8fd614c63","html_url":"https://github.com/dfed/swift-package-generator","commit_stats":null,"previous_names":["dfed/swift-package-generator"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/dfed/swift-package-generator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfed%2Fswift-package-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfed%2Fswift-package-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfed%2Fswift-package-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfed%2Fswift-package-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dfed","download_url":"https://codeload.github.com/dfed/swift-package-generator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfed%2Fswift-package-generator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279008441,"owners_count":26084460,"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-10-11T02:00:06.511Z","response_time":55,"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":"2025-10-11T19:48:26.114Z","updated_at":"2025-10-11T19:48:27.073Z","avatar_url":"https://github.com/dfed.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# swift-package-generator\n\n[![CI Status](https://img.shields.io/github/actions/workflow/status/dfed/swift-package-generator/ci.yml?branch=main)](https://github.com/dfed/swift-package-generator/actions?query=workflow%3ACI+branch%3Amain)\n[![codecov](https://codecov.io/gh/dfed/swift-package-generator/branch/main/graph/badge.svg?token=nZBHcZZ63F)](https://codecov.io/gh/dfed/swift-package-generator)\n[![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://spdx.org/licenses/MIT.html)\n[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fdfed%2Fswift-package-generator%2Fbadge%3Ftype%3Dswift-versions)](https://swiftpackageindex.com/dfed/swift-package-generator)\n[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fdfed%2Fswift-package-generator%2Fbadge%3Ftype%3Dplatforms)](https://swiftpackageindex.com/dfed/swift-package-generator)\n\nA command line tool that generates a Package.swift from distributed definition files.\n\n## Distributed package definition\n\nSwift Package Manager is quite powerful, but it centralizes your project’s entire definition into a single file. On a project with multiple teams, centralizing the package definition can be problematic organizationally.\n\nswift-package-generator enables distributing your proejct definition over multiple files and then stiching them back together with a single command.\n\nSwiftPackageGenerator scans your project directory for:\n\n1. **PackageDescription.swift files** - Contains package configuration arguments like `name`, `platforms`, `products`, `dependencies`, and `targets`.\n2. **Subpackage.swift files** - Contains shared utilities, extensions, and helper functions that can be reused across your package.\n\n## Getting Started\n\n### Installation\n\n#### Swift Package Manager\n\nAdd SwiftPackageGenerator as a dependency in your Package.swift:\n\n```swift\ndependencies: [\n    .package(url: \"https://github.com/dfed/swift-package-generator.git\", from: \"0.1.0\"),\n]\n```\n\n### Basic Usage\n\nRun the command line tool to generate your `Package.swift` file:\n\n```zsh\nswift run swift-generate-package\n```\n\nFor a documented list of available parameters, run:\n\n```zsh\nswift run swift-generate-package --help\n```\n\n### Example Structure\n\nThe project has an [Example](Example/) project with a [top-level package configuration](Example/PackageDescription.swift), a [shared utilities file](Example/Subpackage.swift), and two [example](Example/features/FooFeature/PackageDescription.swift) [modules](Example/libraries/BarLibrary/PackageDescription.swift):\n\n```\nMyProject/\n├── PackageDescription.swift          # Top-level package configuration\n├── Subpackage.swift                  # Shared target utilities\n├── features/\n│   └── FooFeature/\n│       ├── PackageDescription.swift  # Feature-specific targets\n│       └── Sources/\n└── libraries/\n    └── BarLibrary/\n        ├── PackageDescription.swift  # Library-specific targets\n        └── Sources/\n```\n\nYou can run the following command to generate its `Package.swift` file:\n```zsh\nswift run swift-generate-package --root-directory Example/\n```\n\n## Contributing\n\nI’m glad you’re interested in swift-package-generator, and I’d love to see where you take it. Please review the [contributing guidelines](Contributing.md) prior to submitting a Pull Request.\n\nThanks for being part of this journey, and happy packaging!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdfed%2Fswift-package-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdfed%2Fswift-package-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdfed%2Fswift-package-generator/lists"}