Plugin
formae uses a plugin architecture to extend its capabilities. Plugins allow you to add support for new cloud providers, configuration languages, and network features without modifying the core formae system.
How Plugins Work
A plugin is a dynamically loadable .so
library (shared object file) that extends formae functionality. Plugins are loaded automatically from /opt/pel/formae/plugins
when the CLI or agent starts.
Each plugin can have one or more roles:
- Schema processing - Add support for configuration languages (example:
pkl
plugin for Pkl syntax) - Resource management - Manage cloud provider resources (example:
aws
plugin for AWS infrastructure) - Network operations - Enable networking features (example:
tailscale
plugin for secure mesh networking)
Plugin Location
Plugins must be placed in the standard plugin directory:
/opt/pel/formae/plugins/
When formae starts, it automatically discovers and loads all plugins from this location. You don't need to configure or register plugins manually—just place the .so
file in the directory and restart formae.
Examples
AWS Plugin:
The aws
plugin enables formae to manage AWS resources. Once loaded, you can use AWS resource types in your formae:
import "@aws/s3/bucket.pkl"
new bucket.Bucket {
label = "my-bucket"
bucketName = "my-unique-bucket-name"
}
Pkl Plugin:
The pkl
plugin allows formae to process Pkl configuration files. This is the default and recommended configuration language for formae.
Tailscale Plugin:
The tailscale
plugin enables secure mesh networking between your infrastructure components.
Note: Automatic reloading of plugins is not currently supported. After adding or updating a plugin, you must restart the formae CLI or agent for changes to take effect.