.agents/skills/wox-plugin-creator/references/plugin_overview.md
This document provides a high-level overview of the Wox plugin system for developers and AI agents.
A Wox plugin is an event-driven module that interacts with the main application via JSON-RPC.
npm) or a global query.Designed for complex, production-grade extensions. Wox manages the lifecycle of these plugins.
@wox-launcher/wox-plugin. Requires Node.js 20+.wox-plugin.Benefits:
.wox package.One .py or CommonJS .js file that loads into the existing Python or Node.js runtime host.
MinWoxVersion must be "2.4.2".import wox_plugin. Node.js first version must use module.exports.plugin and params.API; it cannot import @wox-launcher/wox-plugin.Designed for simple, one-off tasks or shell scripts.
Script plugins are not deprecated. Use them when a one-shot command wrapper is enough.
assets/single_file_plugin_templates/, or wpm create.assets/script_plugin_templates/.plugin.json to define metadata, trigger keywords, supported OS, features, i18n, and SettingDefinitions.MinWoxVersion as "2.4.2".init(): Initialize API clients and load settings. Called on every load/reload for SDK and single-file SDK plugins. Read and write settings through the Public API setting methods so values can sync across machines. If the plugin will cache files, resolve get_cache_folder / GetCacheFolder here and write later files under that path.query(): Handle user input and return Result[].I18n field in plugin.json or the file header (recommended) or lang/ files for packaged plugins. Single-file plugins only support inline I18n. See plugin_i18n.get_cache_folder / GetCacheFolder first (~/.wox/cache/plugins/<plugin-id>/). Do not create a sibling cache/ directory. Script plugins use WOX_DIRECTORY_PLUGIN_CACHE. Wox deletes this folder on uninstall.references/plugin_json_schema.md before authoring SettingDefinitions.references/settings_patterns.md.Single-file SDK plugins are the fastest way to get a Python or Node.js plugin that can call the full Wox API. They require Wox 2.4.2 or later.
wpm create <name> and choose Python or Node.js single-file, or start from assets/single_file_plugin_templates/..py or .js file and update the JSON metadata block in comments. Keep MinWoxVersion as "2.4.2".query in the same file. Saving reloads the plugin.TriggerKeywords in Wox.Script plugins are the fastest way to wrap a command with no SDK host.
assets/script_plugin_templates/..py or .js file and update the JSON metadata block in comments.query handler in the same file to return results.TriggerKeywords in Wox.get_plugin_json_schema: Schema specification for plugin.json.get_plugin_sdk_docs: Detailed API documentation for Node.js and Python.get_plugin_i18n: Guidelines for implementing multi-language support.