מעודכן לאפריל 2026 15 דקות קריאה למפתחים בכל הרמות

Cursor AI — המדריך המלא
Agent Mode, Tab & Vibe Coding

Cursor הוא לא סתם עוד תוסף AI — הוא עורך קוד חדש שמוחק את הגבול בין מפתח ל-AI. המדריך הזה יראה לך איך לנצל אותו לגמרי: מ-Tab Completion בסיסי ועד Agent Mode שכותב, מריץ ומתקן קוד בעצמו.

VSCode
מבוסס על
Claude 3.5
Sonnet ברירת מחדל
Agent
Mode מובנה
$20
Pro לחודש

מה זה Cursor?

Cursor הוא fork של Visual Studio Code שנבנה מחדש סביב AI. החברה מאחוריו — Anysphere — הקימה אותה ב-2023 וכבר גייסה מאות מיליוני דולרים. הרעיון פשוט: במקום לשלב AI כתוסף חיצוני, לבנות עורך קוד שבו AI הוא חלק אינטגרלי מכל אינטראקציה.

מאחר שהוא מבוסס על VSCode, כל ה-extensions, ה-themes וה-keybindings שלך ממשיכים לעבוד. המעבר מ-VSCode ל-Cursor לוקח כמה דקות — ייבוא ה-settings אוטומטי.

Cursor מול המתחרים — טבלת השוואה

תכונה Cursor GitHub Copilot Windsurf
עורך קוד עצמאי כן (VSCode fork) תוסף בלבד כן (VSCode fork)
Agent Mode כן — מלא חלקי כן — Cascade
Tab Completion Multi-line מתקדם טוב טוב
Codebase Context @codebase מלא חלקי כן
מחיר Pro $20/חודש $10-$19/חודש $15/חודש
Bring Your Own Key כן לא כן

תמחור Cursor

Hobby
חינם
  • 2,000 Tab completions
  • 50 בקשות Slow Premium
  • מודלים חינמיים ללא הגבלה
מומלץ
Pro
$20/חודש
  • Tab completions ללא הגבלה
  • 500 Fast Premium requests
  • Agent Mode מלא
  • Claude 3.5 Sonnet / GPT-4o
Business
$40/user/חודש
  • כל מה שב-Pro
  • Zero data retention
  • Admin dashboard
  • SSO / SAML
lightbulb
הדבר הכי גדול ב-Cursor: Agent Mode

Agent Mode הוא הסיבה שאנשים עוברים ל-Cursor. בניגוד לכלים אחרים שמציעים suggestions בלבד, Agent Mode כותב קוד, מריץ terminal, קורא תוצאות, ומתקן שגיאות — הכל בלופ אוטומטי עד שהמשימה מסתיימת.

התקנה והגדרה

ההתקנה של Cursor פשוטה ומהירה. הלך לאתר הרשמי ולחץ על Download — Cursor זמין ל-macOS, Windows ו-Linux.

שלב 1: הורדה והתקנה

שלב 2: בחירת מודל AI

ב-Settings (Cmd+, על Mac) ניתן לבחור את מודל ה-AI. Cursor תומך במספר מודלים:

Cursor Settings — AI Models
// Cursor > Settings > Models
claude-3-5-sonnet-20241022
ברירת מחדל
gpt-4o
OpenAI
gemini-2.0-flash
Google
cursor-small
מהיר + חינם
Bring Your Own Key (BYOK)
ANTHROPIC_API_KEY = sk-ant-...

שלב 3: Bring Your Own Key

אם יש לך API keys משלך (Anthropic, OpenAI, Google), תוכל להגדיר אותם ב-Settings ולהשתמש בהם ישירות. כך אתה משלם ישירות לספק המודל ולא לCursor, ולא קוראים ל-fast requests quota.

play_circle
Cursor AI — מדריך התקנה והגדרה 2024
YouTube • חפש סרטוני הסבר
open_in_new

תכונות עיקריות

