Monorepo for Aesthetic.Computer
aesthetic.computer
1#!/bin/bash
2# Fast pipe script - send lines to session server asynchronously
3while IFS= read -r line; do
4 # Echo immediately (no delay)
5 echo "$line"
6
7 # Send to server in background (fire and forget)
8 (
9 escaped_line=$(echo "$line" | sed 's/\\/\\\\/g' | sed 's/"/\\"/g')
10 curl -s -X POST https://session-server.aesthetic.computer/build-stream \
11 --header "Content-Type: application/json" \
12 --data "{\"line\": \"$escaped_line\"}" > /dev/null 2>&1
13 ) &
14done
15# Wait for all background jobs to finish
16wait