Skip to main content

Module plugins

Module plugins 

Source
Expand description

Plugin and Extension System

Provides a mechanism for extending RAPS CLI with external commands and hooks.

§Plugin Types

  1. External Command Plugins: Executables named raps-<name> in PATH
  2. Workflow Hooks: Pre/post command hooks for automation
  3. Custom Command Groups: User-defined command aliases and groups

§Plugin Discovery

External plugins are discovered by searching PATH for executables matching:

  • Windows: raps-<name>.exe
  • Unix: raps-<name>

§Configuration

Plugins are configured in ~/.config/raps/plugins.json:

{
  "plugins": {
    "my-plugin": {
      "enabled": true,
      "path": "/path/to/raps-my-plugin"
    }
  },
  "hooks": {
    "pre_upload": ["echo 'Starting upload'"],
    "post_translate": ["notify-send 'Translation complete'"]
  },
  "aliases": {
    "quick-upload": "object upload --resume"
  }
}

Structs§

DiscoveredPlugin
Discovered plugin information
PluginConfig
Plugin configuration
PluginEntry
Individual plugin entry
PluginManager
Plugin manager for discovering and executing plugins
PluginVerifyResult
Result of verifying a plugin’s integrity

Functions§

compute_binary_hash
Compute SHA-256 hash of a file