apfel ഒരു പ്രോജക്റ്റ് ആണ്.

ട്യൂട്ടോറിയൽ · 2026 നവംബർ 15-ന് പരീക്ഷിച്ചത്

apfel AI ട്യൂട്ടോറിയൽ

നിങ്ങളുടെ Mac-ൽ ഇതിനകമുള്ള AI-യിൽ നിന്ന് 60 സെക്കൻഡിൽ ആദ്യ ഉത്തരം. പിന്നെ അത് നന്നായി ചെയ്യുന്ന 11 ജോലികൾ, ഓരോന്നും യഥാർത്ഥ output സഹിതം copy-paste ചെയ്യാൻ റെഡി, ഒപ്പം അതിന് ചെയ്യാൻ കഴിയാത്ത കാര്യങ്ങളുടെ സത്യസന്ധമായ ഒരു പട്ടികയും.

ഒന്നും edit ചെയ്യാത്ത യഥാർത്ഥ terminal recording: macOS 27.0.1-ൽ apfel 1.18.0, MacBook Air M2.
ഈ പേജിൽ: 15 ഭാഗങ്ങൾ
  1. 60 സെക്കൻഡിൽ നിങ്ങളുടെ ആദ്യ ഉത്തരം
  2. 1. നിങ്ങളുടെ Mac-നോട് അതിനെക്കുറിച്ചുതന്നെ ചോദിക്കൂ
  3. 2. Copy ചെയ്ത ഏത് text-ഉം തിരുത്തൂ
  4. 3. Receipts, PDFs, scripts വായിക്കൂ
  5. 4. സാധാരണ ഇംഗ്ലീഷിനെ shell command ആക്കൂ
  6. 5. നിങ്ങളുടെ scripts-ന് വിശ്വസിക്കാവുന്ന JSON നേടൂ
  7. 6. നിങ്ങളുടെ ദിവസം automate ചെയ്യൂ: git, ശബ്ദം, റെഡിമെയ്ഡ് scripts
  8. 7. നിങ്ങളുടെ OpenAI code സൗജന്യമായി run ചെയ്യൂ
  9. 8. MCP വഴി tools നൽകൂ
  10. 9. ഒരു prompt പരീക്ഷിക്കാൻ chat ചെയ്യൂ
  11. 10. Server background-ൽ എപ്പോഴും run ചെയ്യട്ടെ
  12. 11. apfel-ന് മുകളിൽ നിർമ്മിച്ച apps
  13. പരിമിതികളും സത്യസന്ധമായ ഉത്തരങ്ങളും
  14. എന്തെങ്കിലും പരാജയപ്പെടുമ്പോൾ
  15. ഇത് ആര് ഉണ്ടാക്കി, എങ്ങനെ പരീക്ഷിച്ചു

60 സെക്കൻഡിൽ നിങ്ങളുടെ ആദ്യ ഉത്തരം

നിങ്ങൾക്ക് വേണ്ടത് macOS 26 Tahoe-യോ അതിനു ശേഷമുള്ള version-ഓ ഉള്ള ഒരു Apple Silicon Mac (M1 അല്ലെങ്കിൽ അതിലും പുതിയത്), ഒപ്പം System Settings > Apple Intelligence & Siri-ൽ Apple Intelligence ഓൺ ആയിരിക്കണം. ആദ്യത്തെ രണ്ടെണ്ണം ഒറ്റ വരിയിൽ പരിശോധിക്കാം:

Terminal
sw_vers -productVersion && uname -m
27.0.1
arm64

Version 26 അല്ലെങ്കിൽ അതിനു മുകളിലും, ഒപ്പം arm64-ഉം ആണെങ്കിൽ നിങ്ങൾ റെഡി. Homebrew വഴി apfel install ചെയ്യൂ. Xcode വേണ്ട, account വേണ്ട, API key വേണ്ട:

Terminal
brew install apfel

നിങ്ങളുടെ ആദ്യ ചോദ്യം ചോദിക്കൂ:

Terminal
apfel "In one sentence: what can a small on-device language model do for me?"
A small on-device language model can help you perform tasks like text translation, summarization, and data analysis directly on your device.

ആ ഉത്തരം വന്നത് നിങ്ങളുടെ Mac-ലെ Apple-ന്റെ model-ൽ നിന്നാണ്. ഒന്നും ഒരു server-ലേക്കും അയച്ചില്ല, ഒരു പൈസ പോലും ചെലവായതുമില്ല.

പ്രവർത്തിച്ചില്ലെങ്കിൽ: model റെഡിയാണോ എന്ന് apfel-നോട് ചോദിക്കൂ:

Terminal
apfel --model-info | grep -E 'available|context'
├ available:  yes
├ context:    4096 tokens

available: no എന്നാണ് കാണിക്കുന്നതെങ്കിൽ System Settings-ൽ Apple Intelligence ഓൺ ചെയ്ത് model download പൂർത്തിയാകുന്നതുവരെ കാത്തിരിക്കൂ (install guide പ്രകാരം അത് 3 മുതൽ 4 GB വരെയാണ്). നിങ്ങളുടെ Mac-ന്റെ ഭാഷയും Siri-യുടെ ഭാഷയും support ചെയ്യുന്ന ഒരേ ഭാഷ ആയിരിക്കണം. Model ലഭ്യമല്ലാത്തപ്പോൾ apfel exit code 5 നൽകി നിൽക്കും.

അടുത്തത്: താഴെയുള്ള ജോലികൾ. ഓരോന്നും തുടങ്ങുന്നത് രണ്ട് മിനിറ്റിനുശേഷം നിങ്ങളുടെ കൈയിൽ എന്തുണ്ടാകും എന്ന് പറഞ്ഞുകൊണ്ടാണ്.

1. നിങ്ങളുടെ Mac-നോട് അതിനെക്കുറിച്ചുതന്നെ ചോദിക്കൂ

2 മിനിറ്റിൽ നിങ്ങൾക്ക് കിട്ടുന്നത്: നിങ്ങളുടെ disk, CPU, memory എന്നിവയെക്കുറിച്ച് ലളിതമായ ഭാഷയിലുള്ള ഉത്തരങ്ങൾ, നിങ്ങൾക്ക് ഇതിനകം അറിയാവുന്ന commands-ൽ നിന്ന് നേരിട്ട്.

