JevSwiftSDK
Unofficial dependency-free Swift SDK for Jev with typed Choice questions over Swift enums, async/await, batching and retries.
Overview
JevSwiftSDK is a dependency-free Swift package implementing TypeSafe's System One HTTP API. Questions are typed: a ChoiceQuestion can be declared over a Swift enum with criteria for each case, and evaluate() returns the chosen enum value with confidence, probabilities, the model name and token usage. It uses async/await with Swift 6 concurrency checking and supports batching and retries according to its listing.
It targets iOS 15+, macOS 12+ and Linux with FoundationNetworking, and is installed via Swift Package Manager from GitHub. Configuration takes an explicit API key, or opts into reading TYPESAFE_API_KEY, base URL and default model from the environment for servers and command-line tools; the README recommends using it from servers or trusted CLIs rather than shipping keys in apps. It is independent and unofficial. It suits Swift developers wanting typed Jev decisions in server-side Swift or tools.
What the decision model decides
| Type | Question | Answers |
|---|---|---|
| Choice | Which team should handle this ticket? | billing · technical · other |
How it works
- Create a JevConfiguration with a key or from the environment
- Declare typed questions over Swift enums
- Call client.evaluate(state:question:)
- Use the typed answer, confidence and probabilities in code
Strengths
- Compile-time typed answers via enums
- No dependencies
- Linux support for server-side Swift
Caveats
- Unofficial and no tagged release yet
- Requires Swift 6
- Keys should not be embedded in client apps
Getting started
Add .package(url: "https://github.com/NSStudent/JevSwiftSDK.git", branch: "main") to Package.swift.At a glance
- Type
- Library
- Status
- beta
- Language
- Swift
- Runtime
- Swift package (iOS, macOS, Linux)
- Has code
- yes
Use cases and integrations
How curated lists describe it
An independent, type-safe Swift SDK for TypeSafe Jev, with async/await, batching, retries, and SPM support.
hellogumbo/awesome-jev
Frequently asked questions
Is it official?
No, it is an independent SDK implementing the public API.
Can I use it in an iOS app?
It supports iOS 15+, but the README places examples in servers or trusted tools to protect the key.
How are answers typed?
Choice questions are declared over Swift enums, so the answer is an enum value.
Related projects
Hack Club's lightweight LLM proxy, listed for adding a Jev forwarding endpoint behind its auth, limits and usage logging.
MCP serverproductionTypeScriptAx, a DSPy-style multi-language LLM framework, listed with a native TypeSafe provider for Boolean, Choice, Score and raw Jev questions.
PluginproductionTypeScriptEffect TypeScript library whose @effect/ai-typesafe package maps classify, probability and rating operations to Jev questions.
ProjectproductionTypeScriptPHP monorepo whose Polyglot module adds a TypeSafe driver for typed Noul, Choice and Score decisions alongside LLM inference.
ProjectproductionPHPGo MCP server giving any client typed Jev decisions via OpenRouter or TypeSafe, with validated answers and no paid retries.
MCP serverproductionGoSimon Willison's LLM plugin that adds Jev as a model for yes/no, choice and score questions from the command line.
PluginproductionPython