Skip to content

scouzi1966/homebrew-afm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

15 Commits
Β 
Β 
Β 
Β 

Repository files navigation

Homebrew Tap for AFM

This is a Homebrew tap for AFM (Apple Foundation Models API), a macOS server that exposes Apple's Foundation Models through OpenAI-compatible API endpoints.

Latest: v0.5.6 - Security Enhancement: Localhost-Only Binding

  • πŸ”’ Localhost-Only Binding: Server now binds exclusively to localhost (127.0.0.1) for enhanced security
  • πŸ›‘οΈ Network Isolation: Prevents external network access to the AFM server
  • ✨ Zero Configuration: No additional setup required - security enabled by default

Installation

# Add the tap
brew tap scouzi1966/afm

# Install AFM
brew install afm

# Verify installation
afm --version

Requirements

  • macOS 26+ with Apple Intelligence enabled
  • Apple Silicon Mac (M1/M2/M3/M4 series)
  • Apple Intelligence enabled in System Settings β†’ Apple Intelligence & Siri

Usage

# Start server (default port 9999)
afm

# Start with custom port and verbose logging
afm --port 8080 --verbose

# Single prompt mode
afm -i "you are a pirate, speak in pirate jargon" -s "Explain quantum computing"
afm -i "you are a stubborn french speaking assistant. You only reply in french. Translate to french when necessary" -s "Write a story about Einstein"

# Pipe input support
echo "What is the meaning of life?" | afm
git log --oneline | head -5 | afm -i "summarize"

# Custom instructions
echo "Review this code" | afm -i "You are a senior software engineer"

Features

  • πŸ”— OpenAI API Compatible - Works with existing OpenAI client libraries
  • πŸ“± Apple Foundation Models - Uses Apple's on-device language models
  • πŸ”’ Privacy-First - All processing happens locally on your device
  • ⚑ Fast & Lightweight - No network calls, no API keys required
  • πŸ› οΈ Easy Integration - Drop-in replacement for OpenAI API endpoints
  • πŸ“Š Token Usage Tracking - Provides accurate token consumption metrics
  • 🚰 CLI Composability - Accepts piped input from other commands

Documentation

For complete documentation, visit: https://github.com/scouzi1966/maclocal-api

License

MIT License - see the main repository for details.

About

Homebrew tap for AFM (Apple Foundation Models API)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages