tb CLI - Easily run apps and services locally

tb CLI

tb is a tool designed to make it really easy to run services locally through Docker. It automatically takes care of grabbing the latest version of a service, building it if needed, performing any necessary actions before starting the service (ex: database migrations). It can run groups of services that are defined in a playlist. It can also run iOS applications in the iOS simulator if you are on macOS. I helped build tb while I worked at TouchBistro.

tb was a great learning experience with regards to how to design a good program and evolve it over time. When it was first built our goal was to have a good internal tool that worked for TouchBistro developers for their specific use cases. Later on we saw how useful and effective tb was. We wanted to share it with the rest of the world so we decided to open source it. This presented the challenge of how to generalize all the functionality so it didn't assume anything specific about TouchBistro. This forced us to design a good interface that was easy to use out of the box but also allowed for customization where necessary.

What technologies does it use?

tb is built in Go. Go is a great language for writing CLI tools. It is simple and easy to learn but fast and powerful. This was the first time I ever used Go and working on a non-trivial program like tb helped me get really comfortable with it.

tb also heavily relies on Docker and docker-compose. Since it uses Docker, tb is language agnostic. It does not matter if your service is written in Go, Ruby, JavaScript, etc. As long as it can run in a Docker container tb can run it. This was a great opportunity to get really familiar with Docker since I needed a solid understanding of of how Docker works in order to implement the desired functionality in tb.

Want to know more?

Check out the GitHub repository for more information about tb and how to use it. Also check out the blog post I wrote for the TouchBistro Engineering blog about tb.