Cursor מציע ארבע שכבות של AI assistance, מהפשוטה לעמוקה ביותר. הכר את כולן כדי לבחור את הכלי הנכון לכל משימה.

Tab Completion — השלמה חכמה

Tab Completion של Cursor הוא לא "הצעת שורה בודדת" כמו כלים ישנים. הוא מנתח את ה-context שלך — הקוד שלפני ואחרי הקורסור, שינויים אחרונים שביצעת, והקובץ הנוכחי — ומציע בלוקי קוד שלמים.

Cursor — myproject/src/users.py
// כותבים את שם הפונקציה...
def get_user_by_email(email: str):
# Tab suggestion (מופיע בצבע עמום):
"""Get user from database by email address."""
user = db.session.query(User).filter(
User.email == email
).first()
if not user:
raise ValueError(f"User {email} not found")
return user
Tab לקבל הצעה Esc לדחות

Cmd+K — עריכה Inline

Cmd+K (Mac) / Ctrl+K (Windows) הוא הכלי לעריכה מוקדת. בחר קוד, לחץ Cmd+K, ותאר מה אתה רוצה לשנות בשפה טבעית.

edit דוגמאות לשימוש ב-Cmd+K
"הפוך לasync/await"
"הוסף error handling"
"כתוב unit tests לפונקציה"
"תרגם לTypeScript"
"מטב לpython 3.12"
"הסבר את הקוד הזה"
tips_and_updates טיפים ל-Cmd+K

בלי בחירה → מציג prompt ליצירה מאפס

עם בחירה → עורך את הקוד שנבחר בלבד

לחץ Cmd+K שוב לפתיחת diff view

Accept: Enter | Reject: Esc

Chat Panel — Cmd+L

Cmd+L פותח את ה-Chat Panel — שיחה עם AI שמכיר את הקוד שלך. הכוח האמיתי הוא ב-@references שמאפשרות לך לשלוט בדיוק במה ה-AI רואה.

Cursor Chat — @codebase
א
@codebase

איפה מנוהל ה-authentication בפרויקט? מה הflow של login?

AI

מצאתי את ה-auth בשלושה קבצים:

• src/auth/middleware.py — JWT validation

• src/api/auth.py — login/logout endpoints

• src/models/user.py — User model + password hash

ה-flow: POST /auth/login → validate credentials → issue JWT → return token

@ שאל שאלה... (@ לhighlight files)
@file
קובץ ספציפי
@folder
תיקיה שלמה
@codebase
כל הקוד
@web
חיפוש ווב
@docs
תיעוד ספציפי
@git
היסטוריית git
@terminal
output מ-terminal
@notepads
context קבוע

Agent Mode — AI שעובד בשבילך

Agent Mode הוא הפיצ'ר שמבדיל את Cursor מכל כלי AI אחר בשוק. במקום לענות על שאלה ולחכות להנחיה הבאה, Agent Mode פועל בלופ אוטומטי: כותב קוד, מריץ אותו ב-terminal, קורא את התוצאות, ומתקן שגיאות — עד שהמשימה הושלמה.

להפעלה: Cmd+Shift+I (Mac) / Ctrl+Shift+I (Windows) — פותח את ה-Composer במצב Agent.

איך Agent Mode עובד — לופ מלא

smart_toy Agent Mode — Workflow לדוגמה
אתה
הנחיה התחלתית
"בנה לי API endpoint לניהול users עם FastAPI — CRUD מלא, validation, ו-JWT auth"
AI
שלב 1: כותב קוד
יוצר src/api/users.py, src/models/user.py, src/schemas/user.py
AI
שלב 2: מריץ terminal
$ pip install fastapi uvicorn python-jose passlib
AI
שלב 3: מריץ tests — נמצאה שגיאה
$ pytest tests/test_users.py
FAILED: test_create_user — IntegrityError: UNIQUE constraint failed
AI
שלב 4: מתקן אוטומטית
מוסיף בדיקת uniqueness לפני יצירת user, מעדכן error handling
הושלם בהצלחה
$ pytest — 12 passed in 1.43s
Cursor Agent — Terminal Output
[Agent] Starting task: Build FastAPI users CRUD API
[Agent] Creating file: src/api/users.py
[Agent] Creating file: src/models/user.py
[Agent] Creating file: tests/test_users.py
[Terminal] $ pip install fastapi uvicorn python-jose passlib bcrypt
Successfully installed fastapi-0.110.0 uvicorn-0.28.0...
[Terminal] $ pytest tests/ -v
FAILED tests/test_users.py::test_create_duplicate_user
[Agent] Analyzing error: duplicate email constraint missing
[Agent] Fixing: src/api/users.py — adding email uniqueness check
[Terminal] $ pytest tests/ -v
........... 12 passed in 1.43s
[Agent] Task complete! API is ready at /api/users

