| Crates.io | grafatui |
| lib.rs | grafatui |
| version | 0.1.4 |
| created_at | 2025-11-27 09:36:58.987437+00 |
| updated_at | 2026-01-25 23:44:15.526044+00 |
| description | A Grafana-like TUI for Prometheus |
| homepage | https://github.com/fedexist/grafatui |
| repository | https://github.com/fedexist/grafatui |
| max_upload_size | |
| id | 1953403 |
| size | 235,350 |
Grafatui is a terminal-based user interface (TUI) for Prometheus, inspired by Grafana. It allows you to visualize time-series data directly in your terminal with a lightweight, keyboard-driven interface.
If you already have Prometheus running:
# Install from crates.io
cargo install grafatui
# Run with your Prometheus instance
grafatui --prometheus-url http://localhost:9090
Or try the included demo with zero setup:
git clone https://github.com/fedexist/grafatui.git
cd grafatui
cd examples/demo && docker-compose up -d && sleep 5 && cd ../..
cargo run -- --grafana-json examples/dashboards/prometheus_demo.json --prometheus-url http://localhost:19090
This demo showcases all 7 visualization types (graph, stat, gauge, bar gauge, table, heatmap) using a local Prometheus instance.
{{label}} syntax)gridPoscargo install grafatui
Ensure you have Rust installed (1.85+ recommended).
git clone https://github.com/fedexist/grafatui.git
cd grafatui
cargo install --path .
Download the latest release for your platform from GitHub Releases:
Homebrew (coming soon):
brew install grafatui
Grafatui can generate shell completions for Bash, Zsh, Fish, PowerShell, and Elvish.
Bash:
# Add to .bashrc
source <(grafatui completions bash)
Zsh:
# Add to .zshrc
source <(grafatui completions zsh)
Fish:
grafatui completions fish | source
grafatui [OPTIONS]
| Option | Description | Default |
|---|---|---|
--prometheus-url <URL> |
Prometheus server URL | http://localhost:9090 |
--grafana-json <FILE> |
Import Grafana dashboard JSON | - |
--range <DURATION> |
Time range window (e.g., 5m, 1h, 24h) |
5m |
--step <DURATION> |
Query step resolution (e.g., 5s, 30s) |
5s |
--var <KEY=VALUE> |
Override dashboard variables | - |
--theme <NAME> |
UI theme | default |
--refresh-rate <MS> |
Data fetch interval (milliseconds) | 1000 |
--config <FILE> |
Custom config file path | - |
Run grafatui --help for the full list of options.
Create a grafatui.toml in ~/.config/grafatui/ (or use --config):
prometheus_url = "http://localhost:9090"
refresh_rate = 1000
time_range = "1h"
theme = "dracula"
grafana_json = "~/.config/grafatui/my-dashboard.json"
Basic usage:
grafatui --prometheus-url http://localhost:9090
Import a Grafana dashboard:
grafatui --prometheus-url http://prod-prom:9090 --grafana-json ./node-exporter.json
Override template variables:
grafatui --grafana-json ./dash.json --var job=node --var instance=server-01
Use a theme:
grafatui --theme tokyo-night
Try the included examples:
# All visualization types
grafatui --grafana-json examples/dashboards/all_visualizations.json --prometheus-url http://localhost:9090
# vLLM monitoring (mock demo)
cd examples/demo && docker-compose up -d && cd ../..
grafatui --config examples/demo/grafatui.toml
Tip: See the
examples/directory for more sample dashboards.
| Key | Action |
|---|---|
q |
Quit |
r |
Force refresh |
+ / - |
Zoom out / in |
[ / ] |
Pan left / right (time) |
0 |
Reset to live mode |
↑ / ↓ or k / j |
Select previous/next panel |
PgUp / PgDn |
Scroll vertically |
Home / End |
Jump to top / bottom |
y |
Toggle Y-axis mode |
1..9 |
Toggle series visibility |
f / Enter |
Fullscreen mode |
v |
Value inspection mode |
/ |
Search panels |
← / → |
Move cursor (inspect mode) |
? |
Toggle debug info |
Note: In normal mode, clicking selects panels. Press
vorfto enable cursor interaction.
| Feature | Grafatui | Grafana |
|---|---|---|
| Resource usage | ~10 MB RAM | ~500+ MB RAM |
| Startup time | <1 second | 5-10 seconds |
| Interface | Terminal (TUI) | Web browser |
| Dashboard format | Import Grafana JSON | Native |
| Ideal for | Quick debugging, SSH sessions, minimal environments | Production monitoring, complex dashboards, sharing |
Use Grafatui when:
Use Grafana when:
Grafatui is designed to be fast and resource-efficient:
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
Quick tips:
cargo fmt and cargo clippy before submittingGrafatui is built with amazing open-source libraries:
Inspired by Grafana and the TUI ecosystem.
Licensed under the Apache License, Version 2.0. See LICENSE for details.
Copyright 2025 Federico D'Ambrosio