{"id":50746419,"url":"https://github.com/hasangenc0/apple-ai","last_synced_at":"2026-06-10T21:32:25.712Z","repository":{"id":352483519,"uuid":"1215283836","full_name":"hasangenc0/apple-ai","owner":"hasangenc0","description":"Use Apple’s on-device Foundation Models from the terminal.","archived":false,"fork":false,"pushed_at":"2026-04-19T19:23:45.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-04-19T21:11:36.650Z","etag":null,"topics":["apple","appleintelligence","cli","foundationmodels","on-device-ai"],"latest_commit_sha":null,"homepage":"https://developer.apple.com/documentation/FoundationModels","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hasangenc0.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-19T18:07:07.000Z","updated_at":"2026-04-19T19:29:07.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/hasangenc0/apple-ai","commit_stats":null,"previous_names":["hasangenc0/apple-ai"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/hasangenc0/apple-ai","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hasangenc0%2Fapple-ai","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hasangenc0%2Fapple-ai/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hasangenc0%2Fapple-ai/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hasangenc0%2Fapple-ai/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hasangenc0","download_url":"https://codeload.github.com/hasangenc0/apple-ai/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hasangenc0%2Fapple-ai/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34172196,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-10T02:00:07.152Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apple","appleintelligence","cli","foundationmodels","on-device-ai"],"created_at":"2026-06-10T21:32:24.924Z","updated_at":"2026-06-10T21:32:25.707Z","avatar_url":"https://github.com/hasangenc0.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# apple-ai\n\nMinimal Swift CLI that exposes Apple Foundation Models from the command line.\n\n## Features\n\n- Prompt the on-device Apple model from your terminal (`ai \"...\"`)\n- Check model readiness with actionable diagnostics (`ai --model-info`)\n- No network dependency for inference (uses on-device model)\n\n## What it does\n\nRuns prompts through `SystemLanguageModel.default` via `LanguageModelSession`:\n\n```bash\nai \"Summarize why on-device AI can improve privacy in 3 bullet points.\"\n```\n\nCheck readiness without sending a prompt:\n\n```bash\nai --model-info\n```\n\n## Requirements\n\n- macOS 26.0+\n- Apple Intelligence-capable device\n- Apple Intelligence enabled in System Settings\n- Swift 6.3+ (Xcode 26 toolchain)\n\n## Quick start\n\n```bash\nbrew tap hasangenc0/tap\nbrew install ai\n```\n\nThen choose the mode you want:\n\n- Check model readiness and setup status:\n  ```bash\n  ai --model-info\n  ```\n- Ask a single one-shot question:\n  ```bash\n  ai \"Summarize why on-device AI can improve privacy in 3 bullet points.\"\n  ```\n- Start an interactive conversation:\n  ```bash\n  ai --interactive\n  ```\n- Start interactive mode with a first message:\n  ```bash\n  ai \"What is 2+2?\" --interactive\n  ```\n\n## Build from source\n\n```bash\ngit clone https://github.com/hasangenc0/apple-ai.git\ncd apple-ai\nswift run ai --model-info\nswift run ai \"Summarize why on-device AI can improve privacy in 3 bullet points.\"\n```\n\n## Build and run (release binary)\n\n```bash\nswift build -c release\n.build/release/ai \"Summarize why on-device AI can improve privacy in 3 bullet points.\"\n```\n\nOr run directly with SwiftPM:\n\n```bash\nswift run ai \"Summarize why on-device AI can improve privacy in 3 bullet points.\"\nswift run ai --model-info\n```\n\n## Optional install as `ai`\n\n```bash\nln -sf \"$(pwd)/.build/release/ai\" /usr/local/bin/ai\n```\n\nIf `/usr/local/bin` is not in your `PATH`, add it (or symlink to another directory in your `PATH`).\n\n## CLI usage\n\n```text\nUsage:\n  ai \"\u003cprompt\u003e\"\n  ai \u003cprompt words\u003e\n  ai --model-info\n  ai --status\n  ai --interactive\n  ai -i\n  ai \"\u003cprompt\u003e\" --interactive\n```\n\n## Troubleshooting\n\nIf `ai --model-info` reports unavailable:\n\n- `appleIntelligenceNotEnabled`: turn on Apple Intelligence in System Settings\n- `modelNotReady`: keep Mac on Wi-Fi + power until model download finishes\n- `deviceNotEligible`: Apple Intelligence currently requires Apple Silicon\n\n## Contributing\n\nContributions are welcome. See [Contributing](./CONTRIBUTING.md).\n\n## Security\n\nPlease report vulnerabilities privately as described in [Security](./SECURITY.md).\n\n## License\n\n[MIT License](./LICENSE)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhasangenc0%2Fapple-ai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhasangenc0%2Fapple-ai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhasangenc0%2Fapple-ai/lists"}