Best Practices לAgent Mode

מה Agent יכול ומה לא

check_circle Agent יכול
  • ליצור, לערוך ולמחוק קבצים
  • להריץ פקודות terminal
  • להריץ tests ולתקן errors
  • לחפש ב-codebase
  • לקרוא תיעוד ב-web
  • לנהל git (commit, diff)
cancel Agent לא יכול
  • לגשת לאינטרנט בצורה שרירותית
  • להריץ GUI applications
  • לגשת לservices חיצוניים ללא credentials
  • לזכור sessions קודמות
  • לפרוס (deploy) לproduction בלי הגדרה
play_circle
Cursor Agent Mode — מדריך מלא
YouTube • חפש "cursor ai agent mode tutorial"
open_in_new

.cursorrules — הגדרות פרויקט ל-AI

.cursorrules הוא קובץ טקסט שמניחים בroot של הפרויקט. הוא מתפקד כ-system prompt קבוע לכל האינטראקציות עם Cursor ב-Chat ו-Agent. כל שאלה שאתה שואל, כל קוד שAgent כותב — יושפעו מה-.cursorrules.

זה הכלי הכי חשוב לעקביות: Cursor יודע את ה-stack, ה-conventions, והסגנון שלך — בלי שתצטרך לחזור על עצמך בכל פעם.

דוגמה ל-.cursorrules לפרויקט FastAPI

# .cursorrules — FastAPI Project

You are an expert Python developer working on a FastAPI production application.

## Tech Stack
- Python 3.12
- FastAPI 0.110
- SQLAlchemy 2.0 (async)
- Pydantic v2
- PostgreSQL + asyncpg
- pytest + pytest-asyncio

## Code Style Rules
- Always use type hints for all function parameters and return values
- Follow PEP 8, max line length 88 (black formatter)
- Write Google-style docstrings for all public functions
- Use async/await for ALL database operations and I/O
- Never use sync blocking calls in async context

## Architecture Rules
- Repository pattern for database access (src/repositories/)
- Dependency injection via FastAPI Depends()
- Pydantic schemas for all request/response validation
- JWT authentication via python-jose
- Settings via pydantic-settings from .env file

## Testing Rules
- Write pytest tests for every new endpoint
- Use pytest fixtures for DB setup/teardown
- Test both happy path and error cases
- Aim for >80% coverage

## Language Rules
- Code: English (variable names, function names, comments)
- API responses: English
- Docstrings: Hebrew is acceptable
- Log messages: English

## Folder Structure
src/
  api/          — FastAPI routers
  models/       — SQLAlchemy models
  schemas/      — Pydantic schemas
  repositories/ — DB access layer
  services/     — Business logic
  core/         — Config, security, dependencies
tests/
link
cursorrules.com — ספרייה מוכנה

האתר cursorrules.com מכיל מאות .cursorrules מוכנים לpopular stacks: Next.js, Django, React, Rust, Go ועוד. לא צריך לבנות מאפס — עיין, התאם, ותשתמש.

Notepads — Context קבוע לפרויקטים

Notepads הם גרסה חדשה יותר של .cursorrules ב-Cursor. ניתן ליצור מספר Notepads לפרויקט, להפנות אליהם ב-Chat עם @notepads, ולהגדיר אילו Notepads תמיד פעילים.

