Napacitor CLI
The Napacitor CLI (@napacitor/cli) is the command-line tool for creating, building, and managing Napacitor apps. The native platform is a single .NET MAUI Blazor host project, so instead of per-platform commands (add ios, add android) there is one platform command: nap add maui.
Install
Install the CLI as a dev dependency in your project:
npm install @napacitor/cli --save-dev
Run any command with npx nap <command>.
Commands
| Command | Description |
|---|---|
init | Initialize a new app, writing napacitor.config.json |
add | Generate the MAUI host project from the embedded template |
assets | Apply icons / splash screens / theme colors to the host (MAUI Resizetizer) |
copy | Copy the web build output into the host wwwroot |
sync | copy + regenerate napacitor.build.props (wires plugin C# projects) |
open | Open the host project with the OS default handler |
build | Build the host project (dotnet build) |
clean | Clean host build artifacts (dotnet clean) |
run | Build and run the app on a target device (dotnet build -t:Run) |
list | List installed @napacitor/* packages |
help | Print usage help |
All commands accept an optional platform argument (maui) which can be omitted — Napacitor currently has a single native platform target.
Common options
--target <windows|android|ios|maccatalyst>— target platform forbuild/clean/run. Defaults towindowson Windows andandroidelsewhere.-c <Debug|Release>— build configuration forbuild/clean/run. Defaults toDebug.
Configuration
The CLI reads and writes napacitor.config.json in the app root. See Configuring your app for the available options.
Learn about the full workflow in the Workflow guide.