DEV Community

Cover image for Top 10 CLI Tools for DevOps Teams
Dmitriy A. for Globalping

Posted on

Top 10 CLI Tools for DevOps Teams

For many DevOps teams, CLI tools have become indispensable helpers to automate tasks, manage infrastructure, and collaborate like a well-oiled machine. In this blog post, we'll share our top 10 CLI tools for DevOps teams that you'll enjoy integrating into your workflows!

Dive – Explore Docker images

Whether you work with Docker regularly or even create your own Docker containers, Dive is a great tool for streamlining image sizes, potentially helping you save storage costs and speed up deployments.

With the Dive CLI tool, you can dive into the layers of an image, see their size and content, and potentially uncover wasted space. For example, it lets you view the files and directories in each layer to find those that are unnecessarily bloating the image.

This enables you to take the necessary steps to reduce the image size by, for example, updating your .dockerignore file to omit the identified unnecessary resources.

HTTPie CLI – Test and debug APIs

HTTPie CLI is something like a modern alternative to the curl command, allowing you to interact with and test APIs, HTTP servers, and web services. Its developers have designed it to be powerful yet easy to use, thanks to its intuitive syntax and color-coded terminal output for better clarity. 

The tool has numerous functions that allow you to perform a wide range of HTTP requests. 

For example, a command to make a PUT request to an API endpoint with HTTP header data and some JSON data might look like this:

http PUT myapi.com/enpoint X-API-Token:123 username=pete1
Enter fullscreen mode Exit fullscreen mode

AWS CLI - Manage AWS Services

The AWS CLI is a must-have tool if your team relies on Amazon Web Services. It lets you effortlessly interact with AWS services, orchestrate resource management, and automate tasks from the comfort of your terminal. Once you get used to the tool, you'll notice how convenient and quick it is to fit into your processes – especially compared to going through AWS's web-based user interface. 

If you don't use AWS, you can usually find CLI tools for other major cloud infrastructure services, such as Azure CLI or gcloud CLI.

K9s – Manage Kubernetes Clusters

K9s is an open-source, terminal-based UI for interacting with your Kubernetes clusters, making navigating, observing, and managing your apps easier. If you use Kubectl but wish it was easier and faster to use, K9s might be just what you're looking for!

K9s visual approach makes viewing and managing pods, deployments, and services more straightforward. If you like to customize it, K9s' skins let you define your preferred look and feel. Additionally, you can add more features by creating plugins or choosing from plugins provided by the community.

Here's an example of K9s' pod overview:

k9s

Updatecli – Create custom update strategies

Updatecli is a useful tool for fine-tuning update strategies in DevOps. As you've probably experienced, manual updates often result in outdated specs because figuring out what can be updated is tricky. 

Updatecli lets you define custom strategies so that each application "run" detects whether a value needs to be updated and then applies the changes according to the strategy. We particularly like Updatecli's plugin-based approach to adapting to different workflows, which keeps you flexible and independent of underlying dependencies.

JQ and YQ – JSON and YAML parsing and processing

JQ and YQ are handy CLI tools for anyone working with JSON or YAML in their shell scripts and terminal. 

With JQ you can cut, filter, map, and transform JSON like with the sed\, awk\, or grep\ commands. YQ is more or less the same but is tailored to process YAML. Using these two tools, you can streamline data-driven tasks like testing API responses, managing configuration files, or handling Kubernetes manifests.

While JQ and YQ are not identical in use, they share many similarities. Here is a simple  example of how to read a value from a JSON and a YAML file:

```
jq .name file.json
yq .name file.yaml
```
Enter fullscreen mode Exit fullscreen mode

Terragrunt – Amplify terraform capabilities

If your team works with Terraform, you should definitely try Terragrunt (and obviously, its CLI tool!). It's an Infrastructure as Code (IaC) tool that acts as a wrapper for Terraform and simplifies dealing with multiple Terraform modules in different environments. 

Other benefits of Terragrunt include modular code organization, common standards, and efficient versioning with Git that improve collaboration. It also simplifies state file management and managing states across multiple environments.

Globalping - troubleshoot and test networks globally

Globalping is a global network testing tool with an extensive probe network that allows you to make measurement requests like ping, traceroute, mtr, dig, or curl from almost anywhere in the world. 

Using the Globalping CLI tool, you can quickly and easily test and troubleshoot APIs, DSN resolution, or your servers. For example, it allows you to look at network issues from the user's perspective by running commands from their location without actually having physical access. 

When defining a location from which to run a command, you can simply enter something that makes sense to you, and the tool will do its best to select the appropriate probes. Valid location inputs include countries, continents, cities, US states, regions (Western Europe), ASNs, ISP names, and cloud region names (us-east-2).

Here’s an example where we used the Globalping CLI to ping a website from two probes in Athens and South America:

Globalping CLI global ping

fzf – Command-line fuzzy finder

fzf is a fuzzy finder for the command line that is a great help in handling and navigating through data lists. It offers an intuitive user interface that allows you to quickly search, select and filter through various items, whether they're files, directories, command histories, or other text-based inputs. In addition, fzf has a real-time search function, a preview of file contents, and an auto-complete feature that minimizes the need for manual typing.
Once you get used to fzf to increase productivity and reduce errors, you won't want to return to a life without it!

urfave/cli – Build custom CLI tools

When it comes to finding the right CLI tools for a task, it often turns out that you need something tailored to your specific challenge or use case. That's when urfave/cli comes in handy, a Go package that provides a framework for creating your own Go command-line applications. 

Its developers have designed it to be easy to understand and use and provide thorough documentation to help you get started and beyond.

So even if you don't find the perfect CLI tool in this list, you can leverage urfave/cli to create it yourself and share it with your team.

Conclusion

We hope you found one or two CLI tools in our list that you would like to try out to improve your DevOps team efficiency, collaboration, and infrastructure management. 

Like what you've read? Check out our other blog posts for more DevOps and network testing insights.

Top comments (0)