Skip to main content

CreatePluginRequest

Request to create a new plugin

argsstring[]

Command arguments

Example: ["/opt/codex/plugins/mangabaka/dist/index.js"]
autoMatchConditions

Auto-match conditions (JSON object with mode and rules)

commandstringrequired

Command to spawn the plugin

Example: node
config

Plugin-specific configuration

credentialDeliverystring

How credentials are delivered to the plugin: "env", "init_message", or "both"

Example: env
credentials

Credentials (will be encrypted before storage)

descriptionstring | nullnullable

Description of the plugin

Example: Fetch manga metadata from MangaBaka (MangaUpdates)
displayNamestringrequired

Human-readable display name

Example: MangaBaka
enabledboolean

Whether to enable immediately

Example: false
env object[]

Additional environment variables

  • Array [
  • keystringrequired
    valuestringrequired
  • ]
  • libraryIdsstring<uuid>[]

    Library IDs this plugin applies to (empty = all libraries)

    Example: []
    metadataTargetsstring[]nullable

    Metadata targets: which resource types this plugin auto-matches against null = auto-detect from plugin capabilities

    Example: ["book"]
    namestringrequired

    Unique identifier (alphanumeric with underscores)

    Example: mangabaka
    permissionsstring[]

    RBAC permissions for metadata writes

    Example: ["metadata:write:summary","metadata:write:genres"]
    pluginTypestring

    Plugin type: "system" (default) or "user"

    Example: system
    rateLimitRequestsPerMinuteinteger,null<int32>nullable

    Rate limit in requests per minute (default: 60, None = no limit)

    Example: 60
    scopesstring[]

    Scopes where plugin can be invoked

    Example: ["series:detail","series:bulk"]
    searchPreprocessingRules

    Preprocessing rules for search queries (JSON array of regex rules)

    searchQueryTemplatestring | nullnullable

    Handlebars template for customizing search queries

    useExistingExternalIdboolean

    Whether to skip search when external ID exists for this plugin

    Example: true
    workingDirectorystring | nullnullable

    Working directory for the plugin process

    CreatePluginRequest
    {
    "args": [
    "/opt/codex/plugins/mangabaka/dist/index.js"
    ],
    "command": "node",
    "credentialDelivery": "env",
    "description": "Fetch manga metadata from MangaBaka (MangaUpdates)",
    "displayName": "MangaBaka",
    "enabled": false,
    "env": {
    "LOG_LEVEL": "info"
    },
    "libraryIds": [],
    "metadataTargets": [
    "book"
    ],
    "name": "mangabaka",
    "permissions": [
    "metadata:write:summary",
    "metadata:write:genres"
    ],
    "pluginType": "system",
    "rateLimitRequestsPerMinute": 60,
    "scopes": [
    "series:detail",
    "series:bulk"
    ],
    "searchQueryTemplate": "string",
    "useExistingExternalId": true,
    "workingDirectory": "string"
    }