0Pricing
Mojo Academy · レッスン

Mojoパッケージの追加

Modularツールチェーンを通じてMojoをインストールします

「Mojoパッケージの追加」はCoddyKit上の無料Mojo Academyレッスンです。 これはレッスン2/4です。 下記で完全なレッスンを無料で読むことができます。その後、ブラウザ内の組み込みコードエディタと24時間対応のAIチューターでハンズオン演習できます。 これはMojo Academy学習パスの一部であり、ウェブとCoddyKitアプリ全体で進捗が同期されます。 Mojo Academyコースには全4レッスンが含まれています。

このレッスンの一部はまだ翻訳されておらず、英語で表示されています。

The CLI Is Not Mojo Yet

Installing magic gave you the manager, not the language. Now you add Mojo itself into a project through that toolchain. 📦

Projects Hold Your Toolchain

With magic, Mojo lives inside a project folder. Each project gets its own pinned version, so different apps never clash.

Create a New Project

Start by making a project. The magic init command scaffolds a folder ready to hold Mojo and its dependencies.

magic init my-mojo-app

Step Into the Folder

Move into the new directory so the next commands run in the right place. This folder is your project root.

cd my-mojo-app

Add the Mojo Package

Pull Mojo into the project with magic add. This downloads the compiler and standard library as a package the project depends on.

magic add mojo

The Manifest File

Your dependencies are tracked in a pixi.toml manifest. Adding mojo records it there so the setup is reproducible later.

The Lock File

Alongside the manifest sits a lock file pinning exact versions. It guarantees teammates get the very same toolchain you have.

Enter the Environment

Activate the project so its tools are on your PATH. Inside a magic shell, the mojo command becomes available to you.

magic shell

Run Without Activating

Prefer not to enter a shell? Prefix any command with magic run to use the project's Mojo for just that one command.

magic run mojo --version

Mojo Is Now Local

Because Mojo lives in the project, deleting the folder removes it cleanly. Nothing is scattered globally across your system.

Share It with Others

Commit pixi.toml and the lock file to git. A teammate then runs magic install to recreate the exact same Mojo setup.

magic install

Quick Check

Recall the command that pulls Mojo into your project after you create it.

Recap

You ran magic init, then magic add mojo, and the package landed in pixi.toml. Enter it with magic shell to use mojo. 🎯

よくある質問

「Mojoパッケージの追加」レッスンは無料ですか?

はい。「Mojoパッケージの追加」の完全なテキストはこのウェブで無料で読めます。インタラクティブに演習し(組み込みコードエディタと24時間対応のAIチューター)、Mojo Academyコースの残りをアンロックするには、CoddyKit PROにアップグレードしてください。 Mojo Academyコースには全4レッスンが含まれています。

「Mojoパッケージの追加」で何を学びますか?

Modularツールチェーンを通じてMojoをインストールします ブラウザで直接実行するハンズオンコードでMojo Academyを演習し、24時間対応のAIチューターがレッスンを進める中での質問に答えます。

Mojo Academyを始めるのに経験は必要ですか?

事前経験は必要ありません。CoddyKitのMojo Academyは初級者から上級者向けに構成されているため、ここから始めるか最初から始めて、自分のペースで進むことができます。 これはレッスン2/4です。

「Mojoパッケージの追加」レッスンにはどのくらい時間がかかりますか?

ほとんどのCoddyKitレッスンは約5~10分かかります。各レッスンはコンパクトでインタラクティブなので、着実に進歩し、ウェブとアプリ全体で正確に前回の場所から再開できます。

このMojo Academyレッスンでコードを書いて実行できますか?

はい。すべてのMojo Academyレッスンに組み込みコードエディタが含まれているため、ブラウザでリアルコードを書いて実行し、即座のAIフィードバックを取得できます。ローカル設定は不要です。

このコースのすべてのレッスン

  1. Modular CLIのインストール
  2. Mojoパッケージの追加
  3. バージョンの確認
  4. Mojoのエディター設定
← Mojo Academyに戻る