ניהול Context — איך AI "רואה" את הקוד שלך

Context Window הוא כמות המידע שModels יכולים לעבד בבת-אחת. Claude 3.5 Sonnet תומך ב-128K tokens — פרויקט קטן עד בינוני נכנס כולו. אבל ניהול נכון של context חוסך כסף ומשפר תוצאות.

שיטות לניהול Context

data_object
@file ו-@folder
הדרך הכי מדויקת. כשאתה יודע בדיוק אילו קבצים רלוונטיים — ציין אותם. זה חוסך tokens ומשפר דיוק.
account_tree
@codebase
Cursor עושה semantic search בכל הrepo ומביא את הקטעים הרלוונטיים ביותר. לשאלות על architecture ו-patterns. לא מביא את הכל — מביא את מה שנראה רלוונטי.
note
Notepads — Context קבוע
הגדר Notepads עם מידע שתמיד רלוונטי: architecture decisions, API keys structure, naming conventions. הם נשארים בין sessions.
send
Ctrl+Enter — ללא Context אוטומטי
שלח שאלה בלי שCursor יוסיף context אוטומטי. שימושי כשאתה רוצה שאלה כללית ולא קשורה לקוד הנוכחי.
warning
שמור על repos ממוקדים

Cursor עובד הכי טוב עם repositories קטנים וממוקדים. Monorepo ענקי עם 100K+ קבצים? Cursor יתקשה לנווט. שקול לפצל לrepos נפרדים לפי domain.

Vibe Coding — פיתוח בשפה טבעית

המושג "Vibe Coding" טבע אנדריי קרפתי (מייסד-שותף של OpenAI, לשעבר ראש AI ב-Tesla) בתחילת 2025. הרעיון: פיתוח שמתנהל כולו ב-Natural Language — אתה מתאר מה אתה רוצה, ה-AI כותב, ואתה מסתכל, מאשר, ומנחה.

Vibe Coding הוא לא "לתת ל-AI לכתוב ולסגור את העיניים". זה דרך עבודה חדשה שדורשת אינטואיציה, שיפוט, ויכולת לתאר דרישות בצורה ברורה.

Vibe Coding Workflow

1
תאר בplain English
כתוב מה אתה רוצה לבנות — כאילו אתה מסביר לmid-level developer. היה ספציפי לגבי behaviors, לא implementations.
2
Cursor כותב
Agent Mode לוקח את ההנחיה, בוחר stack, כותב קוד, מריץ, ומתקן. לא קורא כל שורה — זה בסדר.
3
מסתכל ומאשר
עבור על ה-diff, הרץ בעצמך, בדוק שזה עושה מה שביקשת. שאל שאלות על חלקים שלא מובנים.
4
Test + Iterate
הרץ tests, תאר שגיאות, הנחה את ה-Agent לתיקון. חזור על הצעד עד שזה עובד.

Vibe Coding — מה מתאים ומה לא

מצוין ל-Vibe Coding
  • Prototypes ו-MVPs מהירים
  • Scripts אוטומציה
  • Personal tools ו-side projects
  • API integrations
  • Data analysis ועיבוד
  • פרויקטים שלמדריכים וניסיון
דורש יותר זהירות
  • קוד production קריטי ללא review
  • Security-sensitive code
  • Financial transactions
  • קוד שאחרים תלויים בו
  • Systems עם data סנסיטיבי
security
Security ו-Vibe Coding

קוד שנכתב ב-Vibe Coding עלול להכיל vulnerabilities שלא מיד נראות — SQL injection, open redirects, insecure defaults. תמיד run security linters ועשה code review לחלקים שנוגעים ב-auth, payments, ו-user data.

5 פרויקטים לתרגול עם Cursor

הדרך הכי טובה ללמוד Cursor היא להשתמש בו. הנה חמישה פרויקטים מדורגים לפי קושי, עם הנחיות לAgent Mode:

