esync

Directory watching and remote syncing
Log | Files | Refs | README | LICENSE

demo.tape (2010B)


      1 # ─────────────────────────────────────────────────────────────────────────────
      2 # esync demo — watch local files and sync them with rsync, shown in a live TUI
      3 #
      4 # Usage:   cd demo && vhs demo.tape
      5 # Requires: esync, rsync, bat, vhs (https://github.com/charmbracelet/vhs)
      6 # ─────────────────────────────────────────────────────────────────────────────
      7 
      8 Output demo.gif
      9 Require rsync
     10 Require bat
     11 
     12 Set FontSize 20
     13 Set Width 1200
     14 Set Height 600
     15 Set Padding 20
     16 Set Theme "GruvboxDarkHard"
     17 
     18 Set TypingSpeed 100ms
     19 
     20 Set Shell "bash"
     21 
     22 
     23 # ── Hidden setup ────────────────────────────────────────────────────────────
     24 Hide
     25     Type 'export PS1="> "'
     26     Enter
     27     # Clear the screen
     28     Type "clear"
     29     Enter
     30     Type "rm -rf /tmp/esync-demo"
     31     Enter
     32     # Sleep 100ms
     33 Show
     34 
     35 
     36 # ── Demo ──────────────────────────────────────────────────────────────────
     37 
     38 # 1. Show the config
     39 Type "bat .esync.toml"
     40 Enter
     41 Sleep 4s
     42 
     43 # 2. Show the project files
     44 Type "ls"
     45 Enter
     46 Sleep 2s
     47 
     48 # 3. Preview what will be synced
     49 Type "esync check"
     50 Sleep 500ms
     51 Enter
     52 Sleep 5s
     53 
     54 # 4. Queue background file edits (fire while the TUI is running)
     55 Hide
     56     Type '(sleep 5 && echo "// refactored" >> src/handler.go && sleep 3 && echo "// updated" >> config/settings.toml && sleep 3 && echo "// new file" > src/utils.go) &'
     57     Enter
     58     Sleep 300ms
     59 Show
     60 
     61 # 5. Launch the TUI — file changes sync in real time
     62 Type "esync sync"
     63 Sleep 500ms
     64 Enter
     65 Sleep 10s
     66 
     67 # 6. Quit
     68 Type "q"
     69 Sleep 1s