save
The save command creates a “snapshot” of your environment and stores it securely in the cloud. It follows the inclusion rules defined in your .workstateinclude file.
workstate save [NAME] [OPTIONS]Options
Section titled “Options”-i, --include PATH: Add extra files or patterns to the current snapshot (ad-hoc inclusion).--encrypt: Encrypt the backup locally before uploading.-p, --protect: Mark the backup as “protected” to prevent accidental deletion.-m, --description TEXT: Add a descriptive note or motive to the backup.--tag KEY=VALUE: Apply custom tags to the S3 object for easier filtering.--dry-run: Simulate the process and list files that would be captured without uploading.
Examples
Section titled “Examples”# Simple save using .workstateinclude rulesworkstate save "base-setup"
# Save with ad-hoc inclusion (e.g., a specific log file)workstate save "debug-session" --include "logs/error.log"
# Multi-pattern inclusionworkstate save "full-state" -i "config/*.yaml" -i "data/*.csv"
# Encrypted and protected save with a descriptionworkstate save "prod-env" --encrypt --protect -m "Initial production sync"