1
CLI Chatbot
מתחיל
Python script שמשתמש ב-OpenAI API, שומר היסטוריה, תומך בפקודות slash
"צור CLI chatbot ב-Python שמשתמש ב-OpenAI API. תמוך בshortcuts /clear לניקוי היסטוריה, /save לשמירת שיחה לקובץ. שמור את ה-API key ב-.env"
2
REST API — CRUD מלא
בינוני
FastAPI + SQLite עם פעולות CRUD, validation, Swagger docs אוטומטיים
"בנה REST API לניהול todo list עם FastAPI + SQLite. CRUD מלא ל-tasks, Pydantic validation, pytest tests. Swagger ב-/docs"
3
Web Scraper עם Export
בינוני
Playwright scraper שאוסף נתונים, מנקה ומייצא לCSV/JSON
"כתוב Playwright scraper שמאסוף כותרות + מחירים מ-books.toscrape.com. ניקוי נתונים, export לCSV ולJSON, support ל-pagination"
4
Full-Stack App
מתקדם
Next.js frontend + FastAPI backend + PostgreSQL, auth מלא
"Full-stack expense tracker: Next.js 14 (App Router) + FastAPI + PostgreSQL. JWT auth, הוספת הוצאות, categories, dashboard עם charts (recharts)"
5
AI Agent מותאם
מתקדם
LangChain agent עם tools: web search, calculator, file read/write
"LangChain agent שיכול: לחפש ב-web (Tavily), לקרוא/לכתוב קבצים, לחשב ביטויים. CLI interface, streaming output, conversation memory"

גיליון עזר — Cursor AI

קיצורי מקלדת

פעולה Mac Windows / Linux
פתח Chat PanelCmd+LCtrl+L
Agent Mode (Composer)Cmd+Shift+ICtrl+Shift+I
Inline EditCmd+KCtrl+K
קבל Tab suggestionTabTab
דחה Tab suggestionEscEsc
שלח ללא auto-contextCtrl+EnterCtrl+Enter
Accept all changesCmd+YCtrl+Y
Reject all changesCmd+NCtrl+N
SettingsCmd+,Ctrl+,
Command PaletteCmd+Shift+PCtrl+Shift+P

@References — מדריך מהיר

Reference שימוש זמין ב
@fileהפנה לקובץ ספציפיChat + Agent
@folderכל הקבצים בתיקיהChat + Agent
@codebaseSemantic search בכל הrepoChat + Agent
@webחיפוש ווב בזמן אמתChat
@docsתיעוד של library ספציפיתChat
@gitcommit history, diffsChat + Agent
@terminaloutput מה-terminal האחרוןChat
@notepadsContext קבוע שהגדרתChat + Agent

Agent Mode Tips — 10 טיפים מהשדה

תבנית .cursorrules מהירה

# .cursorrules — [שם הפרויקט]

You are an expert [LANGUAGE] developer working on [DESCRIPTION].

## Stack
- [Framework + version]
- [Database]
- [Key libraries]

## Code Rules
- [סגנון כתיבה]
- [naming conventions]
- [error handling approach]

## Testing
- [test framework]
- [coverage expectations]

## Do NOT
- [anti-patterns לדחות]
- [patterns שרוצים להימנע מהם]

סיכום — למה Cursor?

Cursor מייצג שינוי פרדיגמה בפיתוח תוכנה. לא "AI שעוזר לכתוב קוד" — אלא סביבת פיתוח שנבנתה מהיסוד סביב שיתוף פעולה בין מפתח ל-AI. Tab Completion מפחית friction, Cmd+K מאיץ עריכות, Chat Panel עונה על שאלות בהקשר של הprojekt — וAgent Mode מאפשר לנו לעבוד ברמת ה-intent, לא ברמת ה-implementation.

הדרך הכי טובה להתחיל: הורד, ייבא את ה-VSCode settings שלך, ותתחיל פרויקט חדש עם Agent Mode. 30 דקות ראשונות ישנו את הדרך שאתה חושב על פיתוח.