{"id":13581073,"url":"https://github.com/baioc/graf","last_synced_at":"2025-04-06T06:32:29.040Z","repository":{"id":80009781,"uuid":"562365295","full_name":"baioc/graf","owner":"baioc","description":"Plot discretized line charts in your terminal","archived":false,"fork":false,"pushed_at":"2022-11-07T01:23:56.000Z","size":35,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-05T20:46:55.355Z","etag":null,"topics":["chart","console","graph","plot","terminal"],"latest_commit_sha":null,"homepage":"","language":"F#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/baioc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2022-11-06T05:28:57.000Z","updated_at":"2023-11-27T20:50:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"7dd250ed-7871-4e63-a128-43f3b58201be","html_url":"https://github.com/baioc/graf","commit_stats":{"total_commits":16,"total_committers":1,"mean_commits":16.0,"dds":0.0,"last_synced_commit":"d423f1a472297ec91b0a10d05466024ae277fb6c"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baioc%2Fgraf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baioc%2Fgraf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baioc%2Fgraf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baioc%2Fgraf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/baioc","download_url":"https://codeload.github.com/baioc/graf/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247445652,"owners_count":20939952,"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":["chart","console","graph","plot","terminal"],"created_at":"2024-08-01T15:01:57.783Z","updated_at":"2025-04-06T06:32:28.761Z","avatar_url":"https://github.com/baioc.png","language":"F#","funding_links":[],"categories":["F# #"],"sub_categories":[],"readme":"# graf\n\n![release](https://img.shields.io/github/v/release/baioc/graf?sort=semver)\n\nPlot discretized line charts in your terminal.\n\n![examples](https://user-images.githubusercontent.com/27034173/200157439-a43b3256-ea68-46b3-85f2-0902fdb3069e.gif)\n\n\n## Usage\n\n```\nUsage: graf [OPTION]...\n\nOptions:\n    -f, --file FILE      If FILE is - or not specified, read from stdin.\n    -b, --batch          Only plot on end of input (as opposed to real-time).\n    -t, --title TITLE    Display TITLE on top of the plotted chart.\n    -s, --stats          Show statistics, which are hidden by default.\n    -c, --color COLOR    Color to plot the line in. See options below.\n    -n, --lines N        Plot N \u003c= 8 parallel lines. Default is inferred.\n    -p, --permissive     Ignore badly-formatted lines instead of halting.\n    -r, --range MIN:MAX  Fix plot bounds instead of choosing them dynamically.\n    -d, --digits DIGITS  Ensure at least DIGITS significant digits are printed.\n    -W, --width WIDTH    Maximum TUI width. Defaults to terminal width.\n    -H, --height HEIGHT  Maximum TUI height. Defaults to terminal height.\n    -h, --help           Print this help message and exit the program.\n\nNotes:\n    - A single quantization range is used for the entire chart, so make sure\n        timeseries are similarly scaled when there are more than one.\n    - When the chart includes multiple lines, a default title is added in order\n        to help disambiguate them; furthermore, each one is colored differently.\n    - Options '--title' and '--color' can be specified multiple times, in which\n        case they will be applied to each timeseries in a corresponding position.\n```\n\n\n## Examples\n\nNotice that, in order to plot data as it is streamed in real time, we either turn buffering off completely or flush on every newline.\n\n```sh\n$ ping example.com \\\n| stdbuf -oL tail -n +2 \\\n| sed -u 's/.*time=\\(.*\\) ms/\\1/' \\\n| graf -t \"ping (ms)\" --stats -W 80 -H 24\n```\n\n```sh\n$ vmstat -n 1 \\\n| stdbuf -oL tr -s ' ' \\\n| stdbuf -oL cut -d ' ' -f 14,15,16 \\\n| graf -n 3 --permissive --range 0:100 -t \"user%\" -c 'y' -t \"system%\" -c 'r' -t \"idle%\" -c 'g'\n```\n\n```sh\n$ while curl -sS -L -w '\\n' http://api.coincap.io/v2/rates/bitcoin; do sleep 1; done \\\n| sed -u 's/.*\"rateUsd\":\"\\([^\"]*\\)\".*/\\1/' \\\n| xargs -L 1 python3 -c 'import sys; print(float(sys.argv[1]) * 1e-8)' \\\n| graf -t \"Satoshi price (U\\$D)\" --digits 15 --color cyan\n```\n\n```sh\n$ python3 -c 'from math import *; [print(sin(4*pi * p/100), cos(4*pi * p/100)) for p in range(0, 100)]' \u003e tmp.tsv\n$ graf -f tmp.tsv --batch\n$ rm tmp.tsv\n```\n\n\n## Installation\n\n### Linux\n\n1. Download the [latest release] linux tar.gz\n2. Unpack it: `tar -xzf graf.tar.gz`\n3. Install it by moving the binary into your path: `mv graf /usr/local/bin/`\n\n### Windows\n\n1. Download the [latest release] windows .zip\n2. Unzip it.\n3. Install it by placing the `GRAF.EXE` binary somewhere in your `%PATH%`\n\n\n[latest release]: https://github.com/baioc/graf/releases/latest\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaioc%2Fgraf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbaioc%2Fgraf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaioc%2Fgraf/lists"}