If I use a sh script, I get this code.
ssh user@host <<-'ENDSSH'
#command 1
#command 2
ENDSSH
What's the analogue in fish?
fish does not have heredocs (see https://fishshell.com/docs/current/design.html)
echo '#command 1
#command 2' | ssh user@host
or
set commands \
"command 1" \
"command 2"
printf "%s\n" $commands | ssh user@host