0Pricing
Mojo Academy · درس

تثبيت Modular CLI

ثبّت سلسلة الأدوات على macOS أو Linux

تثبيت Modular CLI درس مجاني في Mojo Academy على CoddyKit. هذا هو الدرس 1 من أصل 4. يمكنك قراءة الدرس كاملاً أدناه مجاناً — ثم تمرن عليه مباشرة في المتصفح باستخدام محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7. هذا الدرس جزء من مسار التعلم في Mojo Academy، وتقدمك يتزامن عبر الويب وتطبيق CoddyKit. تتضمن دورة Mojo Academy 4 دروس في المجموع.

بعض أجزاء هذا الدرس لم تُترجم بعد وتظهر باللغة الإنجليزية.

Why a Toolchain First

Before you write Mojo, your machine needs the compiler and tools. That bundle is the Modular toolchain, and getting it set up is step one. 🛠️

Meet the Modular CLI

The magic command-line tool from Modular installs and manages everything Mojo needs. Think of it as your toolchain manager.

Pick a Supported System

Mojo runs on macOS and Linux today. On Windows you use WSL, which gives you a Linux environment inside Windows.

Open Your Terminal

Everything here happens in the terminal. On macOS open Terminal, on Linux open your shell, and keep it ready for the next commands.

Run the Install Script

Install the CLI with the official script. This single curl command downloads and sets up the magic tool for you.

curl -ssL https://magic.modular.com/ | bash

What the Script Does

The script places the magic binary in a local folder and prints a line to add it to your PATH so the shell can find it.

Update Your PATH

Copy the export line the installer shows into your shell config so PATH includes magic in every new terminal you open.

export PATH="$HOME/.modular/bin:$PATH"

Reload the Shell

Apply the change by reloading your config or opening a fresh terminal. This is what makes the new magic command available.

source ~/.bashrc

Confirm the CLI Works

Check that the install succeeded by asking magic for its version. A version number means the CLI is ready to use.

magic --version

If the Command Is Not Found

A not-found error almost always means PATH is missing the magic folder. Re-check the export line and reload your terminal.

It Is Safe and Reversible

Everything installs into a local .modular folder in your home directory. To undo it later, you simply delete that folder.

Quick Check

Recall which tool you install first to manage Mojo on your machine.

Recap

You installed Modular's magic CLI with one curl command, fixed your PATH, and confirmed it with magic --version. Toolchain manager ready! 🎯

الأسئلة الشائعة

هل درس «تثبيت Modular CLI» مجاني؟

نعم — نص درس «تثبيت Modular CLI» كامل متاح مجاناً هنا على الويب. لتمرينه بشكل تفاعلي (محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7) وفتح باقي دورة Mojo Academy، انتقل إلى CoddyKit PRO. تتضمن دورة Mojo Academy 4 دروس في المجموع.

ماذا ستتعلم في «تثبيت Modular CLI»؟

ثبّت سلسلة الأدوات على macOS أو Linux تتمرن على Mojo Academy مع أكواد عملية تشغلها مباشرة في المتصفح، ومدرس ذكاء اصطناعي متاح 24/7 يجيب على أسئلتك أثناء عملك.

هل أحتاج إلى خبرة سابقة لأبدأ Mojo Academy؟

لا تُشترط خبرة سابقة. Mojo Academy على CoddyKit منظم للمبتدئين حتى المتقدمين، لذا يمكنك البدء من هنا أو من البداية والتقدم بسرعتك الخاصة. هذا هو الدرس 1 من أصل 4.

كم من الوقت يستغرق درس «تثبيت Modular CLI»؟

معظم دروس CoddyKit تستغرق حوالي 5–10 دقائق. كل منها موجز وتفاعلي، لذا تحرز تقدماً مستمراً وتستأنف من حيث توقفت عبر الويب والتطبيق.

هل يمكنني كتابة وتشغيل أكواد في درس Mojo Academy هذا؟

نعم. كل درس في Mojo Academy يتضمن محرر أكواد مدمج، لذا تكتب وتشغل أكواداً حقيقية مباشرة في متصفحك وتحصل على تعليقات فورية من الذكاء الاصطناعي — بدون إعداد محلي.

جميع الدروس في هذه الدورة

  1. تثبيت Modular CLI
  2. إضافة حزمة Mojo
  3. التحقق من الإصدار
  4. إعداد محررك لـ Mojo
← العودة إلى Mojo Academy