# pointfreeco/swift-case-paths

🧰 Case paths extends the key path hierarchy to enum cases.

Repository: https://github.com/pointfreeco/swift-case-paths
Canonical: https://ross.abutalabs.com/products/swift-case-paths
Homepage: https://www.pointfree.co/collections/enums-and-structs/case-paths
Language: Swift
License: MIT
License Family: permissive
Topics: swift, keypaths
Last push: 2026-09-02T22:02:21+00:00

## Health v2 (maintenance only)
Score: 96/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 100, release rhythm 88, longevity 100
- inputs: {"age_days": 2402, "days_push": 0, "days_rel": 2, "gap_med": 51.5, "n_releases_24m": 13}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1050, forks 137 (observed 2026-09-03T02:15:16.989571+00:00)

## What it is
CasePaths is a Swift library that extends the key path hierarchy to enum cases, enabling generic inspection and modification of enum case data. It is developed by Point-Free and commonly used as a building block in other Swift libraries such as the Composable Architecture.

## Use cases
- get key-path-like access to enum cases in Swift
- write generic code that reads or modifies enum case payloads
- embed and extract enum case data in SwiftUI bindings
- build composable Swift architectures that need enum case optics
- pattern-match enum cases generically in library code

## When to choose
- you write Swift libraries that need to abstract over enum cases like key paths do for properties
- you use TCA or other Point-Free libraries that rely on case paths
- you want type-safe, compiler-checked access to enum case associated values

## When to avoid
- your project does not use Swift or Apple/Swift ecosystems
- you only need simple switch statements and never need generic enum case access
- you want to avoid third-party dependencies in a small app

## Facets
- artifact type: library
- maturity: stable
- function: type-system, developer-tools
- domain: programming-languages, developer-tools, mobile-development
- platform: cross-platform
- tags: swift, enums, keypaths, functional-programming, swift-package-manager, ios, macos

## Member repositories
- pointfreeco/swift-case-paths (main) score 96

## Provenance
- Observed fields: from GitHub, fetched 2026-09-03T02:15:16.989571+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T07:00:23.750580+00:00, confidence not recorded.
  - readme: https://github.com/pointfreeco/swift-case-paths (fetched 2026-09-03T02:15:16.989571+00:00, sha 826589fc9069)
  - homepage: https://www.pointfree.co/collections/enums-and-structs/case-paths (fetched 2026-08-29T13:01:38.819524+00:00, sha b4196931b0b7)
  - site_page: https://www.pointfree.co/about (fetched 2026-08-29T13:01:38.824612+00:00, sha c3a02fbfb680)
  - site_page: https://www.pointfree.co/pricing (fetched 2026-08-29T13:01:38.822275+00:00, sha 3740f4fb1517)
- Data as of 2026-08-30T08:39:29.467469+00:00.
