Codespaces and creation logs are available to export from within the Codespaces VS code cloud environment via the command palette. Is there a way to automate this process so that timestamped logs can be pushed to the GitHub repository?
I am mostly interested in creation logs, though am curious about general Codespaces logs for better understanding startup and other behaviours.
Use the github cli. You can install it local on your pc, and should be available by default in github codespaces.
You invoke it with a gh
command. Try
Make sure that you are logged into github correctly and you have setup an ssh key for interaction with Github. Use the gh auth
and gh ssh-key
commands to manage authentication and ssh setup.
If everything is setup right, you will be able to retrieve the creation logs from commandline, either within your codespace or from your local PC.
You can then send the creation log into any file you like, also inside your repository, and commit. You can use any automation from commandline that you can imagine.