Skip to content
/ spm-template Public template

An opinionated Swift Package template with CI, SPI config, AI agent instructions, PR templates, and code formatting

License

Notifications You must be signed in to change notification settings

ajevans99/spm-template

Repository files navigation

spm-template

CI

A minimal Swift Package template targeting Swift 6.0+ with modern Swift Testing, CI for Linux/macOS/iOS, SPI config, and swift-format.

Tip

The app branch contains an Xcode project template in AppTemplate/ for creating iOS/macOS apps that links against the package in Sources/SPMTemplate/ and has CI to build apps.

Usage

Add this package as a dependency, then:

import SPMTemplate

let greeter = SPMTemplate()
print(greeter.greet(name: "World"))

Development

  • Format code with make format
  • Lint with make lint
  • Run tests: swift test

License

MIT. See LICENSE.

Template Renaming

To quickly rename this template to your own package/target names:

  1. Open .github/prompts/rename-swift-template.prompt.md.
  2. Provide inputs:
    • oldName: current module identifier (default: SPMTemplate)
    • newPackageName: your package in kebab-case (e.g. swift-my-library)
    • newTargetName: your primary module in PascalCase (e.g. MyLibrary)
  3. Run the prompt with your AI assistant.

About

An opinionated Swift Package template with CI, SPI config, AI agent instructions, PR templates, and code formatting

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •