Passing Lua Script to redis-cli for Upstash Redis?

If i was using redis-cli directly, would be simple:

  # From your terminal (not inside redis-cli)
  redis-cli --eval comm_analysis.lua

But can’t pass in these args to the fly command:

fly redis connect --eval comm_analysis.lua
Usage:
  fly redis connect [flags]

Flags:
  -h, --help            help for connect
  -o, --org string      The target Fly.io organization
  -r, --region string   The target region (see 'flyctl platform regions')

Global Flags:
  -t, --access-token string   Fly API Access Token
      --debug                 Print additional logs and traces
      --verbose               Verbose output

Error: unknown flag: --eval

Is there another good way to do this?

since fly redis conenct opens a proxy, it works to start that, then use redis-cli in a different terminal. You do need your updash password to do this (available on the updash console → fly redis dashboard <organization-name>).

redis-cli -p 16379 -a <password> --eval comm_analysis.lua