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.
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 todebug.login 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
- PRs welcome; please keep changes minimal and aligned with the existing coding style.
- GitHub: zombat/AWX-Ansible-Log-Viewer
License
This project is licensed under the MIT License - see the LICENSE file for details.
Author
Raymond Rizzo
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6786fc56d566533163d50b727f62d9bb5c4847098018e5fc793c90ff898d43a6
|
|
| MD5 |
5d9c03b0b4ab4ade4abe9c6b9ee3c411
|
|
| BLAKE2b-256 |
cc1c25b171bbb47a641927f5234af04875b2410062ac12df70790cf0f8750fef
|
Provenance
The following attestation bundles were made for ansible_logviewer-1.0.1.tar.gz:
Publisher:
publish.yml on zombat/AWX-Ansible-Log-Viewer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ansible_logviewer-1.0.1.tar.gz -
Subject digest:
6786fc56d566533163d50b727f62d9bb5c4847098018e5fc793c90ff898d43a6 - Sigstore transparency entry: 1181707450
- Sigstore integration time:
-
Permalink:
zombat/AWX-Ansible-Log-Viewer@ae1101b1d8aa419efa39ad74e667bacc88a36511 -
Branch / Tag:
refs/tags/1.0.1 - Owner: https://github.com/zombat
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ae1101b1d8aa419efa39ad74e667bacc88a36511 -
Trigger Event:
release
-
Statement type:
File details
Details for the file ansible_logviewer-1.0.1-py3-none-any.whl.
File metadata
- Download URL: ansible_logviewer-1.0.1-py3-none-any.whl
- Upload date:
- Size: 18.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bb2adc5c0a644d8b6044d607557f9b1874cb1b849093b16b6c5c4bf5d0febce0
|
|
| MD5 |
f8e47d5595ccb3cf3881aa0694bd4785
|
|
| BLAKE2b-256 |
f969074d3f83d2e4d7ea089879f272607ae4f00372abf00ab56273cb8354865a
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ansible_logviewer-1.0.1-py3-none-any.whl -
Subject digest:
bb2adc5c0a644d8b6044d607557f9b1874cb1b849093b16b6c5c4bf5d0febce0 - Sigstore transparency entry: 1181707454
- Sigstore integration time:
-
Permalink:
zombat/AWX-Ansible-Log-Viewer@ae1101b1d8aa419efa39ad74e667bacc88a36511 -
Branch / Tag:
refs/tags/1.0.1 - Owner: https://github.com/zombat
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ae1101b1d8aa419efa39ad74e667bacc88a36511 -
Trigger Event:
release
-
Statement type: