Using GitHub Codespaces on the iPad

Using GitHub Codespaces on the iPad

If there’s one main task that has kept me away from my iPad in the past, it’s writing code. I have many years of muscle memory and experience using a Mac, that with all the previous friction of iPadOS, it simply felt stupid to even try.

I don’t code many personal projects at the moment, between managing my day job and father responsibilities. But I do occasionally tinker with the odd project, be it a Node.js tool, Rust application, or something completely random. And I also have my personal blog that is built using 11ty, which on my Mac, I usually use Neovim or VS Code to edit the theme or write blog posts.

So if I want to at least move my writing to my iPad, I need to be able edit and commit to my blog’s GitHub repository, since that controls the deployment.

For now, I wanted to find something quick and easy. Something simple enough where I could quickly edit and publish new posts. So I expect to also try to work out a good offline coding solution soon as well.

Cost

As for the cost, this is measured by both storage and “core hours”. For storage, you get 15 GB for a free account and 20 GB for a Pro account per month. And for core hours, a free account gets 120, and a Pro gets 180.

To explain the core hours, this is essentially the cost per core, per hour. And as the cheapest machine is 2 core, you may as well just half that and say free accounts get 60 hours of usage, and 90 for Pro. So, say you want to use a 32 core machine for a specific task. If you want it to be free, you better be quick.

After the free allotment, the price does seem rather reasonable. However, I don’t think I would use it for anything other than the odd quick change to a project.

Usage

As long as you have a good internet connection, using Codespaces feels pretty native to the iPad. It’s essentially VS Code for iPad. Although an option to have it connect to a VS Code instance on your local network would be a better solution.

I use VS Code already on my Mac, both at work and personally, and I have my preferences synchronised via GitHub. Naturally, that was very easy to setup in Codespaces. So it definitely feels instantly familiar.

My favourite part of using Codespaces is that I can also use it to quickly spin up an instance of my blog, get a live preview, and then deploy to production. So I can work on my blog design/post on one side of my iPad, and then have it rebuild automatically and show in the browser on the right.

This is handled by running your normal run command (mine is npm run dev), which VS Code/Codespaces will detect, and then provide automatic port forwarding so you can access it directly.

This is where I imagine Codespaces would come out better than a native iPad solution. As I’m not sure a native editor would be able to have Node build and run my project this easily.

However, now I have this solution working for quick changes on my blog, and maybe other more complex projects in the future. I do still want to look more into how I can develop on my iPad without being constantly connected to the internet. And if not fully offline, maybe linked to another computer on my local network.