Build your first plugin from scratch
This tutorial walks you through creating a minimal working Qomicex plugin from scratch. Starting from theqomicex CLI scaffold (Scaffold)is recommended (it generates a valid project structure automatically). You can also write everything by hand; see the alternative below.
Prerequisites
- Qomicex Launcher (Launcher)is installed (for testing)
- qomicex CLI (Node.js ≥ 20):
qomicex doctor to check whether Node / pnpm / the plugin project environment are ready (read-only, it modifies no files).
1. Generate a project with the CLI (recommended)
manifest.json already in place:
id: The unique plugin ID, which is also the install directory name (plugins/{id}/). Never change it once publishedlayers: Layer declarations. Plugins with script pages should use["l2", "l3"](iframe sandbox rendering by default; for inline rendering you must explicitly declare"render": "inline"in the manifest. Activation depends on whetherentry.frontendexists; see layers layer definitions)permissions: The permissions your plugin needs (see Complete plugin API reference)entry.frontend: The plugin page entry, a relative path inside the.qpluginpackage
2. Write the plugin page
Createsrc/App.tsx (React) or modify it as needed. For plain HTML, write directly in index.html:
- Style with the
.p-*component classes provided by the launcher (such as.p-cardand.p-btn); they follow the light and dark themes automatically. See UI component library for the full list. - Plugin scripts talk to the launcher through the global
window.__PLUGIN_API__object. Note that the script runs as soon as the plugin is activated (inline or in the L2 sandbox), without visiting the plugin page. See Rendering model. - Project-based plugins use the
@qomicex/plugin-uiReact components plus Tailwind; see React + Vite plugin development.
3. Package the plugin
Package with the CLI (recommended)
.qplugin file is a zip with manifest.json at the root plus dist/**. If entry.theme or contributes.overlay.file reference files under dist/ while the source sits in the root directory, pack copies them in automatically.
manifest.json must be in the root directory of the archive. Putting it in a subdirectory makes installation fail.
Manual packaging without the CLI (alternative)
- Put
manifest.jsonand the asset directory into one folder - Compress it with any ZIP tool, making sure
manifest.jsonis at the ZIP root - Rename the extension to
.qplugin
4. Install and test
- Open Qomicex Launcher → Settings → Plugins
- Click Install plugin (Install plugin) and select your
.qpluginfile - After a successful install, the card appears in the plugin list; toggle it on to enable it (a launcher restart is required for it to take effect)
- After the restart, a “Hello” entry appears in the sidebar; click it to open the plugin page
qomicex dev to use the debug harness (no Tauri/backend needed, hot reload in the browser). See Debugging and hot reload.
5. FAQ at a glance
Next steps
- Learn every manifest field: Manifest reference
- Learn every callable API: Complete plugin API reference
- Project-based development: React + Vite plugin development
- Full CLI commands: CLI reference