🍺 BREW Explorer

← all formulae

sourcery

brew install sourcery v2.3.0_1 MIT

Swift code generator that parses source files and generates boilerplate code using Stencil templates.

Why you might care

Eliminates repetitive Swift code (equatable conformance, mocking, serialization) by parsing your types and auto-generating implementations via templates. Integrates into build pipelines and iOS/macOS projects to reduce manual work and keep generated code in sync with source changes. Essential for teams doing heavy meta-programming in Swift.

Categories

Alternatives

SwiftGen Mint SwiftSyntax
6.5k
30-day installs · #486
19.5k
90-day · #533
63.6k
365-day · #569
8.0k
★ GitHub stars · updated 9d ago

GitHub topics

code-generation codegen codegenerator ios metaprogramming swift templates

Links

Blurb generated by claude-haiku-4-5 on today.

Raw metadata
{
  "aliases": [],
  "alternatives": [
    "SwiftGen",
    "Mint",
    "SwiftSyntax"
  ],
  "build_dependencies": [],
  "categories": [
    "code-generation",
    "build-system",
    "parser"
  ],
  "caveats": null,
  "conflicts_with": [],
  "dependencies": [],
  "deprecated": 0,
  "deprecation_reason": null,
  "desc": "Meta-programming for Swift, stop writing boilerplate code",
  "disable_reason": null,
  "disabled": 0,
  "enrichment_fetched_at": "2026-06-20T23:40:54+00:00",
  "first_seen": "2026-06-20T23:34:18+00:00",
  "full_name": "sourcery",
  "github_default_branch": "master",
  "github_last_commit_at": "2026-06-11T10:26:55Z",
  "github_readme_excerpt": "[![macOS 13](https://github.com/krzysztofzablocki/Sourcery/actions/workflows/test_macOS.yml/badge.svg)](https://github.com/krzysztofzablocki/Sourcery/actions/workflows/test_macOS.yml)\n[![ubuntu x86_64](https://github.com/krzysztofzablocki/Sourcery/actions/workflows/test_ubuntu.yml/badge.svg?branch=master)](https://github.com/krzysztofzablocki/Sourcery/actions/workflows/test_ubuntu.yml)\n\u003c!-- [![codecov](https://codecov.io/gh/krzysztofzablocki/Sourcery/branch/master/graph/badge.svg)](https://codecov.io/gh/krzysztofzablocki/Sourcery) --\u003e\n[![docs](https://krzysztofzablocki.github.io/Sourcery/badge.svg)](https://krzysztofzablocki.github.io/Sourcery/index.html)\n[![Version](https://img.shields.io/cocoapods/v/Sourcery.svg?style=flat)](http://cocoapods.org/pods/Sourcery)\n[![License](https://img.shields.io/cocoapods/l/Sourcery.svg?style=flat)](http://cocoapods.org/pods/Sourcery)\n[![Platform](https://img.shields.io/cocoapods/p/Sourcery.svg?style=flat)](http://cocoapods.org/pods/Sourcery)\n\n[**In-Depth Sourcery guide is covered as part of my SwiftyStack engineering course.**](https://www.swiftystack.com/)\n\n**Sourcery Pro provides a powerful Stencil editor and extends Xcode with the ability to handle live AST templates: [available on Mac App Store](https://apps.apple.com/us/app/sourcery-pro/id1561780836?mt=12)**\n\nhttps://user-images.githubusercontent.com/1468993/114271090-f6c19200-9a0f-11eb-9bd8-d7bb15129eb2.mp4\n\n[Learn more about Sourcery Pro](http://merowing.info/sourcery-pro/)\n\n\u003cimg src=\"Resources/icon-128.png\"\u003e\n\n**Sourcery** is a code generator for Swift language, built on top of Apple\u0027s own SwiftSyntax. It extends the language abstractions to allow you to generate boilerplate code automatically.\n\nIt\u0027s used in over 40,000 projects on both iOS and macOS and it powers some of the most popular and critically-acclaimed apps you have used (including Airbnb, Bumble, New York Times). Its massive community adoption was one of the factors that pushed Apple to implement derived Equalit",
  "github_repo": "krzysztofzablocki/Sourcery",
  "github_stars": 8009,
  "github_topics": [
    "code-generation",
    "codegen",
    "codegenerator",
    "ios",
    "metaprogramming",
    "swift",
    "templates"
  ],
  "homepage": "https://github.com/krzysztofzablocki/Sourcery",
  "homepage_og_description": null,
  "homepage_og_image": null,
  "homepage_title": null,
  "installs_30d": 6548,
  "installs_365d": 63610,
  "installs_90d": 19546,
  "keg_only": 0,
  "keg_only_reason": null,
  "last_seen": "2026-06-20T23:34:18+00:00",
  "license": "MIT",
  "llm_generated_at": "2026-06-20T23:45:10+00:00",
  "llm_model": "claude-haiku-4-5",
  "name": "sourcery",
  "oldnames": [],
  "one_liner": "Swift code generator that parses source files and generates boilerplate code using Stencil templates.",
  "optional_dependencies": [],
  "rank_30d": 486,
  "rank_365d": 569,
  "rank_90d": 533,
  "raw_hash": "6b2d3f4c483eecd9",
  "recommended_dependencies": [],
  "revision": 1,
  "ruby_source_path": "Formula/s/sourcery.rb",
  "tap": "homebrew/core",
  "test_dependencies": [],
  "uses_from_macos": [
    {
      "ruby": "build"
    },
    {
      "swift": "build"
    },
    "curl",
    "libxml2",
    "ncurses",
    "sqlite",
    "swift"
  ],
  "version_head": "HEAD",
  "version_stable": "2.3.0",
  "versioned_formulae": [],
  "why_use_this": "Eliminates repetitive Swift code (equatable conformance, mocking, serialization) by parsing your types and auto-generating implementations via templates. Integrates into build pipelines and iOS/macOS projects to reduce manual work and keep generated code in sync with source changes. Essential for teams doing heavy meta-programming in Swift."
}