A Developers Toolbox: part 3
Extracto
In my previous post I showed my git and vim configuration. This post will be about random small tools that I use, such as tooling for docker and kubernetes, or just some small utilities to make life a
Resumen
Resumen Principal
Este artículo constituye la tercera parte de una serie dedicada a presentar el conjunto de herramientas esenciales para desarrolladores. Mientras que la entrada anterior se centró en configuraciones específicas de git y vim, esta publicación amplía el espectro hacia una variedad de small tools que optimizan el flujo de trabajo diario. El autor enfatiza la importancia de estas utilidades menores pero poderosas, que abarcan desde soluciones especializadas para entornos Docker y Kubernetes hasta pequeñas aplicaciones que simplifican tareas cotidianas. La selección refleja una filosofía pragmática orientada a la eficiencia, donde cada herramienta resuelve problemas específicos de manera elegante. El enfoque en herramientas complementarias demuestra cómo los desarrolladores experimentados construyen su toolbox personal mediante la integración estratégica de soluciones especializadas que, aunque individuales, trabajan en conjunto para crear un entorno de desarrollo altamente productivo y personalizado.
Elementos Clave
- Herramientas Docker: El autor presenta utilidades específicas para optimizar el trabajo con contenedores Docker, facilitando tareas como construcción, despliegue y gestión de imágenes de manera más eficiente que las herramientas estándar.
- Utilidades Kubernetes: Se destacan herramientas especializadas para la administración de clústeres Kubernetes, enfocadas en simplificar operaciones complejas como el monitoreo, debugging y gestión de recursos dentro del ecosistema Kubernetes.
- Small utilities: Conjunto de aplicaciones ligeras diseñadas para resolver tareas específicas del día a día, desde manipulación de texto hasta automatización de procesos repetitivos, siguiendo la filosofía Unix de herramientas pequeñas pero poderosas.
- Integración de tooling: Enfoque en cómo estas herramientas menores se integran entre sí para crear un flujo de trabajo cohesivo, donde cada componente complementa las funcionalidades de los demás, maximizando la productividad del desarrollador.
Análisis e Implicaciones
La curación cuidadosa de estas herramientas demuestra cómo la experiencia profesional se traduce en selecciones estratégicas que pueden multiplicar significativamente la eficiencia del desarrollo. La combinación de soluciones especializadas para tecnologías modernas como Docker y Kubernetes con utilidades clásicas refleja un enfoque equilibrado que respeta tanto las innovaciones contemporáneas como los principios fundamentales de la ingeniería de software. Este tipo de toolbox personalizado se convierte en un activo invaluable para desarrolladores que buscan optimizar sus workflows en entornos complejos.
Contexto Adicional
La publicación forma parte de una serie continua donde el autor comparte su experiencia acumulada en desarrollo profesional, ofreciendo insights prácticos que van más allá de la documentación oficial. La elección de herramientas refleja tendencias actuales en la industria hacia la automatización, contenerización y orquestación de aplicaciones distribuidas.
Contenido
In my previous post I showed my git and vim configuration. This post will be about random small tools that I use, such as tooling for docker and kubernetes, or just some small utilities to make life a bit easier.
dry
dry is a terminal tool to manage Docker. It shows information about containers, and you can kill/restart them, or see their logs. You can also view your images or volumes. Basically you can do anything with docker using dry, but instead of remembering all the commands you have a nice and fast text based UI in your terminal.
k9s
k9s is a similar tool to dry, but it manages your kubernetes clusters.
The screenshot above shows the pod in my cluster, but you can use k9s for viewing deployments, secrets, namespaces, and even switch context.
You can also filter the list of pods(or on any other screen of k9s), by simply typing / followed by what you want to search for.
Basically k9s allows you to do anything you can also do with the kubectl command.
As a bonus tool, check out minikube to run a kubernetes cluster locally. And check out kubectx, it allows you to switch your context for kubectl (so in turn it also switches the context for k9s).
jwt-cli
jwt-cli is a tool to encode and decode JSON Web Tokens (JWTs). I used to use jwt.io to decode/encode JWTs, but when I found this tool I prefer that over pasting JWTs on a website (even though jwt.io does everything locally with JavaScript).
An example:
$ jwt decode eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjEyMzQ1Njc4OTAiLCJuYW1lIjoiRGVuaXoiLCJsYXN0bmFtZSI6IlR1cmFuIn0.jyi0QCpbu2ct_855oKhXzJjChWd6wwGSlVo7x3g0ZTo
Token header
------------
{
"typ": "JWT",
"alg": "HS256"
}
Token claims
------------
{
"id": "1234567890",
"lastname": "Turan",
"name": "Deniz"
}
jq
jq is a simple lightweight json processor in the terminal. I usually use it to quickly format it properly, such as this:
$ cat input.json
{"foo":"bar"}
$ cat input.json | jq > output.json
$ cat output.json
{
"foo": "bar"
}
But you can do much more, such as selecting a part of the json. You can see some examples on its website.
autojump
autojump is probably one of my most used tools. It is a tool that indexes the directories you have visited, and allows you to change to those directories in a fast way.
Imagine the following directories for your projects for example:
- ~/projects/messaging-serice
- ~/projects/some-cloud-service
- ~/projects/payment-service
- ~/projects/bank-service
- ~/projects/infra/cloud-deployment
You could then simply use the command j bank and it will go to the bank-service directory.
If you used the command j cloud it will either go to some-cloud-service or cloud-deployment, it depends on which one you visit more often.
And the best thing is, it doesn’t matter in which directory you are in currently, autojump will work and change your directory.
tldr-pages
tldr-pages as you might have guessed, stands for 'too long didn’t read'.
It provides simplified man pages for certain commands, which can be useful for commands you don’t use that often such as tar or curl.
Here is an example output for tar:
$ tldr tar
tar
Archiving utility.
Often combined with a compression method, such as gzip or bzip2.
More information: <https://www.gnu.org/software/tar>.
- [c]reate an archive and write it to a [f]ile:
tar cf target.tar file1 file2 file3
- [c]reate a g[z]ipped archive and write it to a [f]ile:
tar czf target.tar.gz file1 file2 file3
- [c]reate a g[z]ipped archive from a directory using relative paths:
tar czf target.tar.gz --directory=path/to/directory .
- E[x]tract a (compressed) archive [f]ile into the current directory [v]erbosely:
tar xvf source.tar[.gz|.bz2|.xz]
- E[x]tract a (compressed) archive [f]ile into the target directory:
tar xf source.tar[.gz|.bz2|.xz] --directory=directory
- [c]reate a compressed archive and write it to a [f]ile, using [a]rchive suffix to determine the compression program:
tar caf target.tar.xz file1 file2 file3
- Lis[t] the contents of a tar [f]ile [v]erbosely:
tar tvf source.tar
- E[x]tract files matching a pattern from an archive [f]ile:
tar xf source.tar --wildcards "*.html"
Especially for commands you don’t use very often, such as tar or maybe curl, it is very useful to have a quick manual that shows you how to use it.
The Fuck
The Fuck is a simple tool when you have a typo in your command.
Just run the command fuck after your typo, and it will suggest the correct command (or you can cycle through its suggestions until you find the correct one):
It’s just a great feeling to type fuck when you make a typo, it let’s out all the frustration 🙂.
Glances
Glances is a system monitor for the terminal. You can install other plugins(dependencies) for it to show other data as well, which is explained on its GitHub page.
You can also use it to quickly kill a certain task, which is what I use it for mainly.
Fuente: JDriven Blog