Sourcery Pro

Popular Use-Cases
🎭 Mock Generation
Create mock implementations from selected types instantly
📦 Codable Support
Add Codable support to enums with associated values
🏗️ TCA Boilerplate
Kickstart your Composable Architecture boilerplate
🧪 Test Generation
Generate property level tests and test specs
🎨 SwiftUI Views
Generate SwiftUI views from your structs
🔍 Prisms & Lenses
Create functional programming patterns for your data
Powerful Template Editor
It comes bundled with 14 starting templates and features a powerful Template editor with code completion, inline documentation, and a built-in error checker/linter that makes writing your custom automation a breeze.
Battle-Tested Foundation
Built on top of my Sourcery tool that is used in over 40,000 Swift apps, including products like Airbnb, Bumble, and The New York Times.
It saved those apps millions of dollars in development time, and now you can save both your time and regain some of the sanity by stopping to write the same code over and over again. How much is your time worth?
This app is the culmination of 5 years of work and thousands of development hours—it’s simply the most powerful Xcode extension ever created.
Key Features
Xcode Integration

The app provides an Xcode Source extension that lets you run templates against the code in your projects.
Editor Capabilities
Writing Templates
Sourcery Pro adds additional functionality on top of regular Stencil:
{% typed variable as MyType %}lets you add type information to macros—simply declare it after defining your macro and Sourcery Pro will start providing you with all type information for yourvariable{% newline %}ends whitespace trimming in the template and adds an extra empty line
Frequently Asked Questions
Sourcery Pro extension doesn’t appear in my editor
This can happen if you have multiple Xcode instances or other non-standard setup. Follow this guide on how to fix it using PluginKit.
My templates don’t appear in Xcode
When you add/remove templates you need to restart Xcode—it’s a limitation of Xcode Source Extensions. Also make sure that you marked Templates as available in Xcode (default). You can right-click on a template in the list to see other options.
How do I share templates?
You have two easy options:
- Right-click on the template list to see the context menu
- Or just drag & drop templates from/to the list

Where can I report feedback or ask questions?
Please use the Feedback repository for questions, feedback, and discussions.
Ready to boost your productivity?
Even if you never heard of Sourcery, you’ll have no problem creating your own templates.
Get Started with Sourcery Pro