What is Github Codespaces?

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!

Image

GitHub Code­spaces is a cloud-based devel­op­ment envi­ron­ment that allows devel­op­ers to write, review, and debug code direct­ly with­in their web brows­er or using a sup­port­ed native IDE (like Visu­al Stu­dio Code). 

We use it here at CraftQuest to make it eas­i­er to spin up sam­ple projects while learn­ing with our Craft CMS cours­es, lessons, and livestreams. Andrew Welch of nystudio107 cre­at­ed a help­ful starter project for run­ning Craft CMS inside of Github Code­spaces called Spin Up Craft. 

With Code­spaces, devel­op­ers and stu­dents can quick­ly set up a devel­op­ment envi­ron­ment with­out the need to install or con­fig­ure any local soft­ware. It’s a great tool that low­ers the bar­ri­er to learn­ing new tech!

Here are some help­ful fea­tures of Codespaces:

  • Full-Fea­tured Devel­op­ment Envi­ron­ment — GitHub Code­spaces pro­vides a com­plete devel­op­ment envi­ron­ment with a web-based edi­tor, com­mand-line inter­face (CLI), and a built-in ter­mi­nal. It can han­dle all types of pro­gram­ming lan­guages, and frame­works. You edit inside of a web-based ver­sion of Visu­al Stu­dio Code. 

  • Cus­tomiz­able Envi­ron­ment — Even though you’re edit­ing in a web-based ver­sion of VS Code, you can still cus­tomize the Code­spaces envi­ron­ment by adding or remov­ing soft­ware devel­op­ment tools or con­fig­ur­ing set­tings. As you see in the Spin Up Craft repos­i­to­ry linked above, you can use cus­tom Dock­er images, install spe­cif­ic soft­ware ver­sions or plu­g­ins, or set envi­ron­ment vari­ables to match their project require­ments. The Spin Up Craft repos­i­to­ry is cus­tomized to cre­ate a Github Code­space that runs Craft CMS 4.

  • Inte­gra­tion with GitHub — Code­spaces is seam­less­ly inte­grat­ed with GitHub, mak­ing it easy to cre­ate a Code­space envi­ron­ment direct­ly from a GitHub repos­i­to­ry. This elim­i­nates the need to set up a devel­op­ment envi­ron­ment man­u­al­ly, sav­ing time and effort. You can also save changes back to the source repos­i­to­ry via Git com­mits. It real­ly is a com­plete IDE!

A major ben­e­fit of using Github Code­spaces is that you don’t have to spin up a new local project just to try out some aspect of a tech­nol­o­gy, lan­guage, or frame­work. For exam­ple, in the Intro­duc­tion to the Craft Con­sole CLI course, CraftQuest has a com­plete repos­i­to­ry with the project, so you can eas­i­ly fol­low along while watch­ing, using the same exact code, envi­ron­ment, and repos­i­to­ry we are while mak­ing the course!