Packages

Plugin system for Raxol applications. Build extensible apps with a simple plugin behavior defining init, handle_input, render, and cleanup callbacks. Includes testing utilities and documentation generators.

Current section

Files

Jump to
raxol_plugin lib raxol_plugin.ex
Raw

lib/raxol_plugin.ex

defmodule RaxolPlugin do
@moduledoc """
Plugin SDK for Raxol terminal applications.
Provides the tools to build, test, and manage Raxol plugins:
* `Raxol.Plugin` - `use` macro with overridable callback defaults
* `Raxol.Plugin.API` - Facade for loading/unloading/enabling plugins at runtime
* `Raxol.Plugin.Manifest` - Cross-package manifest builder and validator
* `Raxol.Plugin.Testing` - ExUnit helpers for plugin test suites
* `mix raxol.gen.plugin` - Code generator for new plugins
## Quick start
defmodule MyPlugin do
use Raxol.Plugin
@impl true
def init(config), do: {:ok, %{config: config}}
end
See `Raxol.Plugin` for the full callback list and defaults.
"""
@doc """
Returns the package version.
"""
@spec version() :: String.t()
def version, do: unquote(Mix.Project.config()[:version])
end