콘텐츠로 이동

CLI Reference

이 콘텐츠는 아직 번역되지 않았습니다.

The Wails CLI (wails3) is the command-line entry point for creating, developing, building, signing, packaging, and inspecting Wails 3 applications. Most build orchestration is delegated to per-project Taskfiles (under build/ in your project) — many wails3 commands are thin wrappers that invoke a specific task.

For the most up-to-date help on any command, run:

Terminal window
wails3 --help
wails3 <command> --help
CommandDescription
wails3 initCreate a new project from a template. Flags: -n (project name), -t (template, default vanilla), -p (Go package name, default main), -d (project directory, default .), -q (quiet), -l (list templates), -mod (Go module path), --git (Git repository URL), --skipgomodtidy, -s (skip remote-template warning), --productname/--productdescription/--productversion/--productcompany/--productcopyright/--productcomments/--productidentifier.
wails3 devRun the application in development mode with frontend hot reload. Flags: --config (default ./build/config.yml), --port (Vite dev port), -s (enable HTTPS).
wails3 buildBuild the project. Thin wrapper around the Taskfile build task. Flags: --tags (forwarded as EXTRA_TAGS=), --obfuscated (build with Garble; see Obfuscated Builds), --garbleargs (extra flags forwarded to garble before the build subcommand).
wails3 packageRun the platform-specific package Taskfile task.
wails3 task [name]Run any Taskfile task; with no name, --list shows every registered task.
wails3 doctorPrint a diagnostic report of your environment.
wails3 doctor-ngNewer TUI variant of doctor.
wails3 versionPrint the CLI version.
wails3 releasenotesPrint recent release notes.
wails3 docsOpen the docs site in your browser.
wails3 sponsorOpen the sponsor page.

wails3 generate <subcommand>:

SubcommandDescription
generate bindingsGenerate Go-to-frontend bindings. Flags: -d (output dir), -models, -index, -ts, -i (interfaces), -b (bundle), -names (emit Call.ByName), -noevents, -noindex, -dry, -silent, -v, -clean (default true), -f, -obfuscated (generate wails_obfuscated.gen.go with stable binding IDs for Garble builds; see Obfuscated Builds), -obfuscated-output (directory for the generated file; defaults to the main package directory). Accepts package patterns (e.g. ./...); falls back to the current directory if none given.
generate iconsConvert a source PNG into the platform icon formats. Flags: -input, -windowsfilename, -macfilename, -iconcomposerinput, -macassetdir.
generate build-assetsGenerate the build/ directory contents (Taskfile snippets, NSIS files, Info.plist, .desktop template, etc.) from build/config.yml.
generate runtimeRegenerate the pre-built /wails/runtime.js shipped to the webview.
generate sysoGenerate the Windows .syso resource file (icon + manifest + version info).
generate webview2bootstrapperGenerate a WebView2 bootstrap installer for Windows.
generate constantsGenerate JS event-name constants from Go event types.
generate templateScaffold a new project template.
generate .desktopGenerate a Linux .desktop file (used by AppImage/DEB/RPM).
generate appimageGenerate the AppImage build directory.

wails3 update <subcommand>:

SubcommandDescription
update build-assetsRefresh the build/ directory from build/config.yml (preserves user edits where possible).
update cliSelf-update the wails3 binary.
CommandDescription
wails3 setup signingInteractive wizard that configures signing for the platforms it detects in build/. Flags: --platform (repeatable; defaults to auto-detect from build directory).
wails3 setup entitlementsInteractive wizard for macOS entitlements. Flag: --output (path; default build/darwin/entitlements.plist).
wails3 sign [GOOS=…]Wrapper that runs the platform-specific *:sign Taskfile task for the current OS (or the one specified via GOOS).
wails3 tool signLow-level direct signing entry point. Flags: --input, --output, --verbose, --certificate, --password, --thumbprint, --timestamp, --identity, --entitlements, --hardened-runtime, --notarize, --keychain-profile, --pgp-key, --pgp-password, --role.

There is no wails3 signing subcommand — for keychain credentials use xcrun notarytool store-credentials, and for PGP keys use gpg directly (the wails3 setup signing wizard automates both).

wails3 tool <subcommand>:

SubcommandDescription
tool checkportCheck whether a TCP port is open (useful for waiting on Vite).
tool watcherRun a command whenever watched files change.
tool cpCross-platform file copy.
tool buildinfoPrint the embedded Go build info from a binary.
tool packageBuild a Linux package (deb, rpm, archlinux) from build/linux/nfpm.
tool versionBump a project’s semantic version.
tool lipoCombine multiple macOS architecture binaries into a universal binary.
tool capabilitiesProbe the system for GTK3/GTK4 / WebKit availability.
tool sign(See Code signing & packaging.)

wails3 service <subcommand>:

SubcommandDescription
service initScaffold a new service package.

wails3 ios <subcommand>:

SubcommandDescription
ios overlay:genGenerate the Go overlay for the iOS bridge shim.
ios xcode:genGenerate an Xcode project in the output directory.
  • Native binaries land in bin/<APP_NAME> (or bin/<APP_NAME>.exe on Windows). There is no build/bin/.
  • Packaged outputs (.app, .dmg, NSIS installer, MSIX, DEB/RPM/AppImage) likewise land in bin/ (or under platform-specific subdirectories created by the relevant Taskfile task).
FlagApplies toDescription
--no-colourAll commandsDisable ANSI colour in CLI output.

Questions? Ask in Discord or check the examples.