Just a handy command-line tool
When developing new projects on my laptop, I often run some commands over and over again.
Regardless of how far you’ve gone with your CI/CD pipelines, running commands locally without resorting to becoming a bash ninja can be pretty easy with…
justis a handy way to save and run project-specific commands
It’s a command-line tool that lets you define some commands to run (called recipes), in the form of a Makefile-inspired syntax.
It even allows you to define dependencies between the various tasks of your
It runs across all environments (Mac, Linux, Windows), and is quick to install.
.env files in which you can define variables specific to your project (other developers can have the same
justfile but have variables specific for their projects)
Without further ado, let’s see it in action in my current project.
In my project, I have the following
alias r := run
alias b := build
alias d := deploy
./gradlew -t run
gcloud builds submit -t $CLOUD_REGION-docker.pkg.dev/$PROJECT_ID/containers/$CONTAINER_NAME:v1
gcloud run deploy bedtimestories --image=$CLOUD_REGION-docker.pkg.dev/$PROJECT_ID/containers/$CONTAINER_NAME:v1
- The first instruction tells
justto load an
- The (optional) alias lines allow me to define shorcuts for commands that I run very often
- There are three commands:
runwill run my application locally with
buildwill containerize my app with my
Dockerfileon Google Cloud Build
buildand will deploy my container on Google Cloud Run
And now, I just run:
just deploy, or their shortcuts:
just r or
You also noticed the dollar variables which are interpolated from my
.env file which contains the following variables:
just a new little handy tool in my toolbox!