-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
Building Microservices with Micronaut®
By :
In order to get started with the Micronaut framework, we will begin by installing the Micronaut CLI on Mac and Windows OS.
On mac OS, we can install the Micronaut CLI in a couple of ways – using SDKMAN!, Homebrew, or MacPorts. In the following sections, we will cover step-by-step instructions to install the Micronaut CLI.
Please follow these steps to install the Micronaut CLI using SDKMAN!:
a. Type or paste the following command:
curl -s https://get.sdkman.io | bash
b. Next, type or paste the following command:
source "$HOME/.sdkman/bin/sdkman-init.sh"
source sdk install micronaut
You will observe the following interactions on Terminal while installing the Micronaut CLI:

Figure 1.5 – Installing Micronaut CLI on mac OS using SDKMAN!
mn -version
Please follow these steps to install the Micronaut CLI using MacPorts:
a. Type or paste the following command:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
b. Next, type or paste the following command:
brew update
brew install micronaut
You will observe the following interactions on Terminal while installing the Micronaut CLI:

Figure 1.6 – Installing the Micronaut CLI on mac OS using HomeBrew
mn -version
Please follow these steps to install the Micronaut CLI using Homebrew:
sudo port sync
sudo port install micronaut
You will observe the following interactions on Terminal while installing the Micronaut CLI:

Figure 1.7 – Installing the Micronaut CLI on macOS using MacPorts
mn -version
Please follow these steps to install the Micronaut CLI on Windows:
C:\Program Files\Micronaut.MICRONAUT_HOME with the preceding directory path. Please note to add this variable under system variables (not user variables).PATH environment variable. You can add a path such as %MICRONAUT_HOME%\bin.mn
This will boot up the CLI for the first time by resolving any dependencies.
mn – h
This is what the command outputs:

Figure 1.8 – Installing the Micronaut CLI on Windows OS
In this section, we explored different ways to install the Micronaut CLI in Windows and macOS. In order to get hands-on with the Micronaut framework, we will get started with working on a hello world project in the next section.