iTranslated by AI

The content below is an AI-generated translation. This is an experimental feature, and may contain errors. View original article
🖥️

Using Private Compute Cloud from the CLI

に公開

What is Private Compute Cloud (PCC)

PCC is an AI processing service provided by Apple.
It is free to use and designed with privacy in mind.
Additionally, it uses models with a larger number of parameters compared to local Apple Intelligence.

https://machinelearning.apple.com/research/introducing-apple-foundation-models

Limitations of PCC

PCC has the following limitations:

  • Direct API access is not provided
  • Interaction with AI must be done via the Shortcuts app or Siri
  • Shortcut actions are available from iOS, macOS 26 or later
  • Requires A17 Pro or M1 chip or higher

Running Shortcuts from CLI

Although direct invocation is not possible, macOS comes standard with the /usr/bin/shortcuts command, which allows you to run shortcuts from the command line.

Basic Execution Method

shortcuts list --show-identifiers
shortcuts run <Shortcut ID>

Handling Input/Output

Since the shortcuts command does not directly support standard input/output, follow these steps:

  1. Write input data to a temporary file
  2. Specify the file with the --input-path option
  3. Specify the output destination with the --output-path option
  4. Read plaintext from the output destination

Creating a Simple Shortcut

Create a workflow that inputs and outputs simple text to PCC, as shown below.
The "Use Model" action is available from macOS 26.

https://developer.apple.com/jp/videos/play/wwdc2025/260

alt text

Implementing a CLI Tool Using ArgumentParser

You could write a shell script as is, but I created a more user-friendly CLI tool using the Swift ArgumentParser library.

PrivateComputeCloud Tool

https://github.com/noppefoxwolf/PrivateComputeCloud

This tool allows you to interact with AI using a simple command like the following:

private-compute-cloud "Your question" --shortcut-id "YOUR_SHORTCUT_ID"

This expands the possibilities, such as incorporating PCC in the middle of a command.

Discussion