സാഹചര്യം: ഒരു terminal command അക്കങ്ങളുടെ ഒരു കൂമ്പാരം തന്നെ print ചെയ്യുമ്പോൾ, ആവശ്യം: ഒറ്റ വരിയിൽ ഒരു ഉത്തരം, അതുവഴി man page വായിക്കാതെ തന്നെ കാര്യം ചെയ്യാം.

ഏത് command-ഉം apfel-ലേക്ക് pipe ചെയ്ത് നിങ്ങൾക്ക് അറിയേണ്ടത് എന്താണെന്ന് പറയൂ:

Terminal
df -h | apfel "which volume is fullest, one sentence"
/dev/disk3s1 is the fullest volume, with 630Gi used.
Terminal
ps aux | sort -k 3 -nr | head -5 | awk '{print $11, $3"%"}' | apfel "which app is using the most CPU, one sentence"
`/System/Library/CoreServices/RemoteManagement/screensharingd.bundle/Contents/MacOS/screensharingd` is using the most CPU.

Input ചെറുതാക്കി വയ്ക്കൂ: ആദ്യം head, awk, grep, പിന്നെ apfel. Model-ന് ഒരു സമയം ഏതാനും ആയിരം വാക്കുകൾ മാത്രമേ വായിക്കാൻ കഴിയൂ, code ആണെങ്കിൽ അതിലും കുറവ് (പരിമിതികൾ കാണുക).

പ്രവർത്തിച്ചില്ലെങ്കിൽ: ചില commands stderr-ലേക്കാണ് എഴുതുന്നത്, അത് pipe കൊണ്ടുപോകില്ല. apfel അത് നിങ്ങളോട് പറയും: piped input was empty - if the command prints to stderr, try: command 2>&1 | apfel.

അടുത്തത്: ഇതേ വിദ്യ git log, lsof, pmset -g batt, log files, text print ചെയ്യുന്ന മറ്റെന്തിനും പ്രവർത്തിക്കും.

2. Copy ചെയ്ത ഏത് text-ഉം തിരുത്തൂ

2 മിനിറ്റിൽ നിങ്ങൾക്ക് കിട്ടുന്നത്: ഏത് app-ലായാലും clipboard-ലുള്ള text-ന്റെ grammar തിരുത്തുന്ന ഒരു command.

സാഹചര്യം: Slack-ലോ Mail-ലോ browser-ലോ ഞാൻ പെട്ടെന്ന് ഒരു message എഴുതുമ്പോൾ, ആവശ്യം: മറ്റൊരു app തുറക്കാതെ അത് വൃത്തിയാക്കണം, അതുവഴി സെക്കൻഡുകൾക്കുള്ളിൽ തിരികെ paste ചെയ്യാം.

കുറച്ച് text copy ചെയ്ത്, നടുവിലെ വരി run ചെയ്യൂ. pbpaste clipboard വായിക്കുന്നു, pbcopy ഫലം തിരികെ എഴുതുന്നു:

Terminal
printf 'can u send me the slides from yesterdays meeting i lost them' | pbcopy
pbpaste | apfel "Rewrite the text above with correct grammar and spelling. Reply with the rewritten text only." | pbcopy
pbpaste
Can you send me the slides from yesterday’s meeting? I lost them.

എന്തുകൊണ്ട് "the text above": apfel pipe ചെയ്ത text ആദ്യവും നിങ്ങളുടെ നിർദ്ദേശം അതിനു ശേഷവുമാണ് വയ്ക്കുന്നത് (source). "fix grammar and spelling, reply with the corrected text only" എന്ന ചെറിയ നിർദ്ദേശം നൽകിയപ്പോൾ model message തിരുത്തുന്നതിനു പകരം അതിന് മറുപടി പറഞ്ഞു: Could you let me know which meeting you're referring to?. ഏത് text-ലാണ് പണിയെടുക്കേണ്ടതെന്ന് പേരെടുത്ത് പറഞ്ഞപ്പോൾ ഞങ്ങളുടെ test-ൽ ആ പ്രശ്നം മാറി.

പ്രവർത്തിച്ചില്ലെങ്കിൽ: അയയ്ക്കുന്നതിനു മുമ്പ് ഫലം വായിച്ചുനോക്കൂ. ചെറിയ model ചിലപ്പോൾ അർത്ഥം മാറ്റും; ഈ വാക്യം German-ലേക്ക് translate ചെയ്യാൻ പറഞ്ഞപ്പോൾ അത് "Can you send me" എന്നതിനെ "Can I send you" ആക്കി.

അടുത്തത്: നടുവിലെ വരി ഒരു shell alias-ലോ Shortcuts-ലെ "Run Shell Script" action-ലോ ഇട്ട് അതിന് ഒരു keyboard shortcut കൊടുക്കൂ.

3. Receipts, PDFs, scripts വായിക്കൂ

2 മിനിറ്റിൽ നിങ്ങൾക്ക് കിട്ടുന്നത്: ഒരു image, scan ചെയ്ത PDF, അല്ലെങ്കിൽ ഒരു script എന്നിവയെക്കുറിച്ചുള്ള ഉത്തരങ്ങൾ, Apple-ന്റെ text recognition ഉപയോഗിച്ച് നിങ്ങളുടെ Mac-ൽ തന്നെ വായിച്ചത്.

സാഹചര്യം: ഒരു receipt-ഓ scan-ഓ അറിയാത്ത ഒരു file-ഓ Downloads-ൽ വന്നുവീഴുമ്പോൾ, ആവശ്യം: അതിൽ നിന്ന് എനിക്കു വേണ്ട ആ ഒരു വിവരം, അതുവഴി തുറക്കാതെ തന്നെ അത് ശരിയായ സ്ഥലത്ത് file ചെയ്യാം.

-f ഉപയോഗിച്ച് ഒരു file attach ചെയ്യൂ. ഈ വരികളുള്ള ഒരു test receipt image (receipt.png) ഞങ്ങൾ ഉണ്ടാക്കി:

Output
CAFE APFEL
2x Melange          9.80
1x Sachertorte      7.90
1x Apfelstrudel     6.50
TOTAL EUR          24.20
14.11.2026  21:14
Terminal
apfel -f receipt.png "What is the total? Just the amount."
24.20

