How to open a Quarto project in GitHub Codespaces
This blog post has been superseded by a newer post written by Mickaël Canouil on the Quarto Blog.
I recently received a question on YouTube about running a Quarto project in GitHub Codespaces. This was new to me, so I did some research (thanks to Mickaël Canouil and others for their help!). The key takeaway is that everything needs to be containerized: Quarto, Jupyter, the Quarto extension, R, Python, etc. Installing the VS Code Quarto extension is not enough. The easiest way to achieve this is by using the quarto-codespaces repository.
- Fork Mickaël’s
quarto-codespacesrepo: https://github.com/mcanouil/quarto-codespaces - Click the green “Code” button, select “Codespaces,” and then “Create codespace on main.”

- Click “Authorize” and continue. Creating the codespace may take a few minutes.

- Once the codespace is ready, clone your Quarto project into it. For example, to clone the
water-insecurity-dashboardproject, run the following in the terminal:
git clone https://github.com/ivelasq/water-insecurity-dashboard.gitNavigate to the project directory:
cd water-insecurity-dashboardCreate a new Python environment. In the Command Palette (Ctrl+Shift+P or Cmd+Shift+P), select “Python: Create Environment…”. Choose “Venv” and the appropriate Python interpreter. Very importantly, make sure you check the box to install dependencies from
requirements.txt.

- Open your
.qmdfile (e.g.,final.qmd) and click the “Preview” button in the top right.

That’s it! Your Quarto project should now be running in GitHub Codespaces.
