Swift Code Generation AI Coding Tools

Tools for programmatically generating Swift source code, type-safe APIs, and domain-specific languages. Includes mock generation, schema-based code synthesis, and Swift DSLs. Does NOT include general code generation frameworks, non-Swift languages, or runtime reflection/introspection tools.

There are 54 swift code generation tools tracked. 4 score above 50 (established tier). The highest-rated is SwiftyLab/MetaCodable at 53/100 with 763 stars. 1 of the top 10 are actively maintained.

Get all 54 projects as JSON

curl "https://pt-edge.onrender.com/api/v1/datasets/quality?domain=ai-coding&subcategory=swift-code-generation&limit=20"

Open to everyone — 100 requests/day, no key needed. Get a free key for 1,000/day.

# Tool Score Tier
1 SwiftyLab/MetaCodable

Supercharge Swift's Codable implementations with macros meta-programming.

53
Established
2 WendellXY/CodableKit

A Swift macro package designed to simplify the use of Swift's Codable...

52
Established
3 DanielMSchmidt/objective-c-parser

Get the JSON representation of an Objective-C header file

52
Established
4 yonaskolb/SwagGen

OpenAPI/Swagger 3.0 Parser and Swift code generator

51
Established
5 Lighter-swift/Lighter

Swift APIs for SQLite: Type-safe down to the schema. Very, very, fast....

45
Emerging
6 andreadelfante/PredicateFlow

Write amazing, strong-typed and easy-to-read NSPredicate.

37
Emerging
7 pointfreeco/swift-enum-properties

🤝 Struct and enum data access in harmony.

35
Emerging
8 onl1ner/ios-mvp-template

🛠 A flexible and easy template created to speed up the development of your...

35
Emerging
9 RedMadRobot/service-autograph

Service generation utility.

34
Emerging
10 inquisitiveSoft/XCAssetPacker

A command line tool for converting a folder of images into an .xcasset...

34
Emerging
11 ksoichiro/rdotm

Objective-C resource definition generator like Android app's R.java.

34
Emerging
12 fernandodelrio/SwiftColorGen

A tool that generate code for Swift projects, designed to improve the...

33
Emerging
13 RedMadRobot/autograph

Swift source code generation kit.

32
Emerging
14 EmilioOjeda/Device

A representation of the running device - it could be either actual or simulated.

32
Emerging
15 0xLeif/Mocked

🛠️ Effortless Mock Generation for Swift Protocols

31
Emerging
16 rcarvalhosilva/CleanSwiftSourceryTemplate

Sourcery template to generate CleanSwift boilerplate code from use case definition

31
Emerging
17 cocoaheadsru/server

This is server side api for CocoaHeads Russia app. It was built with Swift...

31
Emerging
18 Star-Lord-PHB/swift-codable-macro

Macros for automatically generating customizable conformance to `Codable` protocol.

30
Emerging
19 truewebber/swift-protoparser

Native Swift library for parsing .proto files (proto2 & proto3) into...

29
Experimental
20 alexito4/SwiftUsing

Implementation of the `using` feature in Swift by code generation with SwiftSyntax

28
Experimental
21 RedMadRobot/synopsis

Swift source code scanner.

27
Experimental
22 WezSieTato/fastlane-plugin-sourcery

Run sourcery with fastlane! Sourcery is a code generator for Swift language,...

27
Experimental
23 DarthMike/AutoObjCBridgeable

Template to generate Swift->ObjC bridging classes for structs and enums...

26
Experimental
24 EnesKaraosman/LoremSwiftify

LoremSwiftify is a Macro that creates lorem ipsum data for your models

24
Experimental
25 atelier-socle/swift-gherkin-generator

A Swift library for composing, validating, importing, and exporting Gherkin...

22
Experimental
26 s1ddok/Sardonyx

Convert your ONNX models into Swift for TensorFlow or Metal Performance Shaders (WIP)

22
Experimental
27 lytreebot/swift-gherkin-generator

🛠️ Generate and validate Gherkin .feature files in Swift with a type-safe...

22
Experimental
28 viniciusaro/SwiftCodeGen

Swift CLI tools for generating Swift code

22
Experimental
29 MakeupStudio/CSSKit

CSS DSL written in Swift

22
Experimental
30 hassaanelgarem/GenStore-swift

A lightweight swift code generator for your images, colors and localized strings.

21
Experimental
31 IBDecodable/IBGenerate

Storyboard code generator

21
Experimental
32 chrishoste/SwiftTokenGen

Effortlessly generate code from DesignTokens. Decode Figma exports or Amazon...

20
Experimental
33 coenttb/swift-splat

Swift macro for generating convenience initializers by splatting nested...

20
Experimental
34 banghuazhao/swift-super-tiny-compiler

Swift implementation of The Super Tiny Compiler - transforms LISP syntax to...

19
Experimental
35 muhittincamdali/SwiftCodeGen

⚙️ All-in-one Swift code generator - mocks, assets, localization & DI

19
Experimental
36 RedMadRobot/parser-autograph

Object parser generation utility.

19
Experimental
37 JFej/swift-resource-generator

Programmatic Apple resource generation in Swift, starting with XCAsset...

19
Experimental
38 Filozoff/Kukulka

A framework for autogenerating values for model properties, based on Sourcery.

19
Experimental
39 illescasDaniel/Swift-Resources

Python scripts to dynamically generate variables referencing your resources....

19
Experimental
40 DuetHealth/Hexicon

Generate string definitions from code--like magic

18
Experimental
41 kremizask/AutoMake

Code generation for Swift factory functions with default parameter values

18
Experimental
42 dchprojects-zz/Viper-Template

Viper Template

18
Experimental
43 gmarson/MetaProgramming-Swift

Using sourcery to generate equatable, init and encodable codes

18
Experimental
44 Azzam-dev/SwiftyBabel

A Swift wrapper for Babel.js [not complete]

17
Experimental
45 hooliooo/CodeBuilder

Leverage Swift function builders to generate Swift code

17
Experimental
46 cpageler93/ChickGen

Swift Code Generator

17
Experimental
47 tribalworldwidelondon/CoreDataModelGenerator

A customisable utility for generating NSManagedObject subclasses for Core...

17
Experimental
48 rnystrom/BottleRocket

An experimental CLI tool for generating normalized Swift models from example...

13
Experimental
49 bocato/SourceryResources

Defines some templates for Sourcery

13
Experimental
50 rebeccajae/metal-bindgen

MPS binding code made easy!

11
Experimental
51 EmilioOjeda/AllAppleDevices

It provides the complete list of devices found in Xcode's databases

11
Experimental
52 futuredapp/Realm-Codegen

Code Generation of Realm model files in Swift using Sourcery

11
Experimental
53 li3zhen1/WithSpecializedGenericMacro

A peer macro expanding generic struct or class to a specialized type

11
Experimental
54 jonaszell97/SwiftCodegen

Code generation for common Swift patterns like Codable and Hashable conformances.

10
Experimental