ഇതേ receipt image മാത്രമുള്ള PDF ആയി save ചെയ്താലും പ്രവർത്തിക്കും, കാരണം scan ചെയ്ത pages-ൽ apfel text recognition run ചെയ്യുന്നു:

Terminal
apfel -f receipt.pdf "What is the total? Just the amount."
24.20

ഏത് text file-ഉം അങ്ങനെതന്നെ, ഉദാഹരണത്തിന് ഒരു shell script:

Terminal
apfel -f apfel-demos/gitsum "What does this script do? Two sentences."
This script summarizes recent Git activity by summarizing the last N commits, grouping related changes, and generating a concise report. It uses Apple Intelligence to format the output, and optionally copies the summary to the clipboard.

ആ script നിങ്ങൾക്ക് ജോലി 6-ൽ കിട്ടും. ഒന്നിലധികം files attach ചെയ്യാൻ -f a.txt -f b.txt.

പ്രവർത്തിച്ചില്ലെങ്കിൽ: exit code 4 എന്നാൽ file model-ന് വളരെ നീളം കൂടിയതാണ് (പരിമിതികൾ കാണുക). Exit code 3 എന്നാൽ Apple-ന്റെ safety filter അത് തടഞ്ഞു; അത്തരം സാഹചര്യത്തിൽ --permissive ചേർക്കാനാണ് file extraction guide നിർദ്ദേശിക്കുന്നത്.

4. സാധാരണ ഇംഗ്ലീഷിനെ shell command ആക്കൂ

2 മിനിറ്റിൽ നിങ്ങൾക്ക് കിട്ടുന്നത്: ഓർമ്മയിൽ വരാതിരുന്ന ആ command, copy ചെയ്യാൻ പാകത്തിൽ മറ്റൊന്നുമില്ലാതെ print ചെയ്തത്.

സാഹചര്യം: find, du, അല്ലെങ്കിൽ tar-ന്റെ flags ഞാൻ മറന്നുപോകുമ്പോൾ, ആവശ്യം: ഒരു സാധാരണ വാക്യത്തിൽ നിന്ന് command, അതുവഴി terminal വിടാതെ തുടരാം.

--code code മാത്രം print ചെയ്യുന്നു, വിശദീകരണമൊന്നുമില്ല:

Terminal
apfel --code "one find command that lists files larger than 100MB in my home folder"
find /Users/yourusername/home -type f -size +100M

Flags ശരിയാണ്, പക്ഷേ model ഇല്ലാത്ത ഒരു folder ഉണ്ടാക്കി. നിങ്ങളുടെ home folder ~ ആണ് (ഇവിടെ: find ~ -type f -size +100M).

Terminal
apfel --code "a python function that removes duplicates from a list but keeps the order"
def remove_duplicates_preserve_order(lst):
    seen = set()
    result = []
    for item in lst:
        if item not in seen:
            seen.add(item)
            result.append(item)
    return result

Run ചെയ്യുന്നതിനു മുമ്പ് ഓരോ command-ഉം വായിക്കൂ. ഞങ്ങളുടെ tests-ൽ model തെറ്റായ commands-ഉം തന്നു. "the 10 largest files in the current folder" ചോദിച്ചപ്പോൾ അത് ls -lh | head -n 10 print ചെയ്തു, അത് ഏറ്റവും വലിയവയല്ല, ആദ്യത്തെ 10 entries ആണ് കാണിക്കുന്നത്. "show open ports" ചോദിച്ചപ്പോൾ netstat -tuln | grep LISTEN നിർദ്ദേശിച്ചു, അത് Linux flags ആണ്; macOS-ൽ അത് ഒന്നുംതന്നെ print ചെയ്യില്ല. Mac-ൽ അവ കാണിക്കുന്നത് lsof -iTCP -sTCP:LISTEN -n -P ആണ്.

അടുത്തത്: ജോലി 6-ലെ cmd demo script ഇതിനെ wrap ചെയ്യുന്നു, എന്തെങ്കിലും run ചെയ്യുന്നതിനു മുമ്പ് (-x) അല്ലെങ്കിൽ command copy ചെയ്യുന്നതിനു മുമ്പ് (-c) ചോദിക്കുകയും ചെയ്യുന്നു.

5. നിങ്ങളുടെ scripts-ന് വിശ്വസിക്കാവുന്ന JSON നേടൂ

2 മിനിറ്റിൽ നിങ്ങൾക്ക് കിട്ടുന്നത്: അലങ്കോലമായ text-ൽ നിന്ന് വേർതിരിച്ചെടുത്ത structured data, എപ്പോഴും നിങ്ങളുടെ schema-യുമായി ചേരുന്ന JSON ആയി.

സാഹചര്യം: emails-ൽ നിന്നും notes-ൽ നിന്നും പേരുകളും അക്കങ്ങളും തീയതികളും വേണ്ടിവരുമ്പോൾ, ആവശ്യം: ഗദ്യമല്ല, fields, അതുവഴി അവ jq-ലേക്കോ ഒരു spreadsheet-ലേക്കോ script-ലേക്കോ നൽകാം.

ഒരു JSON Schema contact.schema.json എന്ന പേരിൽ save ചെയ്യൂ:

JSON
{
  "type": "object",
  "properties": {
    "name": { "type": "string" },
    "city": { "type": "string" },
    "phone": { "type": "string" }
  },
  "required": ["name", "city", "phone"]
}

എന്നിട്ട് --schema ഉപയോഗിച്ച് text pipe ചെയ്യൂ. Output ആ schema-ക്ക് valid ആയ JSON ആകുംവിധം apfel model-നെ നിയന്ത്രിക്കുന്നു:

Terminal
echo "Hi, I am Maria Lopez from Vienna, call me on +43 660 1234567" | apfel --schema contact.schema.json "Extract the contact" | jq .
{
  "name": "Maria Lopez",
  "city": "Vienna",
  "phone": "+43 660 1234567"
}

നിങ്ങളുടെ schema declare ചെയ്യുന്ന അതേ ക്രമത്തിലാണ് keys തിരികെ വരുന്നത്.

ഏത് ഉത്തരവും metadata സഹിതം JSON ആയി കിട്ടാൻ -o json ഉപയോഗിക്കൂ:

