grapicli
grapicli is a command-line tool for querying your Graylog server's REST API. It is built with Typer and renders results in a rich terminal table using Rich.
Features
- 🔍 Search logs by source host, message content, or any combination
- 🕐 Flexible time ranges — relative (last N minutes) or absolute (from/until)
- 📋 Configurable result limits
- 🔑 Token-based authentication via a
.envfile - 🖥️ Rich terminal output with syntax-highlighted tables
Quick start
Install from PyPI into a virtual environment:
Set your credentials in a .env file:
Then start searching:
# Last 15 minutes, up to 30 messages
grapicli search
# Filter by source
grapicli search --source myserver
# Filter by message text
grapicli search --message "error" --limit 50
# Absolute time range
grapicli search --since "2026-04-17 08:00:00" --until "2026-04-17 09:00:00"
See the Installation page for full setup details, then the Usage guide for all available options.