Skip to main content
Version: stable

Data and system tools

JSON and YAML: jq, yq and fx​

Uses: jq, yq, fx

curl -s https://api.github.com/repos/Ziwi01/proveasio | jq '.stargazers_count'
kubectl get pods -o json | jq -r '.items[].metadata.name'
yq '.github_packages.neovim' ansible/roles/software/vars/main.yml
yq -i '.image.tag = "1.2.3"' values.yaml # edit a YAML file in place
yq -o json values.yaml # YAML to JSON

To build a jq filter interactively, type a command that prints JSON and press Alt+j (from the jq-zsh-plugin). An fzf window shows the result of the filter as you type it; Enter puts | jq '<filter>' on the command line.

fx browses large JSON interactively: fx data.json or ... | fx. Expand and collapse nodes with the arrow keys and search with /; ? lists all keys. With an argument it works as a processor, like jq: fx data.json .items.

HTTP: curlie​

Uses: curlie

curlie accepts every curl option, but prints headers and the formatted, colored body like HTTPie:

curlie https://api.github.com/repos/Ziwi01/proveasio
curlie post httpbin.org/post name=proveasio enabled:=true # JSON body, HTTPie syntax

Processes and resources: htop and bottom​

top is aliased to htop. F6 sorts, F4 filters, F5 shows the process tree, F9 kills.

bottom (btm) shows CPU, memory, network, disks, temperatures and processes in one screen with graphs. In the process list, / searches, dd kills and t toggles the tree view. ? lists all keys.

Disk usage: gdu​

gdu scans a directory and shows what takes space:

gdu ~ # interactive; Enter to open a directory, d to delete, q to quit
gdu -n /var # non-interactive summary

Docker: dry​

dry is a terminal UI for Docker: containers, images, networks and their logs and stats. Run dry, move with the arrow keys, and press Enter on a container for its actions (logs, inspect, stop, remove). ? lists all keys.

Many repositories: gita​

Uses: gita

gita shows the status of many repositories side by side and runs Git commands on all of them, from any directory:

gita add ~/projects/* # register repositories
gita ll # branch and status of each
gita fetch # fetch all
gita pull infra docs # only some repositories
gita group add infra-repo1 infra-repo2 -n infra # name a group
gita super infra checkout -b feature/x # any git command on a group
gita shell infra 'ls' # any shell command on a group

Code review: hunk​

Uses: hunk

hunk shows diffs in a desktop-style viewer in the terminal: a file list, side-by-side or unified view, and syntax highlighting. It works well for reviewing changes made by an AI agent.

hunk diff # working tree changes
hunk diff --staged # staged changes
hunk diff main # against a branch
hunk show HEAD~1 # a commit
hunk log # browse history

In tmux, Alt+h opens hunk in a popup, and opencode can walk you through its changes in it. See Review changes with an agent.

Code review with notes for the agent: revdiff​

Uses: revdiff

revdiff shows a diff, a file or a plan, and lets you annotate any line. When you quit, it prints the annotations as Markdown (## file:line (+) and the comment), ready for an AI agent. In opencode, use /revdiff instead; see Review changes with an agent.

revdiff # working tree changes
revdiff --staged # staged changes
revdiff main # against a branch
revdiff HEAD~1 HEAD # a commit
revdiff --only=plan.md # a single file, even outside git
revdiff -o review.md main # write the annotations to a file

In revdiff, a or Enter annotates the current line, A the whole file, @ lists the annotations and q quits. ? shows every key.

Shell scripts: ShellCheck​

ShellCheck finds bugs in shell scripts: unquoted variables, wrong tests, unused variables and more.

shellcheck script.sh
shellcheck -x -S warning scripts/*.sh # follow sourced files, skip notes and style hints

Neovim runs it automatically for shell files through the Bash language server.

Python projects: uv​

See Python.