npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@johnhenry/aimatey-native-apple

v0.1.7

Published

apple native backend for Aimatey

Readme

@johnhenry/aimatey-native-apple

npm version license

Note: Previously published as [email protected].

Run Aimatey against Apple's on-device Foundation Models (Apple Intelligence) — no API key, no network, no cost. Part of the aimatey monorepo.

Requirements

  • macOS 26+ with Apple Intelligence enabled (System Settings → Apple Intelligence & Siri) -- the FoundationModels framework requires macOS 26; earlier docs in this package said "macOS 15+ (Sequoia)", which was wrong (verified live against apple-foundation-models on macOS 27)
  • Node.js 18+
  • The optional native binding: npm install @johnhenry/apple-foundation-models (previously published unscoped as apple-foundation-models)

Installation

npm install @johnhenry/aimatey-native-apple @johnhenry/apple-foundation-models

Quick Start

import { Bridge } from '@johnhenry/aimatey-core';
import { OpenAIFrontendAdapter } from '@johnhenry/aimatey-frontend';
import { AppleBackend } from '@johnhenry/aimatey-native-apple';

const backend = new AppleBackend({
  maximumResponseTokens: 2048,
  temperature: 0.7,
  samplingMode: 'default',
});

// Sessions are created lazily; initialize eagerly to surface platform errors early
await backend.initialize();

const bridge = new Bridge(new OpenAIFrontendAdapter(), backend);

const response = await bridge.chat({
  model: 'default', // model name is metadata only; the system model is used
  messages: [{ role: 'user', content: 'Summarize the plot of Moby Dick in two sentences.' }],
});

console.log(response.choices[0]?.message.content);

Streaming works like any other backend:

for await (const chunk of bridge.chatStream({
  model: 'default',
  messages: [{ role: 'user', content: 'Write a haiku about tide pools.' }],
  stream: true,
})) {
  process.stdout.write(chunk.choices?.[0]?.delta?.content ?? '');
}

With the CLI

Expose the on-device model as an OpenAI-compatible server or an Ollama-style CLI (see examples/cli/apple-backend.mjs):

ai-matey proxy --backend ./apple-backend.mjs --port 3000
ai-matey emulate-ollama --backend ./apple-backend.mjs run default "Hello!"

Configuration

| Option | Type | Default | Description | |---|---|---|---| | maximumResponseTokens | number | model default | Cap on generated tokens | | temperature | number | model default | Sampling temperature | | samplingMode | 'default' \| 'greedy' | 'default' | Token sampling mode | | instructions | string | — | System-prompt-style session instructions |

Behavior notes

  • System messages are converted into session instructions.
  • Unsupported platforms fail with a descriptive error from initialize() / first request — check AppleBackend.isPlatformSupported() to branch gracefully.
  • Tool calling is not currently supported by the underlying framework.

License

MIT - see LICENSE for details.