Modular CLIのインストール
macOSまたはLinuxにツールチェーンを導入します
「Modular CLIのインストール」はCoddyKit上の無料Mojo Academyレッスンです。 これはレッスン1/4です。 下記で完全なレッスンを無料で読むことができます。その後、ブラウザ内の組み込みコードエディタと24時間対応のAIチューターでハンズオン演習できます。 これは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/ | bashWhat 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 ~/.bashrcConfirm 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 --versionIf 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時間対応のAIチューター)、Mojo Academyコースの残りをアンロックするには、CoddyKit PROにアップグレードしてください。 Mojo Academyコースには全4レッスンが含まれています。
「Modular CLIのインストール」で何を学びますか?
macOSまたはLinuxにツールチェーンを導入します ブラウザで直接実行するハンズオンコードでMojo Academyを演習し、24時間対応のAIチューターがレッスンを進める中での質問に答えます。
Mojo Academyを始めるのに経験は必要ですか?
事前経験は必要ありません。CoddyKitのMojo Academyは初級者から上級者向けに構成されているため、ここから始めるか最初から始めて、自分のペースで進むことができます。 これはレッスン1/4です。
「Modular CLIのインストール」レッスンにはどのくらい時間がかかりますか?
ほとんどのCoddyKitレッスンは約5~10分かかります。各レッスンはコンパクトでインタラクティブなので、着実に進歩し、ウェブとアプリ全体で正確に前回の場所から再開できます。
このMojo Academyレッスンでコードを書いて実行できますか?
はい。すべてのMojo Academyレッスンに組み込みコードエディタが含まれているため、ブラウザでリアルコードを書いて実行し、即座のAIフィードバックを取得できます。ローカル設定は不要です。
このコースのすべてのレッスン
- Modular CLIのインストール
- Mojoパッケージの追加
- バージョンの確認
- Mojoのエディター設定