manifest.yml
The manifest.yml that describes a fylr plugin — its keys, the exec map, and the URL replacements a plugin program receives.
Every plugin has a manifest.yml at its root. It names the plugin, declares its frontend assets, and registers what the plugin adds to fylr — extensions (custom API endpoints), callbacks (hooks), and additions to the base config.
Top-level keys
plugin
Identity and frontend assets (see below).
base_url_prefix
Path prefix under which the plugin's frontend assets are served.
extensions
Custom API endpoints the plugin adds — see Extensions.
callbacks
Hooks into fylr's API (db pre-save, transitions, export, …) — see Callbacks.
collection_upload
Hooks into collection uploads (hotfolder, WebDAV) — see Collection upload.
base_config
Extra base-config parameters the plugin contributes (e.g. a plugin user).
plugin
plugin:
name: plugin_name # internal, unique plugin name
displayname:
en-US: "Name of the Plugin"
l10n: l10n/loca.csv # optional localization CSV
webfrontend:
url: plugin_name.js # frontend entry point (optional)
css: plugin_name.css # frontend stylesheet (optional)
base_url_prefix: "webfrontend"The exec map
Both extensions and callbacks describe how fylr runs the plugin program with the same exec map. fylr runs it through the execserver file-worker tool chain, so the program is any executable the execserver has a service for (node, python3, exec for standalone binaries, …).
stdin: { type: body } delivers the call's input data on STDIN; stdout: { type: body } makes STDOUT the response. The commands of one exec run sequentially in a shared, transient working directory — the plugin's own files are only reachable via %_exec.pluginDir%.
Placeholders
fylr substitutes these placeholders in the exec map before running the program:
%info.json%
The context of the call as an inline JSON string (not a file path — parse the argument directly): the request, the plugin's base config, and the callback contract fields. Individual callbacks add more keys.
%_exec.pluginDir%
Absolute filesystem path of the plugin's directory. Use it to reference scripts and other plugin resources — without it, paths resolve relative to the transient per-job working directory, where the plugin's files do not exist.
%_exec.workDir%
Absolute path of the transient per-job working directory.
%_exec.GOOS%, %_exec.GOARCH%
Operating system and architecture of the executing execserver — for shipping per-platform binaries (hello-%_exec.GOOS%-%_exec.GOARCH%.exe).
Older plugins and older versions of this documentation used stdin: { url: "%_input.url%" } and stdout: { url: "%_output.url%" }. fylr does not substitute these placeholders — declare stdin/stdout with { type: body } instead.
Errors
To signal an error, a plugin program either exits with a non-zero exit code, or writes an API-error JSON. When wrapped under a top-level error key, a zero exit code is fine:
When called as an extension, fylr sets the X-Execserver-Error header on failure — unless more than 4 KB of the response body have already been sent.
Full example
See also
Extensions — add custom API endpoints.
Callbacks — hook into db saves, transitions, collection uploads, export.
Custom Data — plugins that add custom data types.
Last updated