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

pi-apple-fm

v0.1.1

Published

Pi provider for Apple Foundation Models on macOS

Readme

pi-apple-fm

Apple Foundation Models provider for Pi, using macOS 27's built-in fm serve endpoint.

Models appear in Pi's existing /model picker:

  • apple-fm/system — on-device Apple Foundation Model
  • apple-fm/pcc — Apple Foundation Model on Private Cloud Compute

Requirements

  • Apple Silicon Mac
  • macOS 27 beta 4 or newer
  • Apple Intelligence enabled and model assets downloaded
  • Pi

Install

From npm:

pi install npm:pi-apple-fm

From GitHub:

pi install git:github.com/adstastic/pi-apple-fm

From a local checkout:

pi install ./pi-apple-fm

Restart Pi or run /reload.

Use

Ensure Apple's server is running:

/apple-fm

The bare command checks fm serve. If stopped, it opens fm serve in its own Terminal.app tab, bound to 127.0.0.1:1976; if already running, it reports both models' availability. Keep the server tab open. If you close it, the next model request starts a replacement. fm serve must remain the foreground process in that tab—do not append &. Pi itself can run in any terminal and connects over localhost.

Auto-start is enabled by default, so you do not need to run the command before prompting. When an Apple FM model is selected, the package checks server health in Pi's before_provider_request hook. If stopped, it launches Terminal and waits for fm serve to become healthy before sending the model request. The same check runs for post-tool model turns. Disable this behavior with /apple-fm auto-start off.

The on-device system model can use a headless server, but PCC attribution on current macOS 27 betas requires foreground execution inside Terminal.app. This package uses the Terminal path so one server supports both models.

Then open /model and select either model, or launch Pi directly:

pi --provider apple-fm --model system
pi --provider apple-fm --model pcc

Commands

| Command | Behavior | | --- | --- | | /apple-fm | Manually ensure the server is running | | /apple-fm auto-start on | Enable startup before model requests | | /apple-fm auto-start off | Disable startup before model requests | | /apple-fm auto-start status | Show the saved auto-start setting | | /apple-fm status | Check server and model availability without starting anything | | /apple-fm start | Explicitly open fm serve in Terminal.app | | /apple-fm logs | Show recent start/status actions | | /apple-fm help | Show command help inside Pi |

The auto-start preference persists in ~/.pi/agent/pi-apple-fm.json. Startup uses a one-line temporary status and transient completion notice; /apple-fm status shows detailed health on demand. Actions are appended to ~/.pi/agent/logs/pi-apple-fm.log. fm serve inference logs remain visible in its Terminal tab.

Configuration

| Environment variable | Default | Purpose | | --- | --- | --- | | APPLE_FM_PORT | 1976 | Local fm serve TCP port | | APPLE_FM_BIN | /usr/bin/fm | fm executable path |

Limits

  • system has roughly 4K context. The package keeps only the current turn, uses a compact system prompt, and exposes only bash; treat it as a stateless shell agent.
  • pcc has 32K context and uses a daily account quota. Requests leave the device for Apple's Private Cloud Compute.
  • fm serve rejects some valid JSON Schema unions. The package simplifies primitive unions and omits tools with irreducible object unions from Apple FM requests.
  • Current integration is text-only. fm image support is not yet exposed by this package.
  • fm and its API are macOS 27 beta features and may change between builds.

Server binds only to loopback. Dummy API key is local compatibility metadata; fm serve ignores it.