{"id":15715948,"url":"https://github.com/yxdunc/lipl","last_synced_at":"2025-04-06T13:12:07.583Z","repository":{"id":57811284,"uuid":"217920468","full_name":"yxdunc/lipl","owner":"yxdunc","description":"LIve PLot, a command line tool to analyse the output over time of custom shell commands.","archived":false,"fork":false,"pushed_at":"2022-08-23T20:22:23.000Z","size":2354,"stargazers_count":69,"open_issues_count":2,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-30T12:08:01.095Z","etag":null,"topics":["ascii-graphics","brew","cli","homebrew-formula","lipl","osx","plot","progress-bar","rust","tui","unix-command","watch"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yxdunc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-10-27T21:41:55.000Z","updated_at":"2025-03-19T17:22:24.000Z","dependencies_parsed_at":"2022-08-24T07:40:38.985Z","dependency_job_id":null,"html_url":"https://github.com/yxdunc/lipl","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yxdunc%2Flipl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yxdunc%2Flipl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yxdunc%2Flipl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yxdunc%2Flipl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yxdunc","download_url":"https://codeload.github.com/yxdunc/lipl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247485290,"owners_count":20946398,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ascii-graphics","brew","cli","homebrew-formula","lipl","osx","plot","progress-bar","rust","tui","unix-command","watch"],"created_at":"2024-10-03T21:43:31.859Z","updated_at":"2025-04-06T13:12:07.560Z","avatar_url":"https://github.com/yxdunc.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LIve PLot\n[![Latest version](https://img.shields.io/crates/v/lipl.svg)](https://crates.io/crates/lipl)\n[![Actions Status](https://github.com/yxdunc/lipl/workflows/Tests_OSX/badge.svg)](https://github.com/yxdunc/lipl/actions)\n[![Actions Status](https://github.com/yxdunc/lipl/workflows/Tests_Linux/badge.svg)](https://github.com/yxdunc/lipl/actions)\n[![Actions Status](https://github.com/yxdunc/lipl/workflows/Clippy%20check/badge.svg)](https://github.com/yxdunc/lipl/actions)\n\nlipl is a command line tool that is similar to [watch](https://en.wikipedia.org/wiki/Watch_(Unix)) but has extended functions for commands outputing a number.\n\nFor example `lipl 'ls'` will show the output of `ls` and will refresh the result\nevery 1 second (by default).\n\nNow if a command outputs a number like `ls -1 | wc -l` it will be able to plot\nthe result. In this case the plot will show a constant result until another \nprocess adds or removes a file from the current folder. It can be useful when \ndownloading many files to the current folder and you want to follow the\nprogress. If you know that in total 1000 files will be downloaded, you can \nsimply add the option `--target 1000` and a progress bar will be shown along \nwith an estimated time of completion.\n\n![main example screenshot](../media/screen_shots/lipl.gif?raw=true)\n\n\n## Install\n\n### homebrew ([osx](https://brew.sh/) \u0026 [linux](https://docs.brew.sh/Homebrew-on-Linux))\n\n```\nbrew install yxdunc/tools/lipl\n```\n\n### aur ([arch linux](https://aur.archlinux.org/))\n\n`lipl` can be installed from available [AUR packages](https://aur.archlinux.org/packages/?O=0\u0026SeB=b\u0026K=lipl\u0026outdated=\u0026SB=n\u0026SO=a\u0026PP=50\u0026do_Search=Go) using an [AUR helper](https://wiki.archlinux.org/index.php/AUR_helpers). For example,\n\n```\nyay -S lipl\n```\n\n## Arguments\n\n### positional argument:\n\nA string containing a bash command.\n\nIf the bash command returns a number a plot will be shown (ex: `ls -1 | wc -l`)\n\nIf the bash command returns anything else the command shows the output and \nfollow the same behaviour as [watch](https://en.wikipedia.org/wiki/Watch_(Unix))\n\n### named arguments:\n`-n/--refresh-rate`: the refresh rate in seconds\n\n`-t/--target`: a target value that will be used to show a progress bar based on\n the command outputs. A simple linear regression is used.\n\n`-l/--history-len`: the number of results from the given command that are stored\n and plotted.  \n\n`--show-regression-line`: when true shows the regression line used to compute\nthe ETA.\n\n`--show-target-line`: when true shows an horizontal line representing the target\nvalue.\n\n## Sample usages:\n\n🗃Plot number of files in `/tmp`\n```\nlipl -n 0.5 \"ls -1 /tmp | wc -l\"\n```\n\n♨️ Plot cpu usage of a given PID\n```\nlipl -n 0.1 \"ps -p ${PID} -o %cpu | tail -1\"\n```\n\n🗂Plot mem usage of a given PID\n```\nlipl -n 0.1 \"ps -p ${PID} -o %mem | tail -1\"\n```\n\n🐍Plot number of python processes running\n```\nlipl -n 0.5 \"pgrep python | wc -l\"\n```\n\n👩‍🚀Plot number of people in space\n```\nlipl -n 1 'echo \"curl -s http://api.open-notify.org/astros.json | jq .number\" | sh'\n```\n\n🔥Plot load of most cpu intensive process\n```\nlipl -n 0.01 \"ps -eo pcpu | sort -n | tail -1\"\n```\n\n💻Plot sum of all processes cpu load\n```\nlipl -n 0.01 'ps -eo pcpu | grep -v CPU | sed \"s/  //\" | paste -sd \"+\" - | bc'\n```\n\n⛓Plot bitcoin price\n```\nlipl -n 5 'curl -s https://api.coindesk.com/v1/bpi/currentprice.json | jq .bpi.EUR.rate_float'\n```\n\n🎢Plot polynomial\n```\nlipl -n 1 'echo \"x=$(($(date +%s) % 30 - 15)); echo $(($x * $x * $x + $x * $x + $x))\" | sh'\n```\n\n```\nlipl -n 1 'echo \"x=$(($(date +%s) % 30 - 15)); echo $(($x * $x + $x))\" | sh'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyxdunc%2Flipl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyxdunc%2Flipl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyxdunc%2Flipl/lists"}