Using esphome CLI (not builder) to flash device via web serial/esptool-js

I can run esphome remotely via code-server’s CLI but unsure how to flash to my esp connected to the computer I’m using. Has anyone managed to flash the device using web serial/esptool-js?