Terminal
apfel -o json "Translate to German: apple" | jq -r .content
Apfel

ഒരു മുഴുവൻ പട്ടികയ്ക്ക് --batch ഉപയോഗിക്കൂ: ഓരോ record-നും ഒരു JSON വരി അകത്തേക്ക്, ഓരോ record-നും ഒരു result വരി പുറത്തേക്ക്, ഓരോ record-ഉം പുതിയ session-ൽ. ഒരു text file-ൽ മൂന്ന് product reviews:

Terminal
cat reviews.txt
Love it, works offline and it is fast.
Crashes every time I open a PDF.
It is okay, it does the job.
jq -Rc '{custom_id: (input_line_number|tostring), prompt: ("Classify the sentiment of this review as positive, negative or neutral. Reply with one word. Review: " + .)}' reviews.txt | apfel --batch | jq -r '"\(.custom_id) \(.status) \(.content)"'
1 ok Positive
2 ok Negative
3 ok Neutral
apfel: batch: 3 records, 3 ok, 0 failed

jq -R ഓരോ വരിയെയും ഒരു record ആക്കുന്നു; അവസാന വരി stderr-ലെ apfel-ന്റെ summary ആണ്. പരാജയപ്പെടുന്ന record-ന് status: "error" കിട്ടും, batch തുടരുകയും ചെയ്യും.

പ്രവർത്തിച്ചില്ലെങ്കിൽ: apfel JSON Schema-യുടെ ഒരു ഭാഗം മാത്രമേ support ചെയ്യുന്നുള്ളൂ (objects, strings, enums, numbers, booleans, arrays, local $ref). pattern പോലെ support ഇല്ലാത്ത ഒരു keyword വന്നാൽ exit code 2 നൽകി അതിന്റെ പേര് പറഞ്ഞ് നിൽക്കും; പൂർണ്ണ പട്ടിക API compatibility doc-ൽ ഉണ്ട്.

6. നിങ്ങളുടെ ദിവസം automate ചെയ്യൂ: git, ശബ്ദം, റെഡിമെയ്ഡ് scripts

2 മിനിറ്റിൽ നിങ്ങൾക്ക് കിട്ടുന്നത്: നിങ്ങളുടെ സമീപകാല ജോലിയുടെ ഒരു summary, നീണ്ട ഒരു job തീരുമ്പോൾ ഉറക്കെ പറയുന്ന ഒരു Mac, ഒപ്പം എട്ട് റെഡിമെയ്ഡ് AI shell scripts.

സാഹചര്യം: ഞാൻ task മാറുമ്പോഴോ ഒരു build-നായി കാത്തിരിക്കുമ്പോഴോ, ആവശ്യം: കാര്യങ്ങൾ വിശദീകരിക്കുകയും അറിയിക്കുകയും ചെയ്യുന്ന ചെറിയ automations, അതുവഴി terminal-ൽ നോക്കിയിരിക്കേണ്ടതില്ല.

ഏത് git repository-യുടെ ഉള്ളിൽ നിന്നും നിങ്ങൾ ചെയ്തതിന്റെ summary എടുക്കാം:

Terminal
git log --oneline -10 | apfel "summarize what I have been working on, two sentences"
I've been updating star counts to 6,608 and refining ISO datetimes with timezone handling in the Article JSON-LD. Additionally, I've implemented the apfel AI tutorial and redesigned the pre-header with a centered line about the project.

എന്തെങ്കിലും തീരുമ്പോൾ നിങ്ങളുടെ Mac സംസാരിക്കട്ടെ. ഉത്തരം say-ലേക്ക് pipe ചെയ്ത്, നിങ്ങളുടെ നീണ്ട command അതിനു മുന്നിൽ && ഉപയോഗിച്ച് വയ്ക്കൂ:

Terminal
apfel "tell me cheerfully that my build just finished, one short sentence, no emoji" | say

Test Mac-ന് sound output ഇല്ലാതിരുന്നതിനാൽ ഞങ്ങൾ ആ സംസാരം ഒരു file-ലേക്ക് record ചെയ്തു (| say -o build-done.aiff, 102,880 bytes audio). അത് പറഞ്ഞ വാക്യം Your build is finished, and I'm glad you asked! ആയിരുന്നു.

apfel എട്ട് demo scripts-ഉം കൂടെ നൽകുന്നു. അവയെ ഒരു folder-ലേക്ക് എഴുതൂ:

Terminal
apfel --demos
apfel: wrote 9 demo files to /Users/arthurficial/work/apfel-i18n-video-2026-11-15/tut/apfel-demos
  • cmd
  • explain
  • gitsum
  • mac-narrator
  • naming
  • oneliner
  • port
  • wtd

Testing-ൽ ഞങ്ങൾക്ക് ഇഷ്ടപ്പെട്ട ഒന്ന്:

Terminal
./apfel-demos/naming "function that retries HTTP requests with exponential backoff"
retryExponentialBackoff | exponential_retry_backoff | exponential delay retry  
retryWithExponentialBackoff | exponential_retry_http_backoff | HTTP retry with delay  
backoffRetryHTTP | exponential_http_retry | retry with exponential pause

ഞങ്ങളുടെ runs-ൽ എല്ലാ demo-കളും നന്നായില്ല: oneliner "count unique IP addresses in access.log" length limit-ൽ തട്ടി പൊട്ടിയ ഒരു command print ചെയ്തു, explain ഇല്ലാത്ത ഒരു error message കൂട്ടിച്ചേർത്തു. എട്ടെണ്ണവും demo README-ൽ പട്ടികപ്പെടുത്തിയിട്ടുണ്ട്.

7. നിങ്ങളുടെ OpenAI code സൗജന്യമായി run ചെയ്യൂ

2 മിനിറ്റിൽ നിങ്ങൾക്ക് കിട്ടുന്നത്: OpenAI Chat Completions API സംസാരിക്കുന്ന ഒരു local server, അതുകൊണ്ട് നിലവിലുള്ള SDK code പണം കൊടുക്കേണ്ട ഒരു cloud model-നു പകരം നിങ്ങളുടെ Mac-ൽ run ആകും.

