-
Notifications
You must be signed in to change notification settings - Fork 0
Plugin Quickstart
This page is for first-time plugin authors.
Outcome: you will create a plugin skeleton, wire it into Spaces, build, and verify settings persistence.
- Spaces repo cloned and buildable
- Spaces-Plugins repo cloned
- Visual Studio 2022 Build Tools
- CMake
Template source:
- Spaces-Plugins repository
- folder: plugin-template
Copy:
- from: Spaces-Plugins/plugin-template
- to: Spaces-Plugins/plugins/
Follow this checklist:
- Rename TemplatePlugin.h and TemplatePlugin.cpp
- Rename class TemplatePlugin to your class name
- Replace manifest id community.template_plugin with a globally unique id
- Replace template page and key names like template.general
- Update plugin.json metadata
Reference:
Minimum manifest quality bar:
- id: unique and stable
- displayName: user-friendly
- version: semantic version
- minHostApiVersion and maxHostApiVersion: valid host compatibility range
- capabilities: only what plugin actually uses
Common capability examples:
- commands
- settings_pages
- menu_contributions
- space_content_provider
Your class must implement:
- GetManifest
- Initialize
- Shutdown
The host contract is in:
Key context services available during Initialize:
- commandDispatcher
- settingsRegistry
- menuRegistry
- spaceExtensionRegistry
- appCommands
Use host schema types from:
Field types:
- Bool
- Int
- String
- Enum
Persistence is automatic when using the settings registry.
Typical flow:
- Register command handlers with commandDispatcher
- Add tray/space menu items with menuRegistry
- Ensure command ids are stable and namespaced
Example namespace pattern:
- pluginid.action.name
During active development, ensure plugin is included in host startup wiring and build definitions.
Core references:
Build Spaces (Debug):
cmake -S . -B build -G "Visual Studio 17 2022" -A x64
cmake --build build --config DebugRun tests:
.\build\Debug\HostCoreTests.exeManual checks:
- plugin loads without host crash
- plugin settings page renders
- setting changes persist after restart
- plugin command executes from intended menu surface
Manual checklist reference:
For distribution workflows and marketplace lifecycle:
- Duplicate plugin id
- Unsupported host API range
- Missing enum options for Enum fields
- Command id mismatch between registration and menu contribution
- Writing internal-only implementation settings into consumer pages
A plugin is ready when:
- Host loads it without faults
- Commands and menus function correctly
- Settings persist through restart
- Compatibility metadata is accurate
- Basic docs exist for usage and troubleshooting