Run Apple Intelligence From Your Terminal
Ever wish you could tap into Apple's new AI smarts without needing a fancy UI or jumping through a bunch of setup hoops? What if you could just ask your terminal a question and get an answer, using the same intelligence that powers Apple's new features? That's exactly what the project apfel lets you do.
It's a clever, zero-dependency Python script that acts as a direct bridge between your command line and Apple's Private Cloud Compute (PCC) servers—the same ones that handle requests for Apple Intelligence features. No extra libraries, no complex setup. Just pure terminal magic.
What It Does
In simple terms, apfel is a command-line client for Apple's Private Cloud Compute. It sends a prompt you provide to Apple's servers and streams the AI-generated response directly back to your terminal. It mimics the network calls that official Apple apps make, allowing you to interact with Apple's on-device and server-side AI models from anywhere you have a command line.
Why It's Cool
The cleverness here is in the simplicity and the reverse engineering. The author figured out the specific API endpoints and authentication headers needed to communicate with Apple's PCC infrastructure. This isn't a third-party model wrapper; it's hitting the same service your iPhone or Mac does when you use Apple Intelligence.
The "zero dependencies" part is also a huge win. It's a single Python script that uses only the standard library (urllib, json, ssl). This means it will run almost anywhere Python is installed, without worrying about pip install or version conflicts. It's portable, transparent, and easy to dissect.
Key Use Cases:
- Quickly testing or prototyping ideas with Apple's models.
- Integrating Apple Intelligence into shell scripts or automated workflows.
- For the curious: learning how Apple's cloud AI service operates under the hood.
How to Try It
Getting started is straightforward. You'll need a Mac running macOS 15.0 (Sequoia) or later with Apple Intelligence enabled.
Grab the script: Clone the repository or download the raw
apfel.pyfile.git clone https://github.com/Arthur-Ficial/apfel.git cd apfelRun it: Execute the script with your prompt as an argument.
python3 apfel.py "Explain quantum entanglement like I'm 10 years old."