Deploy Surge
Deploy static files to Surge.sh with YAML inventory lifecycle management.
Inventory: $PRAXIS_DIR/reference/deploy/surge-inventory.yaml
Argument Parsing
Parse $ARGUMENTS for subcommand routing:
deploy <path> <description> [--slug X]→ deploy flowteardown <slug>→ teardown flowlist→ list flow- No args or ambiguous → ask user which subcommand
Subcommands
deploy
- Validate:
rtk summary which surge— if missing:bun install -g surge - Resolve target:
--slug→<slug>.surge.sh| default →<prefix>-<8hex>.surge.sh - Confirm — show target URL, wait for user approval
- Deploy:
rtk summary surge <path> --domain <target> - Update inventory — append entry per schema
- Report — output live URL + inventory count
teardown
- Find entry by slug/URL in inventory
rtk summary surge teardown <target>- Set
status: torn-down, addtorn_downtimestamp - Confirm teardown
list
- Read inventory, display table sorted active-first, newest-first
- Show counts:
✅ N active | 🗑️ N torn-down
See reference.md for inventory schema, error handling, and rules.