Automatically updating themes and plugins to .gjs file format

The easiest thing is probably to use d/shell. That will give you a terminal running inside the container, and you can follow the instructions in the OP.

So it would be something like:

d/shell

Then once you’re inside the container:

cd plugins/discourse-weekly-newsletter
pnpm dlx @discourse/update-skeleton@latest
pnpm eslint --fix .
pnpm prettier --write "**/*.{gjs,js,hbs,scss}"
pnpm dlx https://github.com/discourse/discourse-gjs-codemod