{"id":17928709,"url":"https://github.com/tayloraswift/swift-package-catalog","last_synced_at":"2026-04-01T17:10:53.259Z","repository":{"id":50713307,"uuid":"476509148","full_name":"tayloraswift/swift-package-catalog","owner":"tayloraswift","description":"SPM plugin for generating symbolgraphs and cataloging DocC documentation ","archived":false,"fork":false,"pushed_at":"2022-08-11T21:52:21.000Z","size":33,"stargazers_count":14,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-03-18T05:53:50.520Z","etag":null,"topics":["docc","swift","swift-package-manager","swift-package-plugin"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tayloraswift.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}},"created_at":"2022-03-31T23:25:28.000Z","updated_at":"2025-03-21T19:23:15.000Z","dependencies_parsed_at":"2022-08-26T20:00:21.220Z","dependency_job_id":null,"html_url":"https://github.com/tayloraswift/swift-package-catalog","commit_stats":null,"previous_names":["kelvin13/swift-package-catalog"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/tayloraswift/swift-package-catalog","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tayloraswift%2Fswift-package-catalog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tayloraswift%2Fswift-package-catalog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tayloraswift%2Fswift-package-catalog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tayloraswift%2Fswift-package-catalog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tayloraswift","download_url":"https://codeload.github.com/tayloraswift/swift-package-catalog/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tayloraswift%2Fswift-package-catalog/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31290538,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T13:12:26.723Z","status":"ssl_error","status_checked_at":"2026-04-01T13:12:25.102Z","response_time":53,"last_error":"SSL_read: 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":["docc","swift","swift-package-manager","swift-package-plugin"],"created_at":"2024-10-28T21:04:53.289Z","updated_at":"2026-04-01T17:10:53.242Z","avatar_url":"https://github.com/tayloraswift.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \n***`package-catalog`***\u003cbr\u003e`0.4.0`\n\n[![swift package index versions](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fkelvin13%2Fswift-package-catalog%2Fbadge%3Ftype%3Dswift-versions)](https://swiftpackageindex.com/kelvin13/swift-package-catalog)\n[![swift package index platforms](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fkelvin13%2Fswift-package-catalog%2Fbadge%3Ftype%3Dplatforms)](https://swiftpackageindex.com/kelvin13/swift-package-catalog)\n\n\n\u003c/div\u003e\n\n`catalog` is a simple but powerful Swift Package Plugin for generating symbolgraphs, collecting snippets, and detecting DocC documentation resources in a project.\n\nIt’s like `swift-docc-plugin`, but it doesn’t actually build the documentation, it only generates and locates the resources required to build the documentation using the Swift Package Manager’s symbolgraph and project scanning capabilities.\n\n`catalog` emits documentation metadata as JSON with a fairly straightforward format. Its output is designed to be easily transformed by downstream tooling that consumer, relocates, compresses, or otherwise post-processes this metadata.\n\nas of v0.4.0, `swift-package-catalog` contains two tools:\n\n1. `blame`\n2. `catalog`\n\n## getting started\n\n`catalog` is a normal Swift Package Plugin, and you can use it (like any other plugin) by adding it to your `Package.swift` dependency list:\n\n```swift \nlet package:Package = .init(name: \"example\", products: [],\n    dependencies: \n    [\n        .package(url: \"https://github.com/kelvin13/swift-package-catalog\", from: \"0.4.0\"),\n    ],\n    targets: [])\n```\n\n## running `blame`\n\n`blame` can be used to discover the direct consumers of a dependency. To use `blame`, pass it a list of target names:\n\n```bash \n$ swift package blame Atomics NIOCore\n```\n```text\ndirect consumers of Atomics:\n0. NIOEmbedded (in 'swift-nio')\n1. NIOPosix (in 'swift-nio')\n\ndirect consumers of NIOCore:\n0. NIO (in 'swift-nio')\n1. NIOEmbedded (in 'swift-nio')\n2. NIOPosix (in 'swift-nio')\n3. NIOSSL (in 'swift-nio-ssl')\n4. NIOTLS (in 'swift-nio')\n```\n\n## running `catalog`\n\nRunning `catalog` with `swift package` will output all the documentation resources it managed to find, in JSON format. Behind the scenes, it will direct the SPM to generate the relevant symbolgraphs.\n\n```\n$ swift package catalog\nBuilding for debugging...\nBuild complete! (0.08s)\nBuilding for debugging...\nBuild complete! (0.07s)\n[\n    {\n        \"catalog_tools_version\": 3,\n        \"package\": \"swift-grammar\", \n        \"modules\": \n        [\n            {\n                \"module\": \"Grammar\",\n                \"dependencies\": [],\n                \"include\": \n                [\n                    \".build/x86_64-unknown-linux-gnu/extracted-symbols/swift-grammar/Grammar\"\n                ]\n            }\n        ],\n        \"snippets\": \n        [\n        ]\n    }, \n    {\n        \"catalog_tools_version\": 3,\n        \"package\": \"swift-json\", \n        \"modules\": \n        [\n            {\n                \"module\": \"JSON\",\n                \"dependencies\": [{\"package\": \"swift-grammar\", \"modules\": [\"Grammar\"]}],\n                \"include\": \n                [\n                    \".build/x86_64-unknown-linux-gnu/extracted-symbols/swift-json/JSON\", \n                    \"Sources/JSON/JSON.docc\"\n                ]\n            }\n        ],\n        \"snippets\": \n        [\n            {\n                \"snippet\": \"LintingDictionary\",\n                \"dependencies\": \n                [\n                    {\n                        \"package\": \"swift-grammar\", \n                        \"modules\": [\"Grammar\"]\n                    }, \n                    {\n                        \"package\": \"swift-json\", \n                        \"modules\": [\"JSON\"]\n                    }\n                ],\n                \"sources\": \n                [\n                    \"Snippets/LintingDictionary.swift\"\n                ]\n            }, \n            {\n                \"snippet\": \"BasicDecoding\",\n                \"dependencies\": \n                [\n                    {\n                        \"package\": \"swift-grammar\", \n                        \"modules\": [\"Grammar\"]\n                    }, \n                    {\n                        \"package\": \"swift-json\", \n                        \"modules\": [\"JSON\"]\n                    }\n                ],\n                \"sources\": \n                [\n                    \"Snippets/BasicDecoding.swift\"\n                ]\n            }\n        ]\n    }\n]\n\n```\n\n\u003e Note: Relative paths are shown for demonstration purposes. The `catalog` plugin actually emits absolute paths.\n\nYou can filter the modules `catalog` scans by passing them as positional arguments. The order does not matter.\n\n```\n$ swift package catalog JSON \nBuilding for debugging...\nBuild complete! (0.07s)\n[\n    {\n        \"catalog_tools_version\": 3,\n        \"package\": \"swift-json\", \n        \"modules\": \n        [\n            {\n                \"module\": \"JSON\",\n                \"dependencies\": [{\"package\": \"swift-grammar\", \"modules\": [\"Grammar\"]}],\n                \"include\": \n                [\n                    \".build/x86_64-unknown-linux-gnu/extracted-symbols/swift-json/JSON\", \n                    \"sources/json.docc\"\n                ]\n            }\n        ],\n        \"snippets\": \n        [\n            ...\n        ]\n    }\n]\n```\n\nSnippets are not bound to any module, and will therefore always appear.\n\nTarget filtering is case-sensitive. \n\n```\n$ swift package catalog json\nerror: target 'json' is not a swift source module in this package\n```\n\nNote that multiple modules with the same name can occur in a dependency tree, as long as colliding modules are never combined into the same product. This means that the number of modules cataloged by this tool may be greater than the number of arguments passed to its invocation.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftayloraswift%2Fswift-package-catalog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftayloraswift%2Fswift-package-catalog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftayloraswift%2Fswift-package-catalog/lists"}