Plugins
Plugin DevelopmentLink
Learn how to build and register a standalone invoker script using the Sierra‑SDK plugin system. This guide walks you through defining dependencies, input parameters, result outputs, and the plugin loader function.
Step 1 — Import SierraLink
Use the core sierra
module to access all plugin interfaces, decorators, parameter wrappers, and result constructors.
Step 2 — Define an InvokerScript
Link
Start by creating an InvokerScript
object. This acts as the root definition of your plugin logic. And putting in requirements inside invoker.requirement
Python | |
---|---|
Step 3 — Register DependenciesLink
You can define helper functions that are not exposed as command-line parameters but are needed by your entry point.
Python | |
---|---|
Step 4 — Define the Entry PointLink
Mark the main function using @invoker.entry_point
. Input arguments should use sierra.Param
and sierra.SierraOption
.
Step 5 — Load the PluginLink
The plugin must define a load()
function. This hook is invoked by the Sierra plugin loader to register your invoker.
SummaryLink
Component | Purpose |
---|---|
InvokerScript() |
Defines a new plugin/invoker |
@invoker.dependency |
Adds a helper function to the script |
@invoker.entry_point |
Marks the main callable |
sierra.Param[...] |
Wraps a parameter with typing and options metadata |
load() |
Registers the invoker into the plugin system |
create_tree_result() |
Generates structured tree output |
create_error_result() |
Returns a formatted error |
Once created, this invoker becomes discoverable by Sierra CLI or GUI runners.