{ "$schema": "https://json-schema.org/draft-04/schema#", "$id": "https://github.com/jetify-com/devbox/plugins", "title": "Devbox Plugin Schema", "description": "Defines fields and values for public devbox plugins", "type": "object", "properties": { "$schema": { "description": "The schema version of this plugin file.", "type": "string" }, "name": { "description": "The name of the plugin.", "type": "string" }, "version": { "description": "The version of the plugin.", "type": "string" }, "description": { "description": "A short description of the plugin and how it works. This will automatically display when the user first installs the plugin, or runs `devbox info`", "type": "string" }, "packages": { "description": "Collection of packages to install", "oneOf": [ { "type": "array", "items": { "description": "Name and version of each package in name@version format.", "type": "string" } }, { "type": "object", "description": "Name of each package in {\"name\": {\"version\": \"1.2.3\"}} format.", "patternProperties": { ".*": { "oneOf": [ { "type": "object", "description": "Version number of the specified package in {\"version\": \"1.2.3\"} format.", "properties": { "version": { "type": "string", "description": "Version of the package" }, "platforms": { "type": "array", "description": "Names of platforms to install the package on. This package will be skipped for any platforms not on this list", "items": { "enum": [ "i686-linux", "aarch64-linux", "aarch64-darwin", "x86_64-darwin", "x86_64-linux", "armv7l-linux" ] } }, "excluded_platforms": { "type": "array", "description": "Names of platforms to exclude the package on", "items": { "enum": [ "i686-linux", "aarch64-linux", "aarch64-darwin", "x86_64-darwin", "x86_64-linux", "armv7l-linux" ] } }, "glibc_patch": { "type": "boolean", "description": "Whether to patch glibc to the latest available version for this package" } } }, { "type": "string", "description": "Version of the package to install." } ] } } } ] }, "env": { "type": "object", "description": "List of additional environment variables to be set in the Devbox environment. These can be overridden by environment variables set in the user's devbox.json", "patternProperties": { ".*": { "type": "string", "description": "Value of the environment variable." } } }, "create_files": { "type": "object", "description": "List of files to create in the user's project directory when the plugin is activated. The key points to the file path where the file will be created. The value points to the default file that should be copied to that location", "patternProperties": { ".*": { "type": "string", "description": "Contents of the file." } } }, "shell": { "type": "object", "description": "Shell specific options and hooks for the plugin.", "items": { "init_hook": { "type": ["array", "string"], "description": "Shell command to run right before initializing the user's shell, running a script, or starting a service" }, "scripts": { "description": "List of command/script definitions to run with `devbox run `.", "type": "object", "patternProperties": { ".*": { "description": "Alias name for the script.", "type": ["array", "string"], "items": { "type": "string", "description": "The script's shell commands." } } } } } }, "include": { "description": "List of additional plugins to activate within your devbox shell", "type": "array", "items": { "description": "Name of the plugin to activate.", "type": "string" } } }, "required": ["name", "version", "description"] }