Planning to migrate my AWS Lambda Twitter bots to Mastodon

Like everyone else right now, I’m mulling options to migrate away from Twitter, likely to Mastodon (follow me at @kevinhooke@mastodon.social !). Moving my personal usage is relatively simple, other than rebuilding a list of people and tags that I like to follow. I also have a number of Twitter bots running on AWS Lambdas that I’ve built over the years that I should move at some point.

The easy part is that the code that’s running as an AWS Lambda doesn’t need to physically move anywhere, that can continue to run where it is. The part that needs to change is the APIs it’s using to integrate with Twitter and update them to use APIs to post to Mastodon instead.

I’m still in early stage of looking at options so far. I’ve discovered there’s a Mastodon instance, BotsInSpace, that’s specifically for running bots, so that addresses that first step, where they need to run against. I’ve also been reading through a few articles on developing bots for Mastodon such as this one. So far looks like it shouldn’t be too much of a big deal to move them across.

XCode Command Line Tools no longer working after upgrade to MacOS Ventura (quick fix!)

This seems to be a recurring issue after every major OS update. You need to reinstall XCode and the Command Line Tools to get them working again.

Trying a ‘git status’ after upgrading to Ventura over the weekend, I get this error:

 > git status
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

To fix this you need to reinstall the XCode Command Line Tools (described here) with:

xcode-select --install

Press Install when prompted:

After the install completes, restart your Terminal and you should be good to go.

Editing files in your GitHub repo online with Codespaces

Articles online about how to enable your GitHub projects to use Codespaces are not particularly clear about how to get started, whether you need access to the beta or not, whether it is free for personal use or whether you need to pay for a subscription.

I suspect there’s been some changes since the service launched. The easiest way to open a Codespace to edit any file in your repo is to browse to a file and drop down the edit menu and then select Open in GitHub.dev

One you open a single file, the VS Code web interface will load, allowing you to edit any file in that project.