Skip to main content
With CI running, let’s test the plugin locally using the formae CLI. This lets you verify your plugin works end-to-end before deploying it.

Install the plugin

Build and install the plugin to your local formae plugins directory:
This installs the plugin to ~/.pel/formae/plugins/sftp/v0.1.0/.

Start SFTP server

Start the test SFTP server:

Initialize a test project

Use formae project init to scaffold a new project that uses your plugin. Since your plugin’s PKL schema hasn’t been published to the formae package registry yet, use the @local suffix to resolve it from your local installation:
The @local suffix tells formae to resolve the package from your local plugin directory (~/.pel/formae/plugins/) instead of the package registry at hub.platform.engineering. This creates a PklProject file with your plugin configured as a local dependency:
The formae core dependency always comes from the package registry, while your plugin (marked with @local) is resolved from the local installation directory. You can mix published and local packages. For example, if your plugin depends on AWS resources for testing:
This resolves aws from the registry and sftp from your local installation.

Create a test forma

Edit the generated main.pkl to test your plugin:

Start the agent

In a separate terminal, start the formae agent:
The agent discovers your plugin and starts it. You should see the following message in the logs:

Apply the forma

With the agent running, apply your forma:

Verify the resource

Check that the file was created:
Or connect to the SFTP server directly:

Clean up

Destroy the resources by passing the same forma file:
Stop the test server:

Next: 14 - Observability - Add logging and metrics to your plugin