CLI tools / workflow comparison

Flik, grep and jq: choose the right log workflow

Compare interactive log investigation with shell filtering and JSON transformation, using the same small example.

Updated October 27, 2026 · Flik 0.1.0 · synthetic examples · macOS and Linux

grep, jq and Flik are useful at different points in a log workflow. The practical choice depends on whether you want a repeatable pipeline or an investigation in which the next question changes after every result. This guide compares that workflow without claiming that Flik implements jq expressions.

Begin with the same JSON records

Download the five-record JSON Lines sample. It contains gateway, payment and worker messages. Two records have both service=payment and level=error.

Write a repeatable jq selection

jq -c 'select(.service == "payment" and .level == "error")' app.jsonl

This produces two matching JSON objects. It is a good fit for shell scripts, automated reports and pipelines where the transformation is known in advance. jq can also construct new objects and reshape JSON; those capabilities are outside Flik’s query language.

Investigate the same records in Flik

flik --table --fields timestamp,service,level,message app.jsonl

Press 3 and add service:payment, then add level:error. You see the same two error messages in an interactive view. Press x to remove only the latest filter: the payment warning becomes visible again without reopening the file. Use 6 to change columns and v to inspect distinct field values.

Choose by the task

TaskUseful starting point
Find a literal string in many text filesgrep or another text-search tool
Transform JSON and feed a scripted pipelinejq
Refine several log filters while retaining contextFlik
Follow a stream and change visible fields interactivelyFlik with stdin input
Run an unattended, reproducible JSON transformationjq and a shell script

Keep surrounding evidence

Text searches can match a word in any part of a line; structured filters target a named field when the format exposes it. If the error still does not explain the incident, use //error to retain the preceding line or open the selected result’s context with Ctrl+G. For request chains, inspect a correlation ID across two files instead of assuming adjacent lines belong together.

Check before replacing a pipeline

Flik is a local, interactive terminal application for macOS and Linux. It does not execute jq programs, manage central log retention or replace an unattended log-processing job. Keep automated transformations in the tools that already express them clearly, and use the interactive workspace when each result changes the next question.

Try it on your own workload

Download a ready-to-run macOS or Linux release, open a synthetic sample and repeat the investigation locally.

Download Flik →

Continue the investigation

Count Nginx errors per hour

Filter failed Nginx requests, count occurrences by hour and distinguish HTTP statuses from error-log severity.