Skip to main content
Version: 0.4.0

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

OptionDescription
--titleTitle displayed above the pager
--line-numbersShow line numbers
--soft-wrapSoft 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

While viewing content in the pager:

KeyAction
/ kScroll up one line
/ jScroll down one line
PgUp / bScroll up half page
PgDown / f / SpaceScroll down half page
Home / gGo to top
End / GGo to bottom
q / Esc / EnterExit 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-wrap for content with long lines to avoid horizontal scrolling
  • Use --line-numbers when 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