CLI Tools

  1. grex: A command-line tool and Rust library for generating regular expressions from user-provided test cases
  2. cmatrix: Terminal based “The Matrix” like implementation

Tip of the Week

Use json output of popular commands:


% docker image list --format "{{json .}}"
% kubectl get pods --all-namespaces --output json
% gcloud projects list --format json

Use jqp to interactively parse the output:


% docker image list --format "{{json .}}" | jqp

Use jq to format the json output:


% docker image list --format "{{json .}}" | jq -rj '.ID,"\t",.Size,"\t",.Repository,":",.Tag,"\n"'
% kubectl get pods --all-namespaces --output json | jq -rc '.itmes[]|.spec.containers[]|.image'
% gcloud projects list --format json | jq -rj '.[]|select(.name|contains("My Project")|not)|.name,": ",.projectId,"\n"'