Build your first plugin
The official plugin starter is the shortest supported route to a working Phials plugin. It already contains the synchronized public SDK, a Svelte 5 and TypeScript build, Phoundry UI, manifest validation, and two small capabilities you can inspect after activation.
Follow these articles in order:
- Create a plugin project from the starter and install its npm dependencies.
- Set your plugin identity so the manifest, source, and generated release artifacts describe one plugin.
- Build and run your plugin locally, then verify that it is installed, enabled, loaded, and activated.
- Make and reload your first change without restarting Phials.
The tutorial changes the starter’s command because it gives you a quick, unambiguous result in the Command Bar. The starter also includes a small file viewing capability for files ending in .phials-demo-preview.txt; the dedicated capability guides take that example from demonstration code to production behavior.
What you will have
At the end of this path, you will have:
- a plugin project with its own stable ID and version;
- validated
manifest.json,main.js, and optionalstyles.cssrelease artifacts; - an installed development plugin that Phials can activate;
- a repeatable build, install, and reload loop; and
- a command whose updated label and notification prove that Phials is running your latest code.
Installation and activation are separate. Copying valid release artifacts into Phials makes the plugin installed. Allowing it to run makes it enabled. Phials must then import its JavaScript module before it is loaded, and registration plus onActivate must finish before it is activated. The checks in this tutorial confirm each state instead of treating one as proof of the next.
For the complete development loop, including isolated Phials Homes, watch builds, restart testing, and persisted state, continue to Run your plugin locally.