You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

请教如何安装Micronaut CLI?文档中未找到安装指引

Hey there, I totally get how frustrating it is when you’re ready to dive into using a tool but can’t track down the setup steps! Let me walk you through how to install the Micronaut CLI (mn) since the official docs you checked seem to skip over that critical part.

Installing the Micronaut CLI (mn)

Below are the official, supported installation methods that should work across all major platforms:

This is the go-to method for most developers, as it handles version management seamlessly:

  • Open your terminal and run this command to install the latest stable version:
    sdk install micronaut
    
  • To confirm the installation was successful, run:
    mn --version
    
    You should see the installed Micronaut version printed out in your terminal.

Using Homebrew (macOS/Linux)

If you’re on a Mac or using Linux with Homebrew set up, this is a quick option:

  • Run the following in your terminal:
    brew install micronaut
    
  • Verify the installation the same way as above:
    mn --version
    

Manual Installation (All Platforms)

If you prefer not to use a package manager, you can install manually:

  1. Navigate to the official Micronaut downloads section (accessible from the main site)
  2. Download the ZIP archive matching your operating system
  3. Extract the ZIP file to a directory of your choice (e.g., ~/micronaut on macOS/Linux, C:\micronaut on Windows)
  4. Add the bin subdirectory from the extracted folder to your system’s PATH environment variable:
    • Linux/macOS: Edit your shell config file (like ~/.bashrc, ~/.zshrc, or ~/.profile) and add this line (replace /path/to/micronaut with your actual extraction path):
      export PATH="$PATH:/path/to/micronaut/bin"
      
      Then run source ~/.bashrc (or the relevant config file) to apply the change immediately.
    • Windows: Open System Properties > Advanced > Environment Variables, find the Path variable under System Variables, edit it, and add the full path to the bin folder (e.g., C:\micronaut\bin).
  5. Finally, confirm it’s working with mn --version

Once mn is installed, you can jump right into using all those examples from the docs—like creating a new project with mn create-app com.example.myapp or generating controllers with mn create-controller com.example.MyController.

内容的提问来源于stack exchange,提问作者Eduardo Lago Aguilar

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.28 10:09:49