സാഹചര്യം: OpenAI SDK ഉപയോഗിച്ച് ഞാൻ prototype ഉണ്ടാക്കുമ്പോൾ, ആവശ്യം: സൗജന്യമായ ഒരു local endpoint, അതുവഴി keys-ഓ bills-ഓ ഇല്ലാതെ, data പുറത്തേക്ക് അയയ്ക്കാതെ build ചെയ്യാനും test ചെയ്യാനും കഴിയും.

ഒരു terminal tab-ൽ server start ചെയ്യൂ:

Terminal
apfel --serve
apfel server v1.18.0
├ endpoint: http://127.0.0.1:11434
├ model:    apple-foundationmodel
├ cors:     disabled
├ origin:   localhost only (http://127.0.0.1, http://localhost, http://[::1])
├ token:    none
├ health:   public
├ max concurrent: 5
├ debug:    off
└ ready

Endpoints:
  POST http://127.0.0.1:11434/v1/chat/completions
  GET  http://127.0.0.1:11434/v1/models
  GET  http://127.0.0.1:11434/health

2026-11-15T13:39:31+0100 info Hummingbird: [HummingbirdCore] Server started and listening on 127.0.0.1:11434

രണ്ടാമത്തെ tab-ൽ OpenAI-യെ വിളിക്കുന്നതുപോലെ തന്നെ ഇതിനെ വിളിക്കൂ:

Terminal
curl -s http://localhost:11434/v1/chat/completions -H "Content-Type: application/json" -d '{"model":"apple-foundationmodel","messages":[{"role":"user","content":"Say hello to my terminal in five words."}]}' | jq -r '.choices[0].message.content'
Hello, terminal.

Official OpenAI Python SDK മാറ്റമൊന്നുമില്ലാതെ പ്രവർത്തിക്കും. Base URL-ഉം model-ന്റെ പേരും മാത്രമാണ് വ്യത്യാസം. hello.py എന്ന പേരിൽ save ചെയ്യൂ:

Python
from openai import OpenAI

client = OpenAI(base_url="http://localhost:11434/v1", api_key="unused")
reply = client.chat.completions.create(
    model="apple-foundationmodel",
    messages=[{"role": "user", "content": "Give me three names for a coffee shop run by robots."}],
)
print(reply.choices[0].message.content)
Terminal
python3 -m venv venv && ./venv/bin/pip -q install openai
./venv/bin/python hello.py
1. RoboBrew  
2. CogCafé  
3. Circuit Sip

Server നിങ്ങളുടെ സ്വന്തം Mac-ൽ (127.0.0.1) മാത്രമേ listen ചെയ്യുന്നുള്ളൂ, മറ്റ് origins-ലെ web pages-ൽ നിന്നുള്ള requests നിരസിക്കുകയും ചെയ്യുന്നു. നിങ്ങളുടെ network-ലേക്ക് തുറന്നുകൊടുക്കാൻ ഒരു token ചേർക്കൂ: apfel --serve --host 0.0.0.0 --token-auto (server security guide).

പ്രവർത്തിച്ചില്ലെങ്കിൽ: Connection refused എന്നാൽ server run ചെയ്യുന്നില്ല. Embeddings-ഉം പഴയ /v1/completions endpoint-ഉം HTTP 501 തിരികെ നൽകും, കാരണം on-device model അവ നൽകുന്നില്ല.

അടുത്തത്: maintainers VS Code Copilot (chat മാത്രം), opencode, Zed, Node.js, Ruby, PHP, പിന്നെ ആറ് ഭാഷകൾ കൂടി എന്നിവയ്ക്കുള്ള setups document ചെയ്തിട്ടുണ്ട്. ഈ പേജിനുവേണ്ടി ഞങ്ങൾ അവ വീണ്ടും പരീക്ഷിച്ചിട്ടില്ല.

8. MCP വഴി tools നൽകൂ

2 മിനിറ്റിൽ നിങ്ങൾക്ക് കിട്ടുന്നത്: ഒരു Model Context Protocol tool വഴി model ഒരു live web page വായിച്ച് അതിന്റെ summary തരുന്നു.

സാഹചര്യം: ഉത്തരം ഒരു web page-ൽ ആയിരിക്കുമ്പോൾ, ആവശ്യം: model തന്നെ അത് fetch ചെയ്യണം, അതുവഴി text അങ്ങോട്ടുമിങ്ങോട്ടും copy ചെയ്യാതെ summary കിട്ടും.

ചെറിയ context window-ൽ ഒതുങ്ങാൻ വേണ്ടി നിർമ്മിച്ച apfel-mcp tools install ചെയ്യൂ:

Terminal
brew install Arthur-Ficial/tap/apfel-mcp

--mcp ഉപയോഗിച്ച് ഒന്ന് attach ചെയ്ത് ചോദിക്കൂ. -q tool-ന്റെ raw output മറയ്ക്കുന്നു:

Terminal
apfel -q --mcp $(which apfel-mcp-url-fetch) "Summarize https://apfel.franzai.com/ in 3 bullets"
- **Purpose**: apfel is a Swift 6.3 tool that wraps Apple’s on-device LLM (part of macOS 26’s Apple Intelligence) and exposes it via a CLI, HTTP server, and interactive chat with context management.  
- **Features**: It handles terminal commands, JSON output, file attachments, real token counting, and context trimming (4,096 or 8,192 tokens depending on hardware), while converting OpenAI tool schemas to Apple’s native format.  
- **Technical details**: Built using the FoundationModels framework, it runs on Apple Silicon’s Neural Engine and GPU without network or cloud dependencies, and is open-source under MIT license.

ഇതേ package-ൽ apfel-mcp-ddg-search (web search), apfel-mcp-search-and-fetch, apfel-mcp-fs (ഒരു local file വായിക്കാൻ) എന്നിവയുമുണ്ട്. ഏത് MCP server-ഉം പ്രവർത്തിക്കും: ഒരു local script path-ഓ ഒരു https:// URL-ഓ.

പേരുള്ള ഒന്നിലധികം arguments ഉള്ള tools-ഉം പ്രവർത്തിക്കും. apfel repository-യിലെ calculator ഇതാ (mcp/calculator/server.py): model രണ്ട് arguments-ഉം നൽകി multiply വിളിക്കുന്നു, apfel അത് run ചെയ്യുന്നു, model ഫലം സഹിതം ഉത്തരം നൽകുന്നു:

Terminal
apfel --mcp ./server.py "What is 15 times 27?"
mcp: /Users/arthurficial/work/apfel-i18n-video-2026-11-15/tut/./server.py - add, subtract, multiply, divide, sqrt, power, round_number
tool: multiply({"a": 15, "b": 27}) = 405
15 times 27 is 405.

tool: എന്ന വരി apfel run ചെയ്ത call നിങ്ങളെ കാണിക്കുന്നതാണ്. apfel 1.18.0-ന് മുമ്പ് model arguments-ന്റെ പേരുകൾ കണ്ടിരുന്നില്ല, അത് ഊഹിക്കുകയായിരുന്നു, അതിനാൽ ഇതുപോലൊരു call പരാജയപ്പെട്ടിരുന്നു (issue #555, pull request #556-ൽ പരിഹരിച്ചു). ഇവിടെ invalid arguments കാണുന്നുണ്ടെങ്കിൽ brew upgrade apfel ഉപയോഗിച്ച് update ചെയ്യൂ.

9. ഒരു prompt പരീക്ഷിക്കാൻ chat ചെയ്യൂ

2 മിനിറ്റിൽ നിങ്ങൾക്ക് കിട്ടുന്നത്: നിങ്ങൾ നേരത്തെ പറഞ്ഞത് ഓർത്തുവയ്ക്കുന്ന ഒരു സംഭാഷണം, terminal-ൽ തന്നെ.

സാഹചര്യം: ഒരു script-നുവേണ്ടി ഞാൻ ഒരു prompt രൂപപ്പെടുത്തുമ്പോൾ, ആവശ്യം: കുറച്ച് turns പെട്ടെന്ന് പരീക്ഷിക്കണം, അതുവഴി automate ചെയ്യുന്നതിനു മുമ്പ് model എങ്ങനെ പ്രതികരിക്കുന്നു എന്ന് കാണാം.

Terminal
apfel --chat
Apple Intelligence · on-device LLM · apfel v1.18.0
────────────────────────────────────────────────────────
Type 'quit' to exit.

you› My name is Franz. I live in Vienna.
 ai› Hello, Franz. It's nice to meet you. I'm here to help with any questions or tasks you might have. How can I assist you today?

you› Suggest one thing I could do there this weekend. One sentence.
 ai› You could visit the Kunsthistorisches Museum to explore its impressive collection of art and artifacts.

you› What is my name?
 ai› Your name is Franz.

you› quit

Goodbye.

-s ഉപയോഗിച്ച് ഒരു persona ചേർക്കാം, ഉദാഹരണത്തിന് apfel --chat -s "You are a patient Python tutor". നീണ്ട ഒരു chat context window-നെക്കാൾ വലുതാകുമ്പോൾ apfel default ആയി ഏറ്റവും പഴയ turns ഒഴിവാക്കുന്നു; മറ്റ് strategies context guide വിശദീകരിക്കുന്നു. Buttons ഉള്ള ഒരു window വേണമെങ്കിൽ apfel-chat കാണുക.

10. Server background-ൽ എപ്പോഴും run ചെയ്യട്ടെ

2 മിനിറ്റിൽ നിങ്ങൾക്ക് കിട്ടുന്നത്: login ചെയ്യുമ്പോൾ തനിയെ start ആകുന്ന, port 11434-ൽ എപ്പോഴും റെഡിയായ OpenAI-compatible server.

സാഹചര്യം: എന്റെ Mac-ലെ tools എല്ലാ ദിവസവും local endpoint ഉപയോഗിക്കുമ്പോൾ, ആവശ്യം: അത് എപ്പോഴും ഓൺ ആയിരിക്കണം, അതുവഴി ഓരോ തവണയും കൈകൊണ്ട് start ചെയ്യേണ്ടതില്ല.

Terminal
brew services start apfel
==> Successfully started `apfel` (label: sh.brew.apfel)
curl -s http://127.0.0.1:11434/health | jq -c '{status, model_available, context_window}'
{"status":"ok","model_available":true,"context_window":4096}
brew services stop apfel
Stopping `apfel`... (might take a while)
==> Successfully stopped `apfel` (label: sh.brew.apfel)

Port, token, MCP servers തുടങ്ങിയ settings environment variables ആണ്, ഉദാഹരണത്തിന് APFEL_PORT=8080 brew services start apfel. അവയെല്ലാം background service guide-ൽ പട്ടികപ്പെടുത്തിയിട്ടുണ്ട്.

11. apfel-ന് മുകളിൽ നിർമ്മിച്ച apps

2 മിനിറ്റിൽ നിങ്ങൾക്ക് കിട്ടുന്നത്: terminal-നെക്കാൾ apps ആണ് ഇഷ്ടമെങ്കിൽ, അതേ on-device model ഒരു window-ലോ menu bar-ലോ hotkey-യിലോ.

ഇവ വരുന്നത് അതേ maintainers-ൽ നിന്നാണ് (README-ലെ "apfel tree"). ഓരോ install name-ഉം Homebrew-ൽ ഉണ്ടെന്ന് 2026 നവംബർ 15-ന് ഞങ്ങൾ പരിശോധിച്ചു; ഈ പേജിനുവേണ്ടി apps ഞങ്ങൾ പരീക്ഷിച്ചിട്ടില്ല.

App എന്ത് ചെയ്യുന്നു Install
apfel-chat Streaming ഉത്തരങ്ങൾ, speech, image analysis എന്നിവയുള്ള chat app brew install Arthur-Ficial/tap/apfel-chat
apfel-clip Clipboard-ൽ menu bar actions: summarize, translate, rewrite brew install Arthur-Ficial/tap/apfel-clip
apfel-quick ഒരു key അമർത്തൂ, ചോദിക്കൂ, ഉത്തരം നേടൂ, അടയ്ക്കൂ brew install Arthur-Ficial/tap/apfel-quick
apfelpad AI, നിങ്ങൾ ഒരു cell-ൽ ഇടുന്ന ഒരു formula ആയി മാറുന്ന notepad brew install Arthur-Ficial/tap/apfelpad
apfel-mcp ചെറിയ window-ന് പാകത്തിലുള്ള MCP tools (ജോലി 8) brew install Arthur-Ficial/tap/apfel-mcp
apfel-run Save ചെയ്ത config-ഉം MCP servers-ന്റെ പട്ടികയും ഉള്ള apfel brew install Arthur-Ficial/tap/apfel-run
apfel-tag നിങ്ങൾ pipe ചെയ്യുന്ന ഏത് text-നും tags, topics, emotions brew install Arthur-Ficial/tap/apfel-tag
apfel-gui Debug ചെയ്യാനുള്ള window: requests, MCP messages, speech brew install Arthur-Ficial/tap/apfel-gui

പരിമിതികളും സത്യസന്ധമായ ഉത്തരങ്ങളും

apfel നിങ്ങൾക്ക് നൽകുന്നത് Apple-ന്റെ on-device model ആണ്. README പ്രകാരം അതിന് ഏകദേശം 3 ബില്യൺ parameters ഉണ്ട്, ChatGPT-ക്കോ Claude-നോ പിന്നിലുള്ള cloud models-നെക്കാൾ വളരെ ചെറുത്. ചെറുതും കൃത്യമായ ലക്ഷ്യമുള്ളതുമായ text ജോലികളിൽ അത് മികച്ചതാണ്. ഞങ്ങൾ നേരിട്ടതോ documentation പറയുന്നതോ ആയ പരിമിതികൾ ഇവയാണ്.

Context window ചെറുതാണ്. ചോദ്യവും ഉത്തരവും ചേർന്ന് macOS 26-ലും M1, M2 Macs-ലും 4,096 tokens-ൽ ഒതുങ്ങണം, അല്ലെങ്കിൽ macOS 27 run ചെയ്യുന്ന 12 GB-യോ അതിൽ കൂടുതലോ ഉള്ള M3-ഓ പുതിയതോ ആയ Macs-ൽ 8,192 tokens-ൽ (README). നിങ്ങളുടേത് എത്രയെന്ന് apfel --model-info കാണിക്കും. apfel-ന്റെ സ്വന്തം README അതിന് വളരെ നീളമുള്ളതാണ്. അയയ്ക്കുന്നതിനു മുമ്പ് എണ്ണിനോക്കൂ:

Terminal
apfel --count-tokens -f README.md "summarize in 3 bullets"
8272/3584 tokens (over budget)
  prompt=7, README.md=8258
apfel -f README.md "summarize in 3 bullets"; echo "exit code: $?"
error: [context overflow] Input exceeds the model's context window: the input is 8264 tokens, the window is 4096 tokens. Shorten the conversation history.
exit code: 4

ആ 3,584 എന്നത് 4,096 window-ൽ നിന്ന് ഉത്തരത്തിനായി ഒഴിച്ചിടുന്ന 512 tokens കുറച്ചതാണ്. README-യിൽ ഏകദേശം 3,000 വാക്കുകളേ ഉള്ളൂ, പക്ഷേ Markdown-നും code-നും ഓരോ വാക്കിനും ധാരാളം tokens ചെലവാകും. നീണ്ട files ഭാഗങ്ങളായി നൽകൂ (head -c 6000 file), ഒരു സമയം ഒരു section.

ഇന്നത്തെ തീയതി അതിന് അറിയില്ല. അത് ഒരെണ്ണം സ്വയം ഉണ്ടാക്കി:

Terminal
apfel "What is today's date?"
Today's date is October 27, 2024.
apfel -s "Today is $(date '+%B %d, %Y')." "What is today's date? One sentence."
Today's date is November 15, 2026.

അതിന് ആവശ്യമുള്ള ഏത് വിവരവും prompt-ൽ തന്നെ നൽകൂ. ഒരു MCP tool attach ചെയ്യാത്തിടത്തോളം അതിന് internet ഇല്ല.

ചിലപ്പോൾ അത് തെറ്റും, അതും ആത്മവിശ്വാസത്തോടെ. മുകളിൽ നിങ്ങൾ കണ്ടതാണ്: ജോലി 4-ലെ തെറ്റായ shell commands, ജോലി 2-ൽ അർത്ഥം തിരിച്ചിട്ട ഒരു translation. പ്രാധാന്യമുള്ള എന്തും പരിശോധിക്കൂ.

Apple-ന്റെ safety filter നിരുപദ്രവകരമായ text-നെയും തടഞ്ഞേക്കാം. അപ്പോൾ apfel exit code 3-ഉം The request was blocked by Apple's safety guardrails എന്ന message-ഉം നൽകി നിൽക്കും. വാക്യം മാറ്റി എഴുതൂ, അല്ലെങ്കിൽ creative writing-നും documents-നും --permissive ചേർക്കൂ; അത് എന്താണ് മാറ്റുന്നതെന്ന് guardrails doc വിശദീകരിക്കുന്നു. ഈ പേജിനുവേണ്ടിയുള്ള runs-ൽ ഞങ്ങൾക്ക് ഒരു block പോലും ഉണ്ടായില്ല.

ഓരോ run-ലും ഉത്തരങ്ങൾ വ്യത്യസ്തമാണ്. ഇവിടെയുള്ളത് ഓരോന്നും ഒറ്റ run-ൽ നിന്നുള്ള യഥാർത്ഥ outputs ആണ്. നിങ്ങൾക്ക് കിട്ടുന്നതിന്റെ വാക്കുകൾ വേറെയായിരിക്കും. കൂടുതൽ ആവർത്തിക്കാവുന്ന ഉത്തരങ്ങൾക്ക് --temperature 0 ഉപയോഗിക്കൂ; runs-ലോ macOS updates-ലോ ഒരേ output apfel ഉറപ്പുനൽകുന്നില്ല (stability policy).

വേഗത: ഞങ്ങളുടെ runs-ൽ മിക്ക ഉത്തരങ്ങളും 1 മുതൽ 2 സെക്കൻഡിനുള്ളിൽ വന്നു. MCP tool ഉപയോഗിച്ചുള്ള web page summary-ക്ക് 8 സെക്കൻഡ് എടുത്തു.

ആവശ്യകതകൾ കർശനമാണ്: Apple Silicon മാത്രം, macOS 26 അല്ലെങ്കിൽ പുതിയത്, Apple Intelligence ഓൺ, ഒപ്പം --model-info പട്ടികപ്പെടുത്തുന്ന 15 ഭാഷകളിൽ ഒന്ന്. Intel Macs-ൽ ഇത് run ചെയ്യില്ല.

എന്തെങ്കിലും പരാജയപ്പെടുമ്പോൾ

apfel പ്രശ്നങ്ങൾ ഒരു exit code ഉപയോഗിച്ചാണ് അറിയിക്കുന്നത്, അതുകൊണ്ട് scripts-ന് അതനുസരിച്ച് പ്രതികരിക്കാം. Command കഴിഞ്ഞയുടൻ echo $? ഉപയോഗിച്ച് അത് പരിശോധിക്കൂ.

Exit code അല്ലെങ്കിൽ error അർത്ഥം എന്ത് ചെയ്യണം
2 തെറ്റായ flag അല്ലെങ്കിൽ option Flags prompt-ന് മുമ്പ് വരണം; apfel --help അവ പട്ടികപ്പെടുത്തുന്നു
3 Apple-ന്റെ safety filter request തടഞ്ഞു വാക്യം മാറ്റി എഴുതൂ, അല്ലെങ്കിൽ --permissive ചേർക്കൂ
4 Input context window-ന് വളരെ നീളം കൂടിയതാണ് കുറച്ച് text മാത്രം അയയ്ക്കൂ; apfel --count-tokens ഉപയോഗിച്ച് പരിശോധിക്കൂ
5 Model ലഭ്യമല്ല Apple Intelligence ഓൺ ചെയ്യൂ, download-നായി കാത്തിരിക്കൂ, Mac-ന്റെയും Siri-യുടെയും ഭാഷ ഒന്നാക്കൂ
6 Model busy ആണ് അല്ലെങ്കിൽ rate limit ആയി കാത്തിരുന്ന് വീണ്ടും run ചെയ്യൂ, അല്ലെങ്കിൽ --retry ചേർക്കൂ
Connection refused Port 11434-ൽ server ഇല്ല apfel --serve അല്ലെങ്കിൽ brew services start apfel start ചെയ്യൂ
HTTP 501 On-device model നൽകാത്ത endpoint (embeddings, /v1/completions) /v1/chat/completions ഉപയോഗിക്കൂ
piped input was empty Command stderr-ലേക്കാണ് എഴുതിയത് command 2>&1 \| apfel "..."

ഇപ്പോഴും കുടുങ്ങിയോ? GitHub-ൽ തിരയൂ അല്ലെങ്കിൽ ഒരു issue തുറക്കൂ.

ഇത് ആര് ഉണ്ടാക്കി, എങ്ങനെ പരീക്ഷിച്ചു

apfel സൗജന്യവും open source-ഉം ആണ് (MIT license), Franz Enzenhofer-ന്റെ ഒരു franzai പ്രോജക്റ്റ്. Franz-ന്റെ AI assistant ആയ Arthur Ficial-നോടൊപ്പമാണ് ഇത് maintain ചെയ്യുന്നത്, ഈ ട്യൂട്ടോറിയൽ എഴുതിയതും Arthur Ficial ആണ്. apfel ഉണ്ടാക്കിയവർ തന്നെയാണ് ഈ പേജ് എഴുതിയത് എന്നതുകൊണ്ട്, ഞങ്ങൾ കണ്ട ഓരോ പരാജയവും ഒഴിവാക്കാതെ ഇവിടെ ചേർത്തിട്ടുണ്ട്.

ഞങ്ങൾ എങ്ങനെ പരീക്ഷിച്ചു: 2026 നവംബർ 15-ന് ഈ പേജിലെ ഓരോ command-ഉം macOS 27.0.1 (build 26A434) ഉള്ള ഒരു MacBook Air M2 (24 GB)-ൽ ഞങ്ങൾ run ചെയ്തു. GitHub release-ൽ നിന്നുള്ള signed apfel 1.18.0 binary (Homebrew tap install ചെയ്യുന്ന അതേ file) ഒരു യഥാർത്ഥ terminal session-ൽ ഉപയോഗിച്ചു, output മാറ്റമില്ലാതെ copy ചെയ്തു. ഈ പേജിന്റെ ആദ്യ version (2026 നവംബർ 14, apfel 1.16.0) ജോലി 8-ലെ multi-argument tool bug കാണിച്ചിരുന്നു; 1.18.0 അത് പരിഹരിക്കുന്നു, അതിനാൽ ഈ version-നുവേണ്ടി ഞങ്ങൾ എല്ലാ commands-ഉം വീണ്ടും run ചെയ്തു. ആദ്യ output തെറ്റായിരുന്നിടത്ത്, ആ തെറ്റായ output തന്നെ പേജിൽ നിലനിർത്തി, അത് തുറന്നുപറയുകയും ചെയ്തു. Edit ഒട്ടും വേണ്ടാത്ത ഉത്തരങ്ങൾ കണ്ടെത്താൻ വേണ്ടി മാത്രമാണ് വീണ്ടും run ചെയ്തത്: ഒരു web page summary-യിൽ ഈ site print ചെയ്യാത്ത ഒരു നീണ്ട dash ഉണ്ടായിരുന്നു, അതിനാൽ അത് വീണ്ടും run ചെയ്ത് മൂന്നാമത്തെ run നിലനിർത്തി. Test Mac-ന് sound output ഇല്ലാതിരുന്നതിനാൽ, speech ഉദാഹരണം audio ഒരു file-ലേക്ക് എഴുതിയാണ് പരിശോധിച്ചത്. Demo scripts എഴുതിയത് apfel 1.18.0-ലെ apfel --demos ആണ്.

apfel-നെക്കുറിച്ച് മറ്റുള്ളവർ എഴുതിയത്: Show HN post (2026 ഏപ്രിൽ 3, 743 points), Better Stack-ന്റെ ഒരു guide, GIGAZINE-ന്റെ ഒരു ലേഖനം, danilchenko.dev-ലെ ഒരു hands-on review.

ഉറവിടങ്ങൾ: apfel README, CLI reference, install guide, demo scripts, apfel vs Apple-ന്റെ fm, issue tracker എന്നിവ, 2026 നവംബർ 15-ന് വായിച്ചത്.