Skip to content

Latest commit

 

History

History
94 lines (75 loc) · 2.46 KB

File metadata and controls

94 lines (75 loc) · 2.46 KB

Plugins

xfetch supports external plugins that run as separate executables. The core binary discovers a plugin, sends a JSON request on stdin, and reads a JSON response on stdout. The runtime stays in the core repository, while official plugin implementations live in the dedicated plugins repository.

Official Plugin Repository

Official plugins and the full authoring guide are maintained at:

https://github.com/xfetch-cli/plugins

Use that repository for plugin source code, plugin-specific documentation, and contribution guidelines.

Installation Model

End users should install official plugins by name from the remote repository:

xfetch plugin install animate-logo

The core downloads the plugin source from the official remote, builds it, and installs the resulting binary into the xfetch plugin directory.

Configuration

Plugins are configured in the main config file. The plugin value can be a short name or a full path to an executable.

{
  "logo_animation": {
    "plugin": "animate-logo",
    "fps": 12,
    "duration_ms": 1200,
    "loop": false
  }
}

Protocol

xfetch communicates with plugins using JSON over stdin/stdout. The request includes the plugin kind plus any plugin-specific arguments. The response returns either rendered lines or animation frames.

{
  "version": 1,
  "kind": "logo_animation",
  "lines": ["__  __", " \\ \\/ /"],
  "args": {
    "fps": 12,
    "duration_ms": 1200,
    "loop": false
  }
}
{
  "frames": [
    {
      "delay_ms": 80,
      "lines": ["__  __", " \\ \\/ /"]
    }
  ]
}

Plugin Catalog & Docs

All official plugins, their documentation, and the development guide are maintained in the xfetch-cli/plugins repository: