Plugins let you extend xyOps functionality by writing code in any language. xyOps ships with several built-in plugins for common tasks, and you can write your own or discover community plugins in the Marketplace.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/pixlcore/xyops/llms.txt
Use this file to discover all available pages before exploring further.
Plugin types
xyOps supports two main plugin types:Event plugins
Execute job logic on target servers—the primary plugin type
Monitor plugins
Collect custom metrics for monitoring and alerting
Event plugins
Event plugins are the main type of plugin in xyOps. They execute the code that runs your jobs. When events launch a job (standalone or as part of a workflow), they invoke an event plugin on the target server.Built-in event plugins
xyOps ships with these event plugins:| Plugin | Description |
|---|---|
| Shell Plugin | Execute arbitrary shell scripts without learning the plugin API |
| HTTP Request Plugin | Send HTTP requests with custom headers, body, and methods |
| Test Plugin | Output sample data and files for testing workflows |
| Docker Plugin | Run scripts inside Docker containers |
Plugin communication
Event plugins communicate with xyOps using JSON over STDIN/STDOUT. This is called the xyOps Wire Protocol.- Input: JSON document on STDIN with job details, parameters, and input files
- Output: JSON lines on STDOUT to report progress, status, and completion
The wire protocol is language-agnostic—write plugins in Node.js, Python, Go, Rust, or any language that can read/write JSON.
Job input
When your plugin is invoked, it receives a JSON document on STDIN with these properties:Wire protocol version (always
1)Plugin type (
event or monitor)Plugin parameter values configured in the event
Input data and files from previous workflow nodes
Current working directory (unique temp directory for this job)
Event ID that launched this job
Unique job ID
~/workspace/source/docs/plugins.md:44-92:
Input files
Input files are automatically downloaded to your job’s temp directory. Access them through:- File listing: Check
input.filesarray for metadata - Direct access: Files are written to the current working directory
Job output
Your plugin writes JSON to STDOUT to report status. All JSON must be compacted to a single line ending with\n.
Success completion
Error completion
Progress updates
Report progress while your job runs:0.0 (0%) and 1.0 (100%).
Status messages
Set a status string displayed during job execution:Performance metrics
Report how your plugin spent time during execution:scale:
Output data and files
Pass structured data to downstream workflow nodes:File paths are relative to the job’s temp directory. xyOps uploads them automatically.
Plugin parameters
Define user-configurable parameters in your plugin definition:text- Single-line text inputtextarea- Multi-line text inputcode- Code editor with syntax highlightingselect- Dropdown menucheckbox- Boolean togglehidden- Hidden field for internal values
params object and as environment variables.
Monitor plugins
Monitor plugins collect custom metrics on a schedule. They run on target servers and report numeric values back to xyOps for graphing and alerting.Monitor plugin input
Monitor plugin output
Return a numeric value:Plugin examples
Shell plugin example
Shell plugin example
The simplest plugin type. Just write shell code:No wire protocol needed for basic shell scripts.
Python plugin with progress
Python plugin with progress
Node.js plugin with files
Node.js plugin with files
Creating custom plugins
Choose your language
Pick any language that can read STDIN and write to STDOUT. Popular choices: Node.js, Python, Go, Rust, Bash.
Implement the wire protocol
Read JSON from STDIN on startup. Write JSON lines to STDOUT for updates and completion.
Define plugin metadata
Create your plugin definition in xyOps with:
- Title and description
- Command to execute (shell command, Docker run, npx, etc.)
- Parameters users can configure
- Icon from Material Design Icons
Publishing to the marketplace
Once your plugin is working, share it with the community:- Host your code on GitHub with an OSI-approved license
- Add plugin metadata to your repository
- Submit to the Marketplace
Best practices
Flush output
Disable output buffering so progress updates appear immediately. Most languages buffer by default.
Handle errors gracefully
Always report errors with clear descriptions. Include troubleshooting hints in error messages.
Validate input
Check that required parameters are present. Fail fast with helpful error messages.
Use temp directory
Write all output files to the current working directory. xyOps cleans up automatically.
Test edge cases
Test with missing files, invalid parameters, and network failures. Your plugin should never hang.
Document parameters
Use clear parameter titles and include examples in your plugin notes.
See also
- Marketplace - Discover and publish plugins
- Data Formats - Wire protocol specification
- Workflows - Chain plugins together
- Secrets - Inject credentials securely