6 releases
0.2.1 | Jan 21, 2023 |
---|---|
0.2.0 | Jan 15, 2023 |
0.1.3 | Dec 12, 2022 |
0.0.1 | Aug 17, 2022 |
#1299 in Command line utilities
31 downloads per month
160KB
369 lines
pipeview
A command line pipe inspection utility.
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
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"
Installation
Building from source
$ cargo install pipeview
Dependencies
~6–12MB
~225K SLoC