spark script — Script Management
spark script — Script Management
Manage and run custom scripts.
Quick Reference
spark script list # List every available script
spark script run <name> [args...] # Run a script
spark script list
List every available script. Scripts are sourced from two places:
- The
spark.scriptskey in~/.spark.yaml - The
scripts/directory at the project root
Entries from the config file take precedence.
spark script list
spark script run
Run a named script, optionally passing arguments.
spark script run hello # Run the hello script
spark script run deploy prod # Pass arguments
spark script run copy-template my-feature # Multiple arguments
Config Example
Define scripts in ~/.spark.yaml:
spark:
scripts:
- name: hello
content: |
#!/bin/bash
echo "Hello, $1!"
Or place executable files in the scripts/ directory.