With Codespaces, developers and students can quickly set up a development environment without the need to install or configure any local software. It's a great tool that lowers the barrier to learning new tech!
GitHub Codespaces is a cloud-based development environment that allows developers to write, review, and debug code directly within their web browser or using a supported native IDE (like Visual Studio Code).
We use it here at CraftQuest to make it easier to spin up sample projects while learning with our Craft CMS courses, lessons, and livestreams. Andrew Welch of nystudio107 created a helpful starter project for running Craft CMS inside of Github Codespaces called Spin Up Craft.
With Codespaces, developers and students can quickly set up a development environment without the need to install or configure any local software. It’s a great tool that lowers the barrier to learning new tech!
Here are some helpful features of Codespaces:
Full-Featured Development Environment — GitHub Codespaces provides a complete development environment with a web-based editor, command-line interface (CLI), and a built-in terminal. It can handle all types of programming languages, and frameworks. You edit inside of a web-based version of Visual Studio Code.
Customizable Environment — Even though you’re editing in a web-based version of VS Code, you can still customize the Codespaces environment by adding or removing software development tools or configuring settings. As you see in the Spin Up Craft repository linked above, you can use custom Docker images, install specific software versions or plugins, or set environment variables to match their project requirements. The Spin Up Craft repository is customized to create a Github Codespace that runs Craft CMS 4.
Integration with GitHub — Codespaces is seamlessly integrated with GitHub, making it easy to create a Codespace environment directly from a GitHub repository. This eliminates the need to set up a development environment manually, saving time and effort. You can also save changes back to the source repository via Git commits. It really is a complete IDE!
A major benefit of using Github Codespaces is that you don’t have to spin up a new local project just to try out some aspect of a technology, language, or framework. For example, in the Introduction to the Craft Console CLI course, CraftQuest has a complete repository with the project, so you can easily follow along while watching, using the same exact code, environment, and repository we are while making the course!