mn
micronaut CLI for scaffolding applications and generating code
TLDR
Create a new application
SYNOPSIS
mn command [options] [args...]
DESCRIPTION
mn is the Micronaut CLI for scaffolding applications and generating code. Micronaut is a JVM framework for building cloud-native microservices.
create-app generates a project with build files, application class, and configuration. Features add dependencies and configuration automatically.
Micronaut uses compile-time dependency injection—no reflection at runtime. This enables fast startup and low memory, especially with GraalVM native images.
Code generators (create-controller, create-bean, etc.) add classes following Micronaut conventions. Generated code includes annotations for injection, HTTP routing, and testing.
Interactive mode provides tab completion for commands and features. Use feature-diff to see what a feature adds to the project.
PARAMETERS
--features list
Comma-separated feature list.--build tool
Build tool: gradle (default), gradle-kotlin, maven.--lang language
Language: java (default), kotlin, groovy.--jdk version
Target JDK version.--test framework
Test framework: junit, spock, kotest.--inplace
Create in current directory.-i, --interactive
Interactive mode.
COMMANDS
create-app name
Create new Micronaut application.create-function name
Create serverless function project.create-cli-app name
Create CLI application.create-grpc-app name
Create gRPC application.create-messaging-app name
Create messaging application.create-controller name
Generate controller class.create-bean name
Generate service bean.create-client name
Generate HTTP client.create-job name
Generate scheduled job.create-test name
Generate test class.feature-diff
Compare feature differences.
FEATURES
data-jdbc, data-jpa, hibernate-jpa
Database access options.postgres, mysql, h2
Database drivers.security-jwt, security-oauth2
Security features.kafka, rabbitmq, nats
Messaging integration.graalvm
Native image support.openapi
OpenAPI/Swagger documentation.graphql
GraphQL support.
CAVEATS
Compile-time DI requires annotation processors configured correctly. Some features may conflict. Native image requires GraalVM and additional configuration. Generator creates files in conventional locations.
HISTORY
Micronaut was created by Graeme Rocher (creator of Grails) at Object Computing, Inc. and released in 2018. It was designed to address startup time and memory issues in traditional frameworks like Spring. Micronaut pioneered compile-time DI in the Java ecosystem. Version 4.0 (2023) brought modular architecture. The framework is popular for serverless and Kubernetes deployments.
SEE ALSO
gradle(1), maven(1), quarkus(1), spring-boot(1)
