Repository navigation
π Release v0.2.0
Release v0.2.0 of afm-cli, a Swift CLI for interacting with macOS Apple Intelligence foundation models.
β¨ What's New
Structured JSON Output
--schema/--json-schemaβ Request structured output that conforms to a JSON Schema using Apple'sDynamicGenerationSchemaAPI- Accepts a file path (e.g.
schema.json) or an inline JSON string - Output is pretty-printed JSON matching the requested shape
- Supported schema types:
string,integer,number,boolean,object,array
Context window overflow handling
- When using
--conversation, if the combined prompt exceeds the 4096-token context limit, the CLI automatically drops the oldest messages, rebuilds the prompt from recent history, and retries. A warning is printed to stderr.
Improvements
- File input validation β Clear limits and validation for
--file: max 1 MB, UTF-8, plain text only --pre-promptβ Alias for--system-promptfor convenience
π Links
- Documentation
- License (MIT)