So I had not published the project to a cloud repository such as github, and the system on which the files were is gone, however the project is still hosted on fly.io and is live, how do I download the app from fly and get the files back.
It was a laravel project deployment was done using fly io
You can use fly ssh console -a YOUR_APP to start an SSH session and look around the VM for your project (probably in /app). [Edit: actually /var/www/html for Laravel, see below]
Once you find it, you can download it by exiting out of the SSH session and running
fly sftp shell -a YOUR_APP
get /app
Note that there may be differences compared to the original source code (e.g. files ignored using .dockerignore will be missing).
Correct, in fact there never likely was a .env file there - they are in the .dockerignore file by default. Instead needed env vars will be a mix of config in the fly.toml file and secrets set in the app.
If you SSH into the VM and run printenv you should see all environment variables, which should also show your env vars / secrets.