codybrom

codybrom / afm-ts-sdk

Public

TypeScript/Node.js bindings for Apple's on-device Foundation Models (macOS 26+ only)

16
0
100% credibility
Found Mar 10, 2026 at 15 stars -- GitGems finds repos before they trend. Get early access to the next one.
Sign Up Free
AI Analysis
TypeScript
AI Summary

TypeScript/Node.js SDK for on-device Apple Intelligence inference using Apple's Foundation Models framework, supporting streaming text generation, structured outputs, tool calling, and transcript persistence without network or API requirements.

How It Works

1
🔍 Discover the AI Kit

You hear about this simple kit that lets your JavaScript apps on Mac use Apple's built-in smart AI for generating text and ideas right on your device.

2
Prepare Your Mac

Check that your Mac has the latest updates and Apple Intelligence turned on in the settings so everything works smoothly.

3
📦 Add the Kit

Bring the kit into your project with a quick install, no extra software needed beyond what's already on your Mac.

4
🤖 Create Your AI Helper

Set up a friendly AI assistant that checks if it's ready and waits patiently until it can start helping.

5
💬 Begin Chatting

Give your assistant some personality instructions and start asking questions or giving tasks.

6
Receive Clever Responses

Get instant, streaming replies, structured information, or help from custom tools, all happening privately on your Mac.

🎉 Unlock On-Device Magic

Your app now delivers smart, offline AI results that feel powerful and keep your data safe at home.

Sign up to see the full architecture

5 more

Sign Up Free

Star Growth

See how this repo grew from 15 to 16 stars Sign Up Free
Repurpose This Repo

Repurpose is a Pro feature

Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.

Unlock Repurpose
AI-Generated Review

What is afm-ts-sdk?

afm-ts-sdk is a TypeScript/Node.js SDK that brings Apple's on-device Foundation Models to your macOS 26+ Apple Silicon machine, letting you run local AI inference straight from Node.js scripts or servers—no API keys, cloud costs, or extra gateways needed. Install via npm, import the model and session classes, and start generating text, structured JSON, or tool calls with a few lines. It's perfect for typescript node js github projects wanting clean architecture node js typescript github setups without offloading to remote services.

Why is it gaining traction?

It stands out by wrapping Apple's AFM bindings for seamless on-device access in Node.js typescript projects github, supporting streaming responses, guided schemas for typed outputs, tool calling, and session transcripts—all in a lightweight package with prebuilt binaries. Developers dig the no-Xcode quickstart and runnable examples like node js typescript example github for basic prompts or rest apis. Compared to Python alternatives or cloud LLMs, it delivers private, instant inference on macOS 26+ only hardware.

Who should use this?

Node.js TypeScript devs on macOS 26+ Apple Silicon building local AI tools, like desktop apps with on-device chat, node js typescript rest api github backends for structured data extraction, or node js typescript boilerplate github prototypes testing tool calling. Ideal for macOS script writers needing node js express typescript github services with low-latency generation, not remote teams or non-Apple setups.

Verdict

Early but promising at 12 stars and 1.0% credibility—solid docs, Vitest coverage, and Apache 2.0 license make it worth a spin for compatible devs. Try the examples if you're on macOS 26+; skip if waiting for broader adoption or multi-platform support.

(178 words)

Sign up to read the full AI review Sign Up Free

Similar repos coming soon.