Back to directory

Sourcery

A metaprogramming code generator for Swift, built on SwiftSyntax, that removes boilerplate by generating code such as mocks, equality and Codable conformances from templates.

Sourcery

Sourcery is a code generator for Swift, built on Apple's own SwiftSyntax, that extends the language with the ability to generate boilerplate code automatically from a description of the codebase. It is used across tens of thousands of iOS and macOS projects.

Common uses include generating protocol mocks and stubs, equality and hashing implementations, enum case listings and counts, lenses, persistence and advanced Codable conformance, and property-level diffing, letting a developer write an extension such as conforming a protocol to an AutoMockable marker instead of hand-writing repetitive code that stays in sync as the protocol changes.

A paid Sourcery Pro adds a Stencil template editor and live AST templates inside Xcode.

More in Code quality

See all 94
  • Critic

    critic.run

    A code-change viewer, backed by Y Combinator, built for reviewing work written by coding agents, presenting a plain-language narrative of each change alongside the diff and a running conversation with the agent.

  • GitIntel

    hoangsonww.github.io

    An MCP server that computes git repository analytics such as hotspots, churn, temporal coupling, knowledge maps and risk scoring entirely from local commit history, for AI coding agents like Claude Code and Codex.

  • Axint

    axint.ai

    A verification layer for AI coding agents working on Apple projects: it runs real Xcode builds and tests against the Swift an agent wrote, reconciles static analysis findings against that evidence, and returns a signed proof with the exact repairs still needed.