Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

wails

БесплатноБез исполняемых скриптовНе проверен

Quick reference for Wails v3, the Go + native-webview desktop framework. Use whenever the task touches a Wails project — `build/config.yml`…

whamот wham★ 16 звёзд на GitHub

Об этом скилле

Wails v3

Wails builds desktop apps from a Go backend and a web frontend that runs inside the platform's native webview — WebView2 on Windows, WKWebView on macOS, WebKitGTK on Linux. There is no embedded Chromium. The Go process and the webview talk over an HTTP-based IPC transport that the generated bindings and the runtime package sit on top of.

v3 is a rewrite, not a version bump. If you are reading v2 code or v2 answers, everything below is different.

Mental model

┌──────────────────── Go process ─────────────────────┐
│  app := application.New(application.Options{        │
│      Services: []application.Service{               │
│          application.NewService(&MyService{}),      │
│      },                                             │
│      Assets: application.AssetOptions{              │
│          Handler: application.AssetFileServerFS(fs) │
│      },                                             │
│  })                                                 │
│  win := app.Window.NewWithOptions(...)              │
│  app.Run()                                          │
│                                                     │
│  app.Event / app.Dialog / app.Menu / app.Window ... │
│        ▲                                            │
└────────┼────────────────────────────────────────────┘
         │  IPC: fetch("/wails/runtime") + events
┌────────┼────────────────────────────────────────────┐
│  webview                                            │
│   import { Greet } from "./bindings/<pkg>/service"; │
│   import { Events, Window } from "@wailsio/runtime";│
└─────────────────────────────────────────────────────┘

Three things carry the whole difference from v2:

  • There is no ambient context. v2 threaded context.Context into every runtime.* call. v3 has methods on objects: window.SetTitle(…), app.Event.Emit(…), app.Dialog.OpenFile(). A service that needs them keeps an *application.App (and a window) of its own.
  • Bound structs are services. Bind: []interface{}{app} became Services: []application.Service{application.NewService(&app)}. Lifecycle is the optional ServiceStartup(ctx, options) error / ServiceShutdown() error methods on the service itself.
  • Windows are first class and there can be many. app.Window.New() / NewWithOptions(...) at any time; each is an object with its own methods and events.

Generated frontend code

wails3 generate bindings writes a tree under frontend/bindings/ (-d relocates it), laid out by Go import path:

frontend/bindings/
└── github.com/you/yourapp/
    ├── myservice.ts     # one file per service, one export per method
    ├── models.ts        # classes for the Go types those methods name
    └── index.ts         # re-exports both

The files import @wailsio/runtime (an npm dependency) unless generated with -b, which inlines a bundled copy instead. Methods return a CancellablePromise. Don't hand-edit them; do commit them if your build expects them to be there.

Project layout (template default)

.
├── main.go            # application.New + //go:embed all:frontend/dist
├── greetservice.go    # a service
├── Taskfile.yml       # the build; `wails3 build` and `wails3 package` run its tasks
├── go.mod
├── build/
│   ├── config.yml     # project config: info, dev_mode, fileAssociations, protocols
│   ├── appicon.png    # source icon
│   ├── Taskfile.*.yml # per-platform build/package tasks
│   ├── Info.plist     # macOS (+ Info.dev.plist)
│   └── nsis/, appimage/
└── frontend/
    ├── package.json   # depends on @wailsio/runtime
    ├── src/
    ├── dist/          # build output, embedded by go:embed
    └── bindings/      # generated

The cheatsheet

# Install / update CLI
go install github.com/wailsapp/wails/v3/cmd/wails3@latest
wails3 doctor                       # diagnose toolchain & system deps

# New project
wails3 init -n MyApp -t react-ts

# Develop: watches Go files, runs the processes in build/config.yml's dev_mode
wails3 dev
wails3 dev -config ./build/config.yml -port 9245

# Build / package — these are Taskfile wrappers, not builders
wails3 build                        # runs the `build` task
wails3 package                      # runs the `package` task (bundle/installer)
wails3 task --list

# Generate
wails3 generate bindings -d frontend/bindings -ts     # TypeScript
wails3 generate icons -windowsfilename ""             # build/darwin/icon.icns
wails3 update build-assets -config build/config.yml   # re-render plists etc.

A project without Taskfiles uses the CLI for generation only and builds with plain go build; the produced binary needs nothing else to run. Bundling it is the platform's own recipe — on macOS, a directory holding Contents/MacOS/<binary>, Contents/Resources/icon.icns and Contents/Info.plist.

Where to read deeper

Pull these in only when the task actually needs them:

  • CLI — every command and flag for init, dev, `build
Полный SKILL.md на GitHub

Установить wails в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

references/bindings.mdreferences/cli.mdreferences/config.mdreferences/gotchas.mdreferences/options.mdreferences/runtime.md

FAQ

Что делает скилл wails?

Quick reference for Wails v3, the Go + native-webview desktop framework. Use whenever the task touches a Wails project — `build/config.yml`, `application.New`, `application.Options`, `app.Window`/`app.Event`/`app.Dialog`/`app.Menu`, services and `ServiceStartup`, the generated bindings under `frontend/bindings/`, the `@wailsio/runtime` npm package, `wails3 dev` / `wails3 generate bindings` / `wails3 task`, embedded `frontend/dist`, code signing, or anything in `desktop/main.go` that wires up a Wails app. Also use when the user mentions WebView2, WebKitGTK, or "the desktop build."

Как установить скилл wails?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл wails запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить wails с