Pager
A scrollable content viewer for logs, code, and long output.
Basic Usage
# View a file
invowk tui pager README.md
# Pipe content
cat long-output.txt | invowk tui pager
Options
| Option | Description |
|---|---|
--title | Title displayed above the pager |
--line-numbers | Show line numbers |
--soft-wrap | Soft wrap long lines instead of horizontal scrolling |
Examples
# With title
invowk tui pager --title "Log Output" app.log
# Show line numbers
invowk tui pager --line-numbers main.go
# Soft wrap long lines
invowk tui pager --soft-wrap document.txt
# Combine options
git log | invowk tui pager --title "Git History" --line-numbers
Navigation
While viewing content in the pager:
| Key | Action |
|---|---|
↑ / k | Scroll up one line |
↓ / j | Scroll down one line |
PgUp / b | Scroll up half page |
PgDown / f / Space | Scroll down half page |
Home / g | Go to top |
End / G | Go to bottom |
q / Esc / Enter | Exit pager |
Use Cases
View Log Files
# View application logs
invowk tui pager /var/log/app.log
# View with line numbers for debugging
invowk tui pager --line-numbers /var/log/app.log
Code Review
# Review code with line numbers
invowk tui pager --line-numbers --title "Code Review" src/main.go
# View diff output
git diff HEAD~5 | invowk tui pager --title "Recent Changes"
Command Output
# View long command output
kubectl logs deployment/myapp | invowk tui pager --title "Pod Logs"
# View build output
make build 2>&1 | invowk tui pager --title "Build Output" --soft-wrap
In Scripts
{
name: "view-logs"
description: "View application logs interactively"
implementations: [{
script: """
# Get recent logs and display in pager
journalctl -u myapp --no-pager -n 500 |
invowk tui pager --title "Application Logs" --soft-wrap
"""
runtimes: [{name: "native"}]
platforms: [{name: "linux"}, {name: "macos"}]
}]
}
Tips
- Use
--soft-wrapfor content with long lines to avoid horizontal scrolling - Use
--line-numberswhen you need to reference specific lines - Pipe output directly to pager for interactive viewing of command output
- The pager works well with interactive mode for embedded viewing
Next Steps
- Format and Style - Format content before viewing
- Table and Spin - Other data display components
- Overview - All TUI components