All work

AI and developer tools

ZiaxUtils: everyday ops scripts

A set of Ruby scripts I wrote to turn the repetitive parts of my day into one command each.

Personal project · 2022 – present

The problem

Running a platform means doing the same small things many times a day. None of it is hard, but it adds up and it’s easy to get slightly wrong.

What I built

A Rake-based toolbox where each of those chores is one command, with the details remembered so I don’t have to look them up.

The shape of a chore

  1. One commande.g. a database port-forward
  2. Look upcluster, namespace, pod
  3. Runkubectl or ssh with the right flags
  4. Donewith the details I'd otherwise forget

A sketch of the idea, not the production code.

task "dbs:forward", [:name] do |args|
  db = DATABASES.fetch(args.name)                  # cluster, namespace, service, port
  sh "kubectl --context #{db.cluster} -n #{db.namespace} " \
     "port-forward svc/#{db.service} #{db.local_port}:#{db.port}"
end

Why it matters

Once a chore is one command, I stop getting it slightly wrong.

Stack

The ZiaxUtils repository is private, so there's no public link.