Skip to content

Releases

v0.2.7

Choose a tag to compare

@atif-1402 atif-1402 released this 08 Nov 11:00

v0.2.7: mount table and gcc/clang diagnostics

parse now formats mount and adds gcc/clang compiler diagnostics. Same rule as the other tools: make hard-to-read output readable, and leave everything else byte for byte.

What's new

mount formatter

  • Plain mount output lined up as a table: DEVICE, MOUNTPOINT, FSTYPE, OPTIONS, with a LABEL column only when some row has one
  • Each column as wide as its widest cell, two spaces between columns, no trailing padding
  • Filesystem types colored by where they live (disk types cyan, kernel plumbing dim)
  • Options quietened; a read-only mount marked yellow
  • mount -l labels preserved in their own column

gcc / clang diagnostics

  • Diagnostics grouped under one bold file path instead of repeating it
  • Count summary up front ("2 errors", zero counts omitted) instead of buried at the end
  • line:col bold, severity colored (error red, warning yellow, note cyan), message plain
  • Source snippets, carets, and expansion lines dimmed underneath each diagnostic
  • In function context lines dropped — file:line:col is enough to find the problem

Usage

mount | parse
mount -l | parse
gcc file.c 2>&1 | parse
clang -Wall file.c | parse
parse gcc file.c
parse clang -Wall file.c

Color is off automatically when output is piped, and NO_COLOR is respected.

Safety

  • Lines that are not mount rows or diagnostic headers pass through untouched
  • A mount: error mixed into stdout is never lined up as though it were a mount
  • Linker output and command echoes mixed with diagnostics pass through unchanged
  • Exit codes are the tool's own, and stderr stays on stderr

Not yet

  • mount -v verbose output is not specially formatted
  • There is no --raw flag. To see the original output, run the command without | parse

Install

go install github.com/atif-1402/parse@v0.2.7

Full Changelog: v0.2.6...v0.2.7

v0.2.6

Choose a tag to compare

@atif-1402 atif-1402 released this 04 Nov 22:42

v0.2.6: curl and volume inspect

parse now formats curl and adds docker volume inspect. Same rule as the
other tools: make hard-to-read output readable, and leave everything else
byte for byte.

What's new

curl formatter

  • curl -I / curl -i: status line colored by code (2xx green, 3xx
    yellow, 4xx/5xx red), header keys cyan, body left untouched
  • A redirect chain colors every hop
  • curl -v ... 2>&1: the *, > and < noise dimmed, failures red,
    the response status still colored, curl's { ... bytes data] chunk
    markers dimmed
  • A bare curl: (n) failure, with no -v around it, painted bold red
  • The progress meter is dropped from piped output
  • parse curl runs curl with your own arguments and returns curl's exit
    code

docker volume inspect (also docker inspect <volume>)

  • Name, driver and scope as a header
  • Mountpoint, created date, labels and options under it

Usage

curl -I https://example.com | parse
curl -v https://example.com 2>&1 | parse
parse curl -I https://example.com
docker volume inspect <volume> | parse

Color is off automatically when output is piped, and NO_COLOR is respected.

Safety

  • Bodies, JSON, -w write-outs, --trace and --version pass through
    byte for byte, so scripts keep working
  • The detectors only claim real curl output, so git logs and other tools
    are left alone
  • Exit codes are the tool's own, and stderr stays on stderr

Not yet ( working on it )

  • curl -Z parallel output is not formatted specially
  • The progress meter is only dropped where parse claims the stream; on
    unclaimed text it comes through as curl printed it
  • There is no --raw flag. To see the original output, run the command
    without | parse

Install

go install github.com/atif-1402/parse@v0.2.6

Full Changelog: v0.2.5...v0.2.6

v0.2.5

Choose a tag to compare

@atif-1402 atif-1402 released this 15 Oct 10:50

v0.2.5

New

  • docker image inspect (also docker inspect <image>): a short summary
    instead of raw JSON: size, layers, entrypoint/cmd, user, ports, volumes,
    only the env vars your Dockerfile added, and the healthcheck. Secrets
    baked into an image are masked, with a warning. --show-secrets reveals
    them.
  • docker info: a short summary (containers, storage, cgroup, runtime,
    system, logging, plugins) with warnings kept verbatim and a line saying
    how many fields were hidden. docker version, --format output and a
    stopped daemon pass through unchanged.

Fixed

  • parse -v shows the real version for go install builds instead of dev.
  • In docker ps, a crash-looping (restarting) container now sorts right
    under the running ones and is highlighted, instead of sitting below the
    clean exits.

Docs

  • README refresh and badges; CONTRIBUTING.md renamed so GitHub detects it.

Docker support so far

ps, inspect (containers and images), network inspect, system df, info.
Everything else passes through to docker unchanged.

Install: go install github.com/atif-1402/parse@v0.2.5

v0.2.0

Choose a tag to compare

@atif-1402 atif-1402 released this 10 Oct 21:04

v0.2.0: Docker support

parse now formats four docker commands. Same rule as the other tools: make
hard-to-read output readable, and leave everything else byte for byte.

docker-preview

What's new

docker ps / docker ps -a

  • Columns reordered: NAME, STATE, IMAGE, PORTS, CREATED, ID
  • Status split into state and duration, with the exit code shown only when
    it is nonzero
  • Sorted: running first, then failing exits, then clean exits
  • One-line summary on top, IPv4/IPv6 port twins collapsed into one

docker inspect

  • A short grouped summary instead of hundreds of lines of JSON
  • Only fields that are set or signal a problem are shown; defaults and empty
    values are hidden
  • Env vars that come from the image are hidden, so only the ones you set show
  • Secrets masked by default, including passwords inside URLs
    (postgres://user:****@host/db). Use --show-secrets to reveal them
  • Flags for nonzero exit, OOMKilled, unhealthy, privileged, running as root,
    and bind mounts whose source path is missing

docker network inspect

  • Header with driver, scope, subnet and gateway, then a table of attached
    containers (name, IPv4, MAC)

docker system df and docker system df -v

  • Summary line (images, build cache, volumes, containers, reclaimable)
  • Tables sorted by size, sizes normalized, empty columns hidden
  • unused and dangling tags
  • Reclaimable matches docker's own number. In pipe mode with -v, totals built
    from summed rows are marked with ~ because they can't be exact. Direct
    mode (parse docker system df -v) uses exact totals

Usage

docker ps -a | parse
docker inspect <container> | parse
parse docker system df -v

Color is off automatically when output is piped, and NO_COLOR is respected.

Safety

  • Input that isn't default docker output (--format, -q) passes through
    unchanged
  • If a formatter hits a bug, parse prints your original text and a one-line
    warning on stderr instead of crashing
  • The docker detectors only claim real docker output, so git diffs and other
    tools are left alone

Not yet ( working on it )

  • Other docker commands (stats, logs, images, info, history, compose ps,
    volume ls, build, pull, top) pass through to real docker unchanged
  • There is no --raw flag. To see the original JSON, run the command
    without | parse

Install

go install github.com/atif-1402/parse@v0.2.0

Full Changelog: v0.1.0...v0.2.0

v0.1.0

Choose a tag to compare

@atif-1402 atif-1402 released this 08 Oct 06:11