Skip to content

Guides

Swift Packages

Stout implements the Swift Package Registry protocol (SE-0292) with Package.swift manifest serving and version listing.

Configure Your Client

Add a package dependency in your Package.swift:

// Package.swift dependency
dependencies: [
    .package(url: "https://registry.stout.io/swift/myorg/myorg.my-package", from: "1.2.0"),
]

Or configure the registry globally:

swift package-registry set https://registry.stout.io/swift/myorg

Install a Package

swift package resolve

Publish a Package

Stout builds from source. Submit a build via the API:

curl -X POST https://registry.stout.io/api/v1/builds \
  -H "Authorization: Bearer $STOUT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "format": "swift",
    "repo": "https://github.com/myorg/my-package",
    "version": "1.2.0"
  }'

Authentication

For private packages, configure credentials via swift package-registry:

swift package-registry login https://registry.stout.io/swift/myorg --token $STOUT_TOKEN

Endpoints

Method Path Description
GET /swift/:owner/:scope/:name List releases
GET /swift/:owner/:scope/:name/:version Version metadata
GET /swift/:owner/:scope/:name/:version/Package.swift Get manifest