Skip to content

Plugin TOML Reference

Federico Conticello edited this page Mar 24, 2026 · 1 revision

Plugin TOML Reference

Every plugin must have a plugin.toml file in its root directory.

Required Fields

name = "My Plugin"
version = "1.0.0"
description = "What this plugin does"
Field Type Description
name string Display name (shown in Plugin Manager and menus)
version string Semantic version (e.g., "1.0.0")
description string Short description (shown in Plugin Manager)

Permissions

[permissions]
execute = ["ruff", "pyright", "cargo"]

Lists the external commands your plugin needs to run. FerrisPad prompts the user to approve each command on first use.

If your plugin doesn't need to run commands, omit this section entirely.

Menu Items

[[menu_items]]
label = "Run Lint"
action = "lint"
shortcut = "Ctrl+Shift+P"

[[menu_items]]
label = "Format File"
action = "format"
Field Type Required Description
label string yes Text shown in the Plugins > {name} menu
action string yes Action name passed to on_menu_action
shortcut string no Keyboard shortcut (e.g., "Ctrl+Shift+P")

Shortcuts support: Ctrl, Shift, Alt modifiers + letter, number, or function keys (F1-F12).

Configuration Parameters

[config]
[[config.params]]
key = "lint_on_save"
label = "Lint on Save"
type = "boolean"
default = "true"

[[config.params]]
key = "extra_args"
label = "Extra Arguments"
type = "string"
default = ""
placeholder = "--verbose --fix"
validate = "cli_args"

[[config.params]]
key = "severity"
label = "Minimum Severity"
type = "choice"
default = "warning"
options = ["error|Errors Only", "warning|Warnings & Errors", "info|All"]

[[config.params]]
key = "max_lines"
label = "Max Lines to Analyze"
type = "number"
default = "1000"

Parameter Fields

Field Type Required Description
key string yes Identifier used in api:get_config(key)
label string yes Display label in settings dialog
type string yes "string", "number", "boolean", or "choice"
default string yes Default value (always a string, even for numbers/booleans)
placeholder string no Input hint shown when the field is empty (string type only)
options array for choice Array of "value|Label" strings
validate string no Validation rule: "cli_args" or "regex:PATTERN"

Types

Type Settings UI get_config() returns get_config_bool() get_config_number()
string Text input The string value — —
number Text input The string value — Parsed number or nil
boolean Checkbox "true" or "false" true or false —
choice Dropdown The value part (before |) — —

Validation Rules

  • cli_args — blocks shell metacharacters (same rules as command arguments)
  • regex:PATTERN — validates input against a regex pattern

Complete Example

name = "Python Lint"
version = "2.7.0"
description = "Run ruff and pyright on Python files"

[permissions]
execute = ["ruff", "pyright"]

[[menu_items]]
label = "Run Lint"
action = "lint"
shortcut = "Ctrl+Shift+P"

[config]
[[config.params]]
key = "lint_on_save"
label = "Lint on Save"
type = "boolean"
default = "true"

[[config.params]]
key = "ruff_select"
label = "Ruff Rule Selection"
type = "choice"
default = "default"
options = ["default|Default Rules", "all|All Rules", "custom|Custom"]

[[config.params]]
key = "ruff_extra_args"
label = "Ruff Extra Arguments"
type = "string"
default = ""
placeholder = "--select E,W"
validate = "cli_args"

Clone this wiki locally