Wox Plugin Creator
Quick Start
- Scaffold a Node.js plugin (clones template repo):
python3 scripts/scaffold_wox_plugin.py --type nodejs --output-dir ./MyPlugin --name "My Plugin" --trigger-keywords my
- Scaffold a Python plugin (clones template repo):
python3 scripts/scaffold_wox_plugin.py --type python --output-dir ./MyPlugin --name "My Plugin" --trigger-keywords my
- Scaffold a single-file SDK plugin (uses local templates; plugin-id auto-generated; single file output):
python3 scripts/scaffold_wox_plugin.py --type singlefile-python --output-dir ./Wox.Plugin.Weather.py --name "Weather" --trigger-keywords weatherpython3 scripts/scaffold_wox_plugin.py --type singlefile-nodejs --output-dir ./Wox.Plugin.Weather.js --name "Weather" --trigger-keywords weather
- Scaffold a script plugin (uses local templates; plugin-id auto-generated; single file output):
python3 scripts/scaffold_wox_plugin.py --type script-nodejs --output-dir ./Wox.Plugin.Script.MyScript.js --name "My Script" --trigger-keywords my
Choose a plugin type
- Script plugin: one-shot shell/command wrapper. Wox starts a process per query over stdin/stdout JSON-RPC. Limited Public API.
- Single-file SDK plugin: one
.pyor CommonJS.jsfile with full Public API, loaded into the existing Python/Node runtime host. No extra process per query. Save reloads the plugin. Requires Wox 2.4.2+; headerMinWoxVersionmust be"2.4.2". - SDK plugin (
.wox): multi-file package with dependencies, resources, TypeScript, andplugin.json.
Single-file Python is the fastest path to a Python SDK plugin. Node.js first version must stay CommonJS (module.exports.plugin) and must not import @wox-launcher/wox-plugin.
Workflow
1) Scaffold plugin files
- Use
scripts/scaffold_wox_plugin.pyfornodejs,python,script-nodejs,script-python,singlefile-python, orsinglefile-nodejs. - Pass
--nameand--trigger-keywordsfor every runtime. The scaffold exits without them. - For Node.js and Python packages, the scaffold clones the official template repos and replaces placeholders like
{{.ID}},{{.Name}},{{.Description}},{{.TriggerKeywordsJSON}},{{.Author}}. - Before starting work in a new SDK plugin project, run
make initin the project root when the project has not been initialized yet. - Script plugins are single-file process-per-query plugins. Prefer filenames like
Wox.Plugin.Script.<Name>.<ext>(e.g.,Wox.Plugin.Script.Memos.py). - Single-file SDK plugins are single-file host-loaded plugins. Prefer filenames like
Wox.Plugin.<Name>.pyorWox.Plugin.<Name>.js. - Single-file SDK plugins must set header
MinWoxVersionto"2.4.2". The scaffold applies this default when--min-wox-versionis omitted. Do not lower it; Wox 2.4.2 is the first release that can load this plugin type, and store/CI reject older floors. - For script plugins, the scaffold copies Wox script templates from
~/.wox/ai/skills/wox-plugin-creator/assets/script_plugin_templates/and fills metadata placeholders. - For single-file SDK plugins, the scaffold copies templates from
~/.wox/ai/skills/wox-plugin-creator/assets/single_file_plugin_templates/(or the repo.agents/skills/wox-plugin-creator/assets/single_file_plugin_templates/fallback). - Prefer standard library features; avoid third-party dependencies unless absolutely necessary. Single-file SDK plugins cannot use pip/npm packages.
- For SDK usage and API details, read
references/sdk_nodejs.mdorreferences/sdk_python.md. - For
plugin.json,SettingDefinitions,QueryRequirements, validators, dynamic settings, and feature flags, readreferences/plugin_json_schema.mdfirst. - SDK and single-file SDK plugins must persist and read settings through the Public API setting methods (
GetSetting/SaveSetting/OnSettingChanged, or Pythonget_setting/save_setting/on_setting_changed). These values participate in Wox cloud sync and can follow the user across machines. Do not store plugin settings in local files, custom JSON, or other side storage unless the value is truly machine-local and cannot live in settings.
Cache files first: use the plugin cache folder
If a plugin needs to cache anything on disk, put it under the Wox plugin cache folder. Do this before inventing a local cache/, tmp/, downloads/, or data/ directory.
- SDK and single-file SDK: call
GetCacheFolder(ctx)/get_cache_folder(ctx)ininit(), keep the path, then write files under it (downloads/,thumbs/, query JSON, and so on). - Script plugins: use
WOX_DIRECTORY_PLUGIN_CACHE. It is the same~/.wox/cache/plugins/<plugin-id>/folder. - Wox creates the folder if needed and deletes it when the plugin is uninstalled. That is why cache must live here, not beside the plugin file, not under user data, and not under a hardcoded name such as
gifbox-script-plugin. - Settings are not cache. User preferences, API keys, and favorites go through the setting APIs so they can sync. Downloads, thumbnails, and search-result files go in the cache folder.
- When authoring
SettingDefinitions, always decide whether each setting is platform-specific before shipping it. Wox cloud sync replicates normal plugin settings across devices, so local paths, executable paths, shell commands, hotkeys, system integrations, browser profiles, and application paths should usually setIsPlatformSpecific: true. Account IDs, API keys, remote service hosts, and cross-platform user preferences should usually keepIsPlatformSpecific: false. - Use
DisabledInPlatformsonly to disable a setting on selected platforms. It does not isolate stored values; useIsPlatformSpecificwhen the value must differ per platform after cloud sync. - When a plugin cannot run a query without required settings such as access keys, declare those requirements in metadata
QueryRequirementsinstead of returning ad hoc setup results fromquery(). - For ready-to-copy patterns such as validated textbox/select fields, editable tables, AI model selectors, and dynamic preview settings, read
references/settings_patterns.md. - For Python settings APIs, note that helper builders are limited; advanced settings are often created by constructing
PluginSettingDefinitionItemand value objects directly.
2) Author result and action icons
- Read
references/icons.mdfor icon selection, inline SVG patterns, and placement rules. - When the requested icon semantics already match a bundled generic icon under
assets/iconify/, prefer reusing that local reference before searching for a new one. - Use
scripts/search_iconify.pyto search Iconify collections and fetch ready-to-inline SVG constants foricons.tsoricons.py. - Single-file SDK plugins cannot use relative image paths. Use emoji, URL, SVG, base64, or an absolute path.
3) Package and submit plugin
- For SDK plugins cloned from templates, run
make packageinside the template repo. - For submitting a plugin to the official Wox store, prefer
wox-plugin-submit2storeskill. - Script plugins do not use
plugin.json; they embed a JSON metadata block in the script header comments. - Single-file SDK plugins also embed JSON metadata in the file header. Keep
MinWoxVersionas"2.4.2". Store delivery uses a.pyor.jsdownload URL withRuntimePYTHONorNODEJS. Do not mix those suffixes withSCRIPTor.wox.
Runtime Requirements
Wox enforces the same interpreter floors for SDK plugins, single-file SDK plugins, and script plugins. Store install fails, and queries show a setup result, when the machine is below these versions:
- Python: 3.10 or later
- Node.js: 20 or later
Do not target older interpreters. Script plugins still use the user's system Python or Node.js; they do not use a bundled runtime. Single-file SDK plugins run inside Wox's existing Python/Node runtime host and require Wox 2.4.2 or later (MinWoxVersion: "2.4.2").
Resources
- scripts:
scripts/scaffold_wox_plugin.py,scripts/search_iconify.py - references:
references/plugin_overview.md,references/scaffold_nodejs.md,references/scaffold_python.md,references/sdk_nodejs.md,references/sdk_python.md,references/plugin_json_schema.md,references/settings_patterns.md,references/plugin_i18n.md,references/icons.md - assets:
assets/script_plugin_templates/,assets/single_file_plugin_templates/,assets/iconify/