كيفية تثبيت Claude Code وتشغيل أول مهمة للذكاء الاصطناعي
قم بتثبيت Claude Code على أي نظام أساسي وقم بتشغيل أول مهمة برمجة مستقلة لك في أقل من 10 دقائق. يغطي هذا الدليل التثبيت والإعداد والمطالبات الحقيقية الأولى.
Claude Code is Anthropic's agentic coding tool. It runs in your terminal, reads your entire project, edits files, runs commands, and iterates on results. This guide gets you from zero to your first productive session in under 10 minutes.
كيف تقوم بتثبيت كلود كود؟
يتم تثبيت Claude Code عبر أمر واحد على نظام التشغيل macOS أو Linux أو WSL. على نظام التشغيل Windows، استخدم PowerShell.
macOS / Linux / WSL
curl -fsSL https://claude.ai/install.sh | bashويندوز باورشيل
irm https://claude.ai/install.ps1 | iexطرق بديلة
| طريقة | يأمر |
|---|---|
| البيرة المنزلية (ماك) | الشراب تثبيت كلود كود |
| npm (أي منصة) | npm install -g @anthropic-ai/claude-code |
| VS Code Extension | ابحث عن "Claude Code" في سوق VS Code |
| البرنامج المساعد JetBrains | ابحث عن "Claude Code" في سوق JetBrains |
التحقق من التثبيت:
claude --version
# Claude Code 2.x.xHow do you start your first session?
انتقل إلى أي دليل مشروع واكتب "كلود". يقرأ Claude Code بنية مشروعك ويبني السياق تلقائيًا. لا تحتاج إلى تكوين أي شيء للبدء.
cd your-project
claudeسترى مطالبة حيث يمكنك كتابة تعليمات اللغة الطبيعية. يفهم كلود كود مشروعك لأنه يقرأ ملفاتك، وليس لأنك تشرحها.
ما هي المطالبات الأولى الجيدة؟
ابدأ بالمهام التي تساعدك على فهم ما يمكن أن يفعله كلود كود. تعمل هذه المطالبات بشكل جيد في الجلسة الأولى:
# Understand the project
> "What does this project do? Give me a high-level overview."
# Find issues
> "Are there any obvious bugs or code smells in this codebase?"
# Take action
> "Write tests for the auth module, run them, and fix any failures"
# Multi-step task
> "Add input validation to the user registration form,
write unit tests, and commit with a descriptive message"ما الذي يجعل Claude Code مختلفًا عن أدوات الذكاء الاصطناعي الأخرى؟
| Capability | كلود كود | الأدوات القائمة على الدردشة |
|---|---|---|
| الوصول إلى الملف | يقرأ أي ملف في مشروعك | Only what you paste |
| تنفيذ | يقوم بتشغيل الأوامر في المحطة الطرفية الخاصة بك | لا التنفيذ |
| Iteration | يصلح أخطائه بنفسه | يمكنك نسخ ولصق الإصلاحات |
| بوابة | يخلق الالتزامات والفروع والعلاقات العامة | لا يوجد تكامل بوابة |
| Memory | يستمر CLAUDE.md عبر الجلسات | لا ذاكرة |
كيف تقوم بإعداد CLAUDE.md للحصول على نتائج أفضل؟
Create a CLAUDE.md file at your project root. Claude Code reads it at the start of every session. It tells the agent about your project's conventions, tech stack, and rules.
# Create CLAUDE.md automatically
claude /init
# Or write one manually
cat > CLAUDE.md << 'EOF'
# Project Context
Next.js 14 app with TypeScript and Tailwind CSS.
## Commands
- npm run dev — start dev server
- npm run test — run tests
## Conventions
- Use server components by default
- Never use `any` in TypeScript
EOFراجع دليلنا التفصيلي حول أفضل ممارسات CLAUDE.md للتكوين المتقدم.