8 releases

0.2.3 Sep 10, 2023
0.2.2 Jul 7, 2023
0.2.1 Jan 21, 2023
0.1.3 Dec 12, 2022
0.0.1 Aug 17, 2022

#360 in Visualization

Download history 66/week @ 2024-02-19 26/week @ 2024-02-26 4/week @ 2024-03-11 80/week @ 2024-04-01

84 downloads per month

MIT license

160KB
386 lines

pipeview

CI CD crates.io

A command line pipe inspection utility.

screenshot

Why?

  • Simple coloring of an input pipe with regex and colors as input args.
  • Multiple custom configs in the form of a pipeview.toml file in current folder or ~/.config/.
  • Progress bar (same as Linux's pv) - WIP.

Usage

Explicit coloring can be performed on the input based on a regular expression.

$ cat test/demo_nginx_access_log | pipeview "^(.*?) - - \\[(.*?)\\] \"(.*?) .*?\" (.*?) .*? \".*?\" \"(.*?)\"" 'bgreen white yellow cyan blue'

Nginx

Nginx and aim logs can be directly inspected using the --nginx or --aim flag:

$ cat test/demo_nginx_access_log | pipeview --nginx

screenshot-nginx

Custom configs

You can create a config in ~/.config/pipeview.toml or the current folder with filename pipeview.toml and call it using pipeview --config=foo.

An example custom config could be:

[foo]
regex="^(.*?) (.*?) (.*?): (.*?) (.*)"
colors="red green blue red green"

In case no custom config is specified, but there is a pipeview.toml file in the default paths and it contains only one entry, it will be used by default.

This enables you to have the file under version control and just use pipeview out-of-the-box without any args.

Installation

Building from source

$ cargo install pipeview

Dependencies

~7–19MB
~235K SLoC