/run slash command. Use them to automate repetitive tasks, integrate with external systems, or extend your migration workflows.
How it works:
- Write a script and place it in the
bin/directory of your Migration HQ repository - Register the script in your
warp.ymlconfiguration file - Execute it from any backlog entry issue with
/run <script_id>
Prerequisites
Before using Custom Scripts, ensure you have:- Admin access to your Migration HQ repository
- Scripts stored in the
bin/directory at the root of Migration HQ - Scripts marked as executable (
chmod +x bin/your_script.sh) - A valid
warp.ymlconfiguration in theconfig/directory
Configuration
Define scripts in yourwarp.yml file under the scripts: key. Each script entry uses a unique identifier as its key.
Required Fields
Optional Fields
Basic Example
bin/notify_team.sh:
Script Arguments
Scripts can accept named arguments that are validated by Warp before execution.Defining Arguments
Add anarguments block to your script configuration. Each argument has a description (required) and an optional required flag.
required: true are optional.
Passing Arguments at Runtime
Use the--script_args flag followed by space-separated key=value pairs:
"true":
Warp validates arguments before executing your script. Missing required arguments or unrecognized argument names will produce an error message — your script will not run.
How Arguments Are Delivered
Arguments are passed to your script as environment variables with the prefixWARP_SCRIPT_ARGS__, followed by the argument name converted to uppercase with non-alphanumeric characters replaced by underscores.
Examples:
Environment Variables
Warp injects the following environment variables into every script execution:Vault Integration
Whenallow_vault is set to true, Warp injects the PKFS_MASTER_KEY environment variable into your script’s execution environment. This allows your script to decrypt and query credentials stored in your Warp Vault.
Script Examples by Language
Bash
PowerShell
Ruby
Python
Access Control
Script execution can be restricted using policies in yourwarp.yml. Define a policies.scripts block to control who can run each script.
Execution
Custom scripts run on a GitHub Actions runner agent within your Migration HQ repository. When a script completes, Warp automatically posts a comment on the issue:- On success: A confirmation message with a link to the workflow run
- On failure: An error message with the exit code and a link to the workflow run logs
Running a Script
To execute a custom script, post a comment on a backlog entry issue using the/run slash command:
/run command reference for full usage details.
Best Practices
- Add shebang lines — Always include
#!/bin/bash,#!/usr/bin/env ruby, etc. at the top of your scripts - Make scripts executable — Run
chmod +x bin/your_script.shbefore committing - Validate inputs — Check for required data and provide helpful error messages
- Use descriptive names — Choose clear script identifiers and file names
- Document arguments — Write clear descriptions for each argument in
warp.yml - Handle errors gracefully — Use proper exit codes (
set -ein Bash) and error handling - Test locally first — Verify scripts work before adding them to
warp.yml - Keep scripts focused — Each script should do one thing well