Mohamed-Badry/statui
概要
API health check TUI dashboard built with Rust and Ratatui.
開発ツールできること
- Real-time monitoring with visual sparklines, uptime stats, and live latency tracking
- Async backend powered by tokio for non-blocking I/O
- Supports GET, POST, PUT, PATCH, DELETE, and HEAD with JSON, raw, or file request bodies
- Custom headers, Basic Auth, and .env variable expansion (${VAR:-default})
計測したスター増加
- 24時間
- 履歴を収集中
- 7日間
- 履歴を収集中
- 15日間
- 履歴を収集中
- 1か月
- 履歴を収集中
期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。
README.md
オリジナル███████╗████████╗ █████╗ ████████╗██╗ ██╗██╗
██╔════╝╚══██╔══╝██╔══██╗╚══██╔══╝██║ ██║██║
███████╗ ██║ ███████║ ██║ ██║ ██║██║
╚════██║ ██║ ██╔══██║ ██║ ██║ ██║██║
███████║ ██║ ██║ ██║ ██║ ╚██████╔╝██║
╚══════╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝
A lightweight, async TUI for monitoring API health.
Overview
Statui is a terminal-based dashboard for monitoring HTTP endpoints in real-time. Built for developers and ML engineers who need to keep an eye on API availability, latency trends, and status codes without leaving the terminal.
It features a high-performance async backend that ensures the UI never freezes, even when monitoring dozens of slow endpoints simultaneously.
Features
- Real-time monitoring with visual sparklines, uptime stats, and live latency tracking
- Async backend powered by
tokiofor non-blocking I/O - Supports
GET,POST,PUT,PATCH,DELETE, andHEADwith JSON, raw, or file request bodies - Custom headers, Basic Auth, and
.envvariable expansion (${VAR:-default}) - Inspector panel with latency stats, availability history, and recent check logs
- Configurable via TOML files, built-in presets, and CLI arguments
- Compiles to a single static binary with zero runtime dependencies
[!NOTE] Statui is intended for read-only or idempotent endpoints. Each endpoint sends an initial warm-up request on startup to establish the connection before measuring latency, so avoid pointing
POST,PUT, orDELETEchecks at endpoints with unwanted side effects.
Installation
Shell Script (Linux / macOS)
curl -fsSL https://raw.githubusercontent.com/Mohamed-Badry/statui/main/install.sh | sh
Cargo
cargo binstall statui # Pre-built binary
cargo install statui # Compile from crates.io
Nix
nix run github:Mohamed-Badry/statui # Try without installing
nix profile add github:Mohamed-Badry/statui # Install permanently
Pre-built Binaries
Download directly from GitHub Releases.
Quick Start
Try a built-in preset right away (no config file needed):
statui --preset dev
Or generate a starter statui.toml and run it:
statui --init
statui
Pass a custom config file or override defaults from the CLI:
statui my_config.toml --interval 10 --timeout 3
Key Bindings
| Key | Action |
|---|---|
q / Ctrl+C |
Quit |
j / k or ↓ / ↑ |
Scroll Down / Scroll Up |
i |
Toggle Inspector Pane (Endpoint Details) |
Configuration
Statui uses a layered configuration system. It loads settings in this order (last one wins):
defaults < global < local < CLI
- Built-in defaults (60s interval, 5s timeout)
- Global config (
~/.config/statui/config.tomlon Linux/Mac) - Local config (
./statui.toml) - CLI arguments (
statui my_config.toml -i 10 -t 3)
Environment Variables (.env)
You can reference environment variables in URLs, headers, request bodies (including nested JSON), and basic_auth using ${VAR} (errors if unset) or ${VAR:-fallback} (uses a default value).
.env files are loaded automatically in this priority order (first match wins):
- Existing shell environment variables
.envnext to the config file passed via CLI.envin the current working directory (or parent directories).envin the global config directory (~/.config/statui/.env)
Example statui.toml
# -----------------------------------------------
# statui :: Global Settings
# -----------------------------------------------
# All endpoints will use these values by default
# Default interval (in seconds) to ping all endpoints
default_interval = 3
# you shouldn't ping your APIs so often this is just for the demo
# Default timeout (in seconds) for any single request
default_timeout = 5
# -----------------------------------------------
# statui :: Endpoints
# -----------------------------------------------
# Each [[endpoints]] block is a new site to monitor.
#
# Environment variables from your shell or a local `.env` file can be
# referenced across URLs, headers, bodies, and auth using standard shell syntax:
# - Required: ${MY_API_KEY} (errors if unset)
# - Default: ${MY_VAR:-default_val} (uses fallback if unset)
# ===============================================
# Standard GET & HEAD Checks
# ===============================================
[[endpoints]]
# A simple endpoint. It will use the default interval and timeout.
name = "Google"
url = "https://www.google.com"
[[endpoints]]
# A more complex endpoint that overrides global settings.
name = "Rust Language"
url = "https://www.rust-lang.org"
interval = 10 # Ping this specific API only every 10 seconds
method = "HEAD" # Use HTTP HEAD instead of GET to save bandwidth
[[endpoints]]
name = "docs.rs"
url = "https://www.docs.rs"
# ===============================================
# GET: Native HTTP Basic Authentication (RFC 7617)
# ===============================================
[[endpoints]]
# Demonstrates native HTTP Basic Authentication.
# Automatically base64-encodes username and password into "Authorization: Basic <base64>".
# Also demonstrates environment variable expansion with fallbacks.
name = "HTTPBin Basic Auth"
url = "https://${HTTPBIN_HOST:-httpbin.org}/basic-auth/admin/secret123"
basic_auth = { username = "${BASIC_USER:-admin}", password = "${BASIC_PASS:-secret123}" }
# ===============================================
# POST: JSON Body with Env Variable Expansion
# ===============================================
[[endpoints]]
# Native TOML table serialized automatically to JSON.
# Demonstrates environment variables expanded inside:
# - URL: ${HTTPBIN_HOST:-httpbin.org}
# - Headers: ${API_BEARER_TOKEN:-demo-token-123}
# - JSON Body: ${PROBE_CLIENT:-statui-agent} and ${STATUI_ENV:-production}
name = "HTTPBin POST (JSON with Env)"
url = "https://${HTTPBIN_HOST:-httpbin.org}/post"
method = "POST"
interval = 5
body = { client = "${PROBE_CLIENT:-statui-agent}", environment = "${STATUI_ENV:-production}", ping = true }
headers = { "Authorization" = "Bearer ${API_BEARER_TOKEN:-demo-token-123}", "X-Monitor" = "statui" }
[[endpoints]]
# Demonstrates nested JSON structures and arrays with variable interpolation:
name = "Webhook Probe (Nested JSON)"
url = "https://${HTTPBIN_HOST:-httpbin.org}/post"
method = "POST"
interval = 15
body = { event = "healthcheck", tags = ["${STATUI_ENV:-staging}", "automated"], metadata = { secret = "${WEBHOOK_SECRET:-demo-secret-key}" } }
# ===============================================
# POST: External File Payload (with Env Expansion)
# ===============================================
[[endpoints]]
# Loads body bytes directly from an external file on disk.
# Demonstrates environment variable expansion in file paths:
name = "HTTPBin File Payload"
url = "https://httpbin.org/post"
method = "POST"
interval = 10
body = { file = "${PRESETS_DIR:-presets}/ai_llm.toml" }
# ===============================================
# PUT: Raw String Body (with Env Expansion)
# ===============================================
[[endpoints]]
# Plain raw string payload (ideal for plain text, CSV, or custom protocols).
# Demonstrates environment variable expansion inside a raw body string:
name = "HTTPBin PUT (Raw)"
url = "https://httpbin.org/put"
method = "PUT"
body = "sensor_id=${SENSOR_ID:-42}&status=healthy&uptime=99.9"
headers = { "Content-Type" = "application/x-www-form-urlencoded" }
# ===============================================
# PATCH: Multi-line Headers Sub-Table with Env Vars
# ===============================================
[[endpoints]]
# Shows headers defined as a separate TOML sub-table.
# Uses env vars for secrets and environment targeting.
name = "HTTPBin PATCH (Subtable)"
url = "https://httpbin.org/patch"
method = "PATCH"
body = { operation = "patch_status", is_active = true }
[endpoints.headers]
Authorization = "Bearer ${STAGING_TOKEN:-env-secret-placeholder}"
X-Environment = "${STATUI_ENV:-staging}"
X-Custom-Client = "statui-v0.2.3"
# ===============================================
# DELETE Check
# ===============================================
[[endpoints]]
# Testing DELETE method support
name = "HTTPBin DELETE"
url = "https://httpbin.org/delete"
method = "DELETE"
interval = 10
headers = { "X-Audit-Reason" = "healthcheck-cleanup" }
# ===============================================
# Edge Cases & Failure Demos
# ===============================================
[[endpoints]]
# Failing endpoint (Connection Error demo)
name = "Broken API"
url = "https://www.my-non-existent-api.monkey/api"
[[endpoints]]
# Self-signed certificate demo
name = "BadSSL Self Signed"
url = "https://self-signed.badssl.com/"
skip_cert_verification = true
Presets
Statui comes with built-in presets for common services. Run one with statui --preset <name>, or save it locally with statui --init --preset <name>:
ai: AI & LLM providers (OpenAI, Anthropic, DeepSeek, Groq, Hugging Face, etc.)cloud: Cloud & infra status pages (AWS, GCP, Cloudflare, Vercel, GitHub, Supabase, etc.)dev: Package registries (Crates.io, PyPI, NPM, NixOS Cache, Go Proxy, Docker, etc.)all: All presets combined
Roadmap
Statui is still evolving. Here are some features currently in the works:
- Search/Filter: Press
/to filter endpoints by name or status - Extended HTTP Methods: Full support for POST, PUT, DELETE, PATCH with request body configuration
- Request Bodies & Headers: Define custom headers and JSON/form payloads in the config file
- Authentication: Built-in support for Bearer tokens, API keys, and Basic Auth
- Theming: Customize colors and styles via
theme.toml - Custom Keybindings: Remap controls through
keymap.toml - Column Sorting: Sort endpoints by name, status, latency, or last checked time
- Export & Logging: Save historical data to CSV or JSON for analysis
Contributions and feature requests are welcome. Feel free to open an issue or PR.
Architecture
Statui follows a simple async-sync bridge architecture:
The Backend (
tokio): Spawns a dedicated lightweight task for every endpoint. These tasks (usingreqwest) handle networking, timing, and retries independently.The Frontend (
ratatui): Runs on the main thread. It receives updates via a thread-safe channel (mpsc) and renders the UI state.
This ensures that a timeout on one API never stutters the UI or delays checks for other APIs.
関連プロジェクトを探す
読み込み中…