Skip to main content

A fast, keyboard-driven terminal UI for exploring AWX/Ansible logs with multi-select filtering, error navigation, and collapsible sections.

Project description

AWX/Ansible Log Viewer

A fast, keyboard-driven terminal UI for exploring AWX/Ansible logs. It supports multi-select filtering (hosts, tasks, statuses), quick error navigation, and a clean status/bottom bar experience powered by prompt_toolkit.

Buy Me a Coffee

Features

  • Multi-select filters: choose multiple hosts, tasks, and statuses at once.
  • Ordered statuses: always shows ok, changed, unreachable, failed, skipping.
  • Host stats in dialog: per-host T/C/F/U/S counts for quick triage.
  • Error navigation: jump to next/previous failed or unreachable line.
  • Collapsing/expanding: fold sections to focus on what matters.
  • Copy selection: Ctrl+C copies selected text via OSC 52 when possible.
  • Safe exit: Q prompts for confirmation; Ctrl+X exits immediately.

Requirements

  • Python 3.10+
  • prompt_toolkit 3.x

Install

# Install from PyPI
pip install ansible-logviewer

# Run
ansible-logviewer path/to/logfile.log

Or install from source:

# (optional) create a virtualenv
python3 -m venv .venv
source .venv/bin/activate

pip install .

Key Bindings

  • Q: Exit (with confirmation)
  • Ctrl+X: Exit immediately
  • Ctrl+C: Copy selection (or exit when no selection)
  • W / Up: Move up
  • S / Down: Move down
  • PageUp / PageDown: Scroll by blocks
  • A / Left / -: Collapse current section
  • D / Right / +: Expand current section
  • F: Open filter dialog
  • N: Next error (failed/unreachable)
  • P: Previous error (failed/unreachable)
  • Ctrl+R: Clear all filters

Filter Dialog

  • Categories: Hosts, Tasks, Statuses (TAB switches categories)
  • Navigation: Up/Down to move; Space to toggle selection
  • Actions: A (select all), C (clear), Enter (apply), ESC/Ctrl+X (cancel)
  • Host stats legend: T=Total, C=Changed, F=Failed, U=Unreachable, S=Skipped

Notes

  • Status list is always shown in order: ok, changed, unreachable, failed, skipping (even if some don’t appear in the current file).
  • Error navigation respects active filters and collapsed state (errors in collapsed sections won’t appear in the rendered body until expanded).

Options

  • --highlight-style underline|color|both: Style for search match highlights (default: underline)
  • --search-mode keyword|regex|both: Search mode (default: both)
  • --debug: Write debug output to debug.log in the current directory

Troubleshooting

  • If Ctrl+X doesn’t work in your terminal, use Q (with prompt) to exit.
  • If copying via Ctrl+C doesn’t reach the system clipboard, your terminal may not support OSC 52; the text is still copied internally.

Project Structure

  • ansible_logviewer/cli.py: application entrypoint and UI wiring
  • ansible_logviewer/log_manager.py: parsing, indexing, filtering, and navigation logic
  • ansible_logviewer/kb.py: key bindings and modal dialogs
  • ansible_logviewer/ui.py: styles and status/bottom bar rendering
  • ansible_logviewer/lexer.py: syntax highlighting for log lines

Contributing

License

This project is licensed under the MIT License - see the LICENSE file for details.

Author

Raymond Rizzo

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ansible_logviewer-1.0.1.tar.gz (17.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ansible_logviewer-1.0.1-py3-none-any.whl (18.1 kB view details)

Uploaded Python 3

File details

Details for the file ansible_logviewer-1.0.1.tar.gz.

File metadata

  • Download URL: ansible_logviewer-1.0.1.tar.gz
  • Upload date:
  • Size: 17.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ansible_logviewer-1.0.1.tar.gz
Algorithm Hash digest
SHA256 6786fc56d566533163d50b727f62d9bb5c4847098018e5fc793c90ff898d43a6
MD5 5d9c03b0b4ab4ade4abe9c6b9ee3c411
BLAKE2b-256 cc1c25b171bbb47a641927f5234af04875b2410062ac12df70790cf0f8750fef

See more details on using hashes here.

Provenance

The following attestation bundles were made for ansible_logviewer-1.0.1.tar.gz:

Publisher: publish.yml on zombat/AWX-Ansible-Log-Viewer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ansible_logviewer-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for ansible_logviewer-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bb2adc5c0a644d8b6044d607557f9b1874cb1b849093b16b6c5c4bf5d0febce0
MD5 f8e47d5595ccb3cf3881aa0694bd4785
BLAKE2b-256 f969074d3f83d2e4d7ea089879f272607ae4f00372abf00ab56273cb8354865a

See more details on using hashes here.

Provenance

The following attestation bundles were made for ansible_logviewer-1.0.1-py3-none-any.whl:

Publisher: publish.yml on zombat/AWX-Ansible-Log-Viewer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page