0Pricing
Mojo Academy · Aula

Instalando a CLI da Modular

Instale a cadeia de ferramentas no macOS ou Linux.

Instalando a CLI da Modular é uma aula grátis de Mojo Academy no CoddyKit. Esta é a aula 1 de 4. Você pode ler a aula completa abaixo gratuitamente — depois pratica ao vivo no navegador com um editor de código integrado e um tutor de IA 24/7. Faz parte do caminho de aprendizado de Mojo Academy, e seu progresso é sincronizado entre a web e o app CoddyKit. O curso de Mojo Academy inclui 4 aulas no total.

Partes desta aula ainda não foram traduzidas e aparecem em inglês.

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! 🎯

Perguntas Frequentes

A aula “Instalando a CLI da Modular” é grátis?

Sim — o texto completo de “Instalando a CLI da Modular” é grátis para ler aqui na web. Para praticá-la interativamente (um editor de código integrado e um tutor de IA 24/7) e desbloquear o restante do curso de Mojo Academy, atualize para CoddyKit PRO. O curso de Mojo Academy inclui 4 aulas no total.

O que vou aprender em “Instalando a CLI da Modular”?

Instale a cadeia de ferramentas no macOS ou Linux. Você pratica Mojo Academy com código prático que executa diretamente no navegador, e um tutor de IA 24/7 responde suas dúvidas enquanto trabalha na aula.

Preciso ter experiência prévia para começar Mojo Academy?

Nenhuma experiência prévia é necessária. Mojo Academy no CoddyKit é estruturado para alunos iniciantes até avançados, então você pode começar aqui ou desde o início e aprender no seu ritmo. Esta é a aula 1 de 4.

Quanto tempo leva a aula “Instalando a CLI da Modular”?

A maioria das aulas CoddyKit leva cerca de 5–10 minutos. Cada uma é compacta e interativa, então você faz progresso constante e retoma exatamente de onde parou entre web e app.

Posso escrever e executar código nesta aula de Mojo Academy?

Sim. Cada aula de Mojo Academy inclui um editor de código integrado, então você escreve e executa código real direto no navegador e recebe feedback de IA instantaneamente — nenhuma configuração local necessária.

Todas as aulas deste curso

  1. Instalando a CLI da Modular
  2. Adicionando o pacote Mojo
  3. Verificando sua versão
  4. Configurando seu editor para Mojo
← Voltar